From 03dc81df7fe0ea0e754abcc5af3d329527428853 Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期五, 09 一月 2026 20:06:45 +0800
Subject: [PATCH] 1.工节数据上报。
---
SourceCode/Bond/Servo/Model.cpp | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/SourceCode/Bond/Servo/Model.cpp b/SourceCode/Bond/Servo/Model.cpp
index 3f03a3d..e86862d 100644
--- a/SourceCode/Bond/Servo/Model.cpp
+++ b/SourceCode/Bond/Servo/Model.cpp
@@ -9,6 +9,9 @@
#include "TransferManager.h"
#include "RecipeManager.h"
#include "GlassLogDb.h"
+#include "CParam.h"
+#include <algorithm>
+#include <iomanip>
#include <map>
@@ -608,6 +611,33 @@
}
});
};
+ masterListener.onProcessDataReport = [&](void* pMaster, SERVO::CEquipment* pEquipment, const std::vector<CParam>& params) {
+ (void)pMaster;
+ const int eqId = pEquipment ? pEquipment->getID() : 0;
+ if (eqId != EQ_ID_Bonder1 && eqId != EQ_ID_Bonder2) return;
+
+ auto formatVal = [](const CParam& p) {
+ std::ostringstream oss;
+ oss.setf(std::ios::fixed);
+ oss << std::setprecision(4) << p.getDoubleValue();
+ return oss.str();
+ };
+
+ static const int vidMap[] = {
+ 6100,6101,6102,6103,6104,6105,6106,6107,6108,6109,6110,
+ 6111,6112,6113,6114,6115,6116,6117,6118,6119,6120,6121
+ };
+ const size_t count = (std::min)(params.size(), sizeof(vidMap) / sizeof(vidMap[0]));
+ m_hsmsPassive.withVariableLock([&] {
+ m_hsmsPassive.setVariableValue("Clock", CToolUnits::getCurrentTimeString().c_str());
+ for (size_t idx = 0; idx < count; ++idx) {
+ auto& p = params[idx];
+ std::string val = formatVal(p);
+ m_hsmsPassive.setVariableValue(std::to_string(vidMap[idx]).c_str(), val.c_str());
+ }
+ m_hsmsPassive.requestEventReportSend("BonderProcessData");
+ });
+ };
masterListener.onCTRoundEnd = [&](void* pMaster, int round) {
m_configuration.setContinuousTransferCount(round);
};
--
Gitblit v1.9.3