From 29adbde03b8499f070218181500e5774c301328e Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期四, 19 六月 2025 16:16:37 +0800
Subject: [PATCH] 1. 补充发送信号读取PLC信号 2. 补充结束发送信号给PLC

---
 SourceCode/Bond/Servo/CEquipment.cpp |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/SourceCode/Bond/Servo/CEquipment.cpp b/SourceCode/Bond/Servo/CEquipment.cpp
index 2038e25..4baebd5 100644
--- a/SourceCode/Bond/Servo/CEquipment.cpp
+++ b/SourceCode/Bond/Servo/CEquipment.cpp
@@ -578,7 +578,9 @@
 
 		// robot cmd reply
 		CHECK_WRITE_STEP_SIGNAL(STEP_ID_ROBOT_CMD_REPLY, pszData, size);
-		
+
+		// Indexer Operation Mode Change
+		CHECK_WRITE_STEP_SIGNAL(STEP_ID_IN_OP_CMD_REPLY, pszData, size);
 	}
 
 	BOOL CEquipment::isBitOn(const char* pszData, size_t size, int index)
@@ -1021,14 +1023,15 @@
 
 		unsigned short operationMode = (unsigned short)((unsigned short)mode + getIndexerOperationModeBaseValue());
 		LOGI("<CEquipment-%s>准备设置indexerOperationMode<%d>", m_strName.c_str(), (int)mode);
-		pStep->writeShort(operationMode, [&, mode, onWritedRetBlock](int code) -> int {
+		pStep->writeShort(operationMode, [&, pStep, mode, onWritedRetBlock](int code) -> int {
 			int retCode = 0;
 			if (code == WOK) {
 				LOGI("<CEquipment-%s>设置indexerOperationMode成功.", m_strName.c_str());
 				const char* pszRetData = nullptr;
 				pStep->getReturnData(pszRetData);
 				ASSERT(pszRetData);
-				retCode = (unsigned int)CToolUnits::toInt16(pszRetData);	
+				retCode = (unsigned int)CToolUnits::toInt16(pszRetData);
+				LOGI("<CEquipment-%s>返回值: %d", m_strName.c_str(), retCode);
 			}
 			else {
 				LOGI("<CEquipment-%s>设置indexerOperationMode失败,code:%d", m_strName.c_str(), code);

--
Gitblit v1.9.3