From 1efb832676e8ad27e7a495dba6ffc19479e0c76f Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期四, 04 九月 2025 15:51:33 +0800
Subject: [PATCH] 1.机器配方参数的获取;

---
 SourceCode/Bond/Servo/CEqReadStep.cpp |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/SourceCode/Bond/Servo/CEqReadStep.cpp b/SourceCode/Bond/Servo/CEqReadStep.cpp
index c1bf97d..ce4f078 100644
--- a/SourceCode/Bond/Servo/CEqReadStep.cpp
+++ b/SourceCode/Bond/Servo/CEqReadStep.cpp
@@ -27,9 +27,10 @@
 	{
 		CReadStep::getAttributeVector(attrubutes);
 
+		unsigned int weight = 31;
 		std::string strTemp;
 		attrubutes.addAttribute(new CAttribute("Dev",
-			("W" + CToolUnits::toHexString(m_nDataDev, strTemp)).c_str(), ""));
+			("W" + CToolUnits::toHexString(m_nDataDev, strTemp)).c_str(), "", weight++));
 	}
 
 	int CEqReadStep::onReadData()
@@ -37,6 +38,17 @@
 		CReadStep::onReadData();
 
 
+		// 20250620新增,有些场景是不需要读数据的,只要检测到信息就写数据给机器
+		if (m_nReadSize == 0) {
+			if (m_onReadBlock != nullptr) {
+				m_onReadBlock(this, ROK, nullptr, 0);
+			}
+
+			return 0;
+		}
+
+
+		// 读数据
 		char szBuffer[READ_BUFFER_MAX];
 		int nRet = m_pCclink->ReadData2(m_station, DeviceType::W, m_nDataDev,
 			(long)min(READ_BUFFER_MAX, m_nReadSize), szBuffer);

--
Gitblit v1.9.3