From 9b2c28c98332ee598d0110f264bb1545977cb864 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期二, 10 六月 2025 15:15:44 +0800
Subject: [PATCH] 1.FAC Data数据获取
---
SourceCode/Bond/Servo/CEquipment.cpp | 21 ++++++++++
SourceCode/Bond/Servo/CEFEM.cpp | 17 ++++++++
SourceCode/Bond/Servo/CEquipment.h | 1
SourceCode/Bond/Servo/CBonder.cpp | 17 ++++++++
SourceCode/Bond/Servo/Common.h | 5 ++
5 files changed, 60 insertions(+), 1 deletions(-)
diff --git a/SourceCode/Bond/Servo/CBonder.cpp b/SourceCode/Bond/Servo/CBonder.cpp
index 311c11b..42a7a08 100644
--- a/SourceCode/Bond/Servo/CBonder.cpp
+++ b/SourceCode/Bond/Servo/CBonder.cpp
@@ -351,6 +351,23 @@
delete pStep;
}
}
+
+ {
+ // FAC Data Report
+ CEqReadStep* pStep = new CEqReadStep(0xA60E, 108 * 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_FAC_DATA_REPORT);
+ pStep->setProp("Port", (void*)1);
+ pStep->setWriteSignalDev(0x34d);
+ if (addStep(STEP_ID_FAC_DATA_REPORT, pStep) != 0) {
+ delete pStep;
+ }
+ }
}
// 必须要实现的虚函数,在此初始化Slot信息
diff --git a/SourceCode/Bond/Servo/CEFEM.cpp b/SourceCode/Bond/Servo/CEFEM.cpp
index 86cd158..c0cbf6d 100644
--- a/SourceCode/Bond/Servo/CEFEM.cpp
+++ b/SourceCode/Bond/Servo/CEFEM.cpp
@@ -643,6 +643,23 @@
delete pStep;
}
}
+
+ {
+ // FAC Data Report
+ CEqReadStep* pStep = new CEqReadStep(0x6301, 108 * 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_FAC_DATA_REPORT);
+ pStep->setProp("Port", (void*)1);
+ pStep->setWriteSignalDev(0x04d);
+ if (addStep(STEP_ID_FAC_DATA_REPORT, pStep) != 0) {
+ delete pStep;
+ }
+ }
}
// 必须要实现的虚函数,在此初始化Slot信息
diff --git a/SourceCode/Bond/Servo/CEquipment.cpp b/SourceCode/Bond/Servo/CEquipment.cpp
index 701840c..db4ab5a 100644
--- a/SourceCode/Bond/Servo/CEquipment.cpp
+++ b/SourceCode/Bond/Servo/CEquipment.cpp
@@ -1500,6 +1500,27 @@
return 0;
}
+ int CEquipment::decodeFacDataReport(CStep* pStep, const char* pszData, size_t size)
+ {
+ int index = 0;
+ std::string strSvTimeRecord, strSvData;
+ CToolUnits::convertString(&pszData[index], 8 * 2, strSvTimeRecord);
+ index += 128 * 2;
+ CToolUnits::convertString(&pszData[index], 640 * 2, strSvData);
+ index += 256 * 2;
+
+
+ // 缓存Attribute,用于调试时显示信息
+ unsigned int weight = 201;
+ pStep->addAttribute(new CAttribute("SV Time Record",
+ strSvTimeRecord.c_str(), "", weight++));
+ pStep->addAttribute(new CAttribute("SV Data",
+ strSvData.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 f8d90ef..a9dfdf7 100644
--- a/SourceCode/Bond/Servo/CEquipment.h
+++ b/SourceCode/Bond/Servo/CEquipment.h
@@ -217,6 +217,7 @@
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 decodeFacDataReport(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 fdd63b9..a3296d6 100644
--- a/SourceCode/Bond/Servo/Common.h
+++ b/SourceCode/Bond/Servo/Common.h
@@ -244,6 +244,7 @@
#define STEP_PORT3_CASSETTE_TYPE_CHANGE _T("Port3CassetteTypeChange")
#define STEP_PORT4_CASSETTE_TYPE_CHANGE _T("Port4CassetteTypeChange")
#define STEP_EQ_PANEL_DATA_REPORT _T("EQPanelDataReport")
+#define STEP_EQ_FAC_DATA_REPORT _T("EQFacDataReport")
/* Step ID */
@@ -268,6 +269,7 @@
#define STEP_ID_VCR1_EVENT_REPORT 0x56A
#define STEP_ID_MASTER_RECIPE_LIST_REPORT 0x56B
#define STEP_ID_RECIPE_PARAMETER_REPORT 0x56C
+#define STEP_ID_FAC_DATA_REPORT 0x56D
#define STEP_ID_RECIVE_JOB_UPS1 0x580
#define STEP_ID_RECIVE_JOB_UPS2 0x581
#define STEP_ID_RECIVE_JOB_UPS3 0x582
@@ -316,6 +318,7 @@
#define STEP_ID_FETCHED_OUT_JOB_REPORT13 0x5BB
#define STEP_ID_FETCHED_OUT_JOB_REPORT14 0x5BC
#define STEP_ID_FETCHED_OUT_JOB_REPORT15 0x5BD
+#define STEP_ID_PANEL_DATA_REPORT 0x5D1
#define STEP_ID_IN_OP_CMD_REPLY 0x5F0
#define STEP_ID_DISPATCHING_MODE_CHANGE_REPLY 0x5F1
#define STEP_ID_PORT1_TYPE_CHANGE 0x600
@@ -391,7 +394,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