From c2f21a3a34b76e1bd90aed3e2ebb394df57123cc Mon Sep 17 00:00:00 2001
From: cpT <1@123>
Date: 星期四, 03 七月 2025 15:47:53 +0800
Subject: [PATCH] #改造
---
src/main/java/com/zy/core/thread/SiemensCrnThread.java | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/zy/core/thread/SiemensCrnThread.java b/src/main/java/com/zy/core/thread/SiemensCrnThread.java
index b6671ec..6d4d560 100644
--- a/src/main/java/com/zy/core/thread/SiemensCrnThread.java
+++ b/src/main/java/com/zy/core/thread/SiemensCrnThread.java
@@ -283,11 +283,6 @@
return false;
}
CrnErrCache.updateCrnErr(slave.getId(), "-");
- try{
- DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class);
- deviceErrorService.addDeviceError("crnWrite", slave.getId(), "宸烽亾鍙�"+command.getLaneNo()+";鍫嗗灈鏈烘寚浠や笅鍙�:"+JSON.toJSONString(command.getNowTask()));
- } catch (Exception e2){
- }
// try{
// BasErrLogService basErrLogService = SpringUtils.getBean(BasErrLogService.class);
// BasErrLog basErrLog = new BasErrLog(command,"","浠诲姟涓嬪彂璁板綍");
@@ -311,6 +306,11 @@
// array[9] = command.getCommand();
array[9] = (short)0;
OperateResult result18 = siemensNet.Write("DB100.18", (short)0);
+
+ if (command.getAckFinish() == 0) {
+ OperateResult result100 = siemensNet.Write("DB100.0", (short)0);
+ }
+
try{
Thread.sleep(50L);
} catch (Exception e){}
@@ -363,6 +363,11 @@
}
result = siemensNet.Write("DB100.0", array);
}else{
+ try{
+ DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class);
+ deviceErrorService.addDeviceError("crnWrite", slave.getId(), "宸烽亾鍙�"+command.getLaneNo()+";鍫嗗灈鏈烘寚浠や笅鍙�:"+JSON.toJSONString(command.getNowTask()));
+ } catch (Exception e2){
+ }
break;
}
}
--
Gitblit v1.9.1