From b48ad13253c050e9e42360456fe8eff5f6fc3fcb Mon Sep 17 00:00:00 2001 From: Junjie <xjj@123> Date: 星期四, 19 六月 2025 08:35:59 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/ytflsbwcs' into ytflsbwcs --- src/main/java/com/zy/core/thread/SiemensCrnThread.java | 19 +++++++++++++++---- 1 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/zy/core/thread/SiemensCrnThread.java b/src/main/java/com/zy/core/thread/SiemensCrnThread.java index e55b359..3ab3c7d 100644 --- a/src/main/java/com/zy/core/thread/SiemensCrnThread.java +++ b/src/main/java/com/zy/core/thread/SiemensCrnThread.java @@ -287,11 +287,20 @@ do { OperateResultExOne<byte[]> resultRead = siemensNet.Read("DB100.0", (short) 4); if (resultRead.IsSuccess) { - short taskNo = siemensNet.getByteTransform().TransInt16(resultRead.Content, 2); - if(taskNo == 0) { - result = siemensNet.Write("DB100.0", array); + if (command.getAckFinish() == 0) { + short taskNo = siemensNet.getByteTransform().TransInt16(resultRead.Content, 2); + if(taskNo == 0) { + result = siemensNet.Write("DB100.0", array); + }else { + break; + } }else { - break; + short ackFinish = siemensNet.getByteTransform().TransInt16(resultRead.Content, 0); + if(ackFinish != command.getAckFinish()) { + result = siemensNet.Write("DB100.0", array); + }else { + break; + } } } idx++; @@ -316,6 +325,7 @@ } while (i < 5); } + this.crnProtocol.setLastCommandTime(System.currentTimeMillis()); try { // 鏃ュ織璁板綍 BasCrnOptService bean = SpringUtils.getBean(BasCrnOptService.class); @@ -427,6 +437,7 @@ } while (i < 5); } + this.crnProtocol.setLastCommandTime(System.currentTimeMillis()); try { // 鏃ュ織璁板綍 BasCrnOptService bean = SpringUtils.getBean(BasCrnOptService.class); -- Gitblit v1.9.1