From 452e31fbe5404d2ec8eb4c5b2e02138d837c146c Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期二, 10 六月 2025 14:44:18 +0800
Subject: [PATCH] 1.Panel Data Report数据的获取,
---
SourceCode/Bond/Servo/CEquipment.cpp | 30 +++++++++++++++
SourceCode/Bond/Servo/CEFEM.cpp | 17 ++++++++
SourceCode/Bond/Servo/CEquipment.h | 1
SourceCode/Bond/Servo/CBonder.cpp | 17 ++++++++
SourceCode/Bond/Servo/Common.h | 3 +
5 files changed, 67 insertions(+), 1 deletions(-)
diff --git a/SourceCode/Bond/Servo/CBonder.cpp b/SourceCode/Bond/Servo/CBonder.cpp
index 4a48f1e..311c11b 100644
--- a/SourceCode/Bond/Servo/CBonder.cpp
+++ b/SourceCode/Bond/Servo/CBonder.cpp
@@ -334,6 +334,23 @@
}
}
}
+
+ {
+ // Panel Data Report
+ CEqReadStep* pStep = new CEqReadStep(0xA17f, 386 * 2,
+ [&](void* pFrom, int code, const char* pszData, size_t size) -> int {
+ if (code == ROK && pszData != nullptr && size > 0) {
+ decodePanelDataReport((CStep*)pFrom, pszData, size);
+ }
+ return -1;
+ });
+ pStep->setName(STEP_EQ_PANEL_DATA_REPORT);
+ pStep->setProp("Port", (void*)1);
+ pStep->setWriteSignalDev(0x45e);
+ if (addStep(STEP_ID_PANEL_DATA_REPORT, pStep) != 0) {
+ delete pStep;
+ }
+ }
}
// 必须要实现的虚函数,在此初始化Slot信息
diff --git a/SourceCode/Bond/Servo/CEFEM.cpp b/SourceCode/Bond/Servo/CEFEM.cpp
index 326a19f..86cd158 100644
--- a/SourceCode/Bond/Servo/CEFEM.cpp
+++ b/SourceCode/Bond/Servo/CEFEM.cpp
@@ -626,6 +626,23 @@
delete pStep;
}
}
+
+ {
+ // Panel Data Report
+ CEqReadStep* pStep = new CEqReadStep(0x617f, 386 * 2,
+ [&](void* pFrom, int code, const char* pszData, size_t size) -> int {
+ if (code == ROK && pszData != nullptr && size > 0) {
+ decodePanelDataReport((CStep*)pFrom, pszData, size);
+ }
+ return -1;
+ });
+ pStep->setName(STEP_EQ_PANEL_DATA_REPORT);
+ pStep->setProp("Port", (void*)1);
+ pStep->setWriteSignalDev(0x15e);
+ if (addStep(STEP_ID_PANEL_DATA_REPORT, pStep) != 0) {
+ delete pStep;
+ }
+ }
}
// 必须要实现的虚函数,在此初始化Slot信息
diff --git a/SourceCode/Bond/Servo/CEquipment.cpp b/SourceCode/Bond/Servo/CEquipment.cpp
index 35c81b8..701840c 100644
--- a/SourceCode/Bond/Servo/CEquipment.cpp
+++ b/SourceCode/Bond/Servo/CEquipment.cpp
@@ -1470,6 +1470,36 @@
return 0;
}
+ int CEquipment::decodePanelDataReport(CStep* pStep, const char* pszData, size_t size)
+ {
+ short cassetteNo, jobSequenceNo;
+ int index = 0;
+ std::string strPanelJudgeData, strPanelGradeData;
+ memcpy(&cassetteNo, &pszData[index], sizeof(short));
+ index += sizeof(short);
+ memcpy(&jobSequenceNo, &pszData[index], sizeof(short));
+ index += sizeof(short);
+ CToolUnits::convertString(&pszData[index], 128 * 2, strPanelJudgeData);
+ index += 128 * 2;
+ CToolUnits::convertString(&pszData[index], 256 * 2, strPanelJudgeData);
+ index += 256 * 2;
+
+
+ // 缓存Attribute,用于调试时显示信息
+ unsigned int weight = 201;
+ pStep->addAttribute(new CAttribute("CassetteNo",
+ std::to_string(cassetteNo).c_str(), "", weight++));
+ pStep->addAttribute(new CAttribute("JobSequenceNo",
+ std::to_string(jobSequenceNo).c_str(), "", weight++));
+ pStep->addAttribute(new CAttribute("PanelJudgeData",
+ strPanelJudgeData.c_str(), "", weight++));
+ pStep->addAttribute(new CAttribute("PanelGradeData",
+ strPanelGradeData.c_str(), "", weight++));
+
+
+ return 0;
+ }
+
int CEquipment::onPreStoredJob(int port, CJobDataB* pJobDataB, short& putSlot)
{
LOGI("<CEquipment-%s>onPreStoredJob:port:%d|GlassId:%s",
diff --git a/SourceCode/Bond/Servo/CEquipment.h b/SourceCode/Bond/Servo/CEquipment.h
index da67314..f8d90ef 100644
--- a/SourceCode/Bond/Servo/CEquipment.h
+++ b/SourceCode/Bond/Servo/CEquipment.h
@@ -216,6 +216,7 @@
int decodeFetchedOutJobReport(CStep* pStep, int port, const char* pszData, size_t size);
int decodeStoredJobReport(CStep* pStep, int port, const char* pszData, size_t size);
int decodeVCREventReport(CStep* pStep, const char* pszData, size_t size);
+ int decodePanelDataReport(CStep* pStep, const char* pszData, size_t size);
int addJobDataB(CJobDataB* pJobDataB);
int removeJobDataB(int nCassetteSequenceNo, int nJobSequenceNo);
CJobDataB* getJobDataB(int nCassetteSequenceNo, int nJobSequenceNo);
diff --git a/SourceCode/Bond/Servo/Common.h b/SourceCode/Bond/Servo/Common.h
index fc13f87..fdd63b9 100644
--- a/SourceCode/Bond/Servo/Common.h
+++ b/SourceCode/Bond/Servo/Common.h
@@ -243,6 +243,7 @@
#define STEP_PORT2_CASSETTE_TYPE_CHANGE _T("Port2CassetteTypeChange")
#define STEP_PORT3_CASSETTE_TYPE_CHANGE _T("Port3CassetteTypeChange")
#define STEP_PORT4_CASSETTE_TYPE_CHANGE _T("Port4CassetteTypeChange")
+#define STEP_EQ_PANEL_DATA_REPORT _T("EQPanelDataReport")
/* Step ID */
@@ -390,7 +391,7 @@
#define STEP_ID_PROT3_CASSETTE_TYPE_CHANGE_REPLY 0x69A
#define STEP_ID_PROT4_CASSETTE_TYPE_CHANGE_REPLY 0x69B
#define STEP_ID_ROBOT_CMD_REPLY 0x6b0
-
+#define STEP_ID_PANEL_DATA_REPORT 0x5D1
/* base alarm */
--
Gitblit v1.9.3