From 11260184c3c930d0d9ccd6b65e905c7828efd3cf Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期五, 12 九月 2025 09:44:02 +0800
Subject: [PATCH] 1. 优化报警的查询功能 2. 插入设备表数据和单元表数据 3. 修复报警查询失败的问题
---
SourceCode/Bond/Servo/CMeasurement.cpp | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 51 insertions(+), 0 deletions(-)
diff --git a/SourceCode/Bond/Servo/CMeasurement.cpp b/SourceCode/Bond/Servo/CMeasurement.cpp
index 0acf5ee..8357d01 100644
--- a/SourceCode/Bond/Servo/CMeasurement.cpp
+++ b/SourceCode/Bond/Servo/CMeasurement.cpp
@@ -334,6 +334,26 @@
}
}
+ // FAC Data Report
+ addFacDataReportStep(0x1a589, 0xf4d, 1);
+ /*
+ {
+ CEqReadStep* pStep = new CEqReadStep(0x1a589, 133 * 2,
+ [&](void* pFrom, int code, const char* pszData, size_t size) -> int {
+ if (code == ROK && pszData != nullptr && size > 0) {
+ decodeFacDataReport((CStep*)pFrom, pszData, size);
+ }
+ return -1;
+ });
+ pStep->setName(STEP_EQ_FAC_DATA_REPORT);
+ pStep->setProp("Port", (void*)1);
+ pStep->setWriteSignalDev(0xf4d);
+ if (addStep(STEP_ID_FAC_DATA_REPORT, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ */
+
// process start/end report
{
CEqReadStep* pStep = new CEqReadStep(0x19D3F, 13 * 2,
@@ -437,4 +457,35 @@
return (int)params.size();
}
+
+ int CMeasurement::parsingProcessData(const char* pszData, size_t size, std::vector<CParam>& params)
+ {
+ return parsingParams(pszData, size, params);
+ }
+
+ int CMeasurement::parsingSVData(const char* pszData, size_t size, std::vector<CParam>& params)
+ {
+ /*/
+ 1 工艺运行步骤 1Word 123456
+ 2 AOI检测速度 2Word 123.456
+ */
+
+ ASSERT(pszData);
+ if (size < 125) return 0;
+ int i = 0, v;
+
+
+ // 1.工艺运行步骤
+ v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
+ params.push_back(CParam("工艺运行步骤", "", this->getName().c_str(), v));
+ i += 2;
+
+ // 2.检测速度
+ v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8 | (pszData[i + 2] & 0xff) << 16 | (pszData[i + 3] & 0xff) << 24;
+ params.push_back(CParam("A腔温控表1当前值", "", this->getName().c_str(), v * 0.001f));
+ i += 4;
+
+ return (int)params.size();
+ }
+
}
--
Gitblit v1.9.3