From afdfc60107245516aba35a74f7f49eee64f483ad Mon Sep 17 00:00:00 2001
From: Junjie <xjj@123>
Date: 星期五, 13 六月 2025 09:49:38 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/core/thread/SiemensCrnThread.java |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/zy/core/thread/SiemensCrnThread.java b/src/main/java/com/zy/core/thread/SiemensCrnThread.java
index edbaac5..d55ff16 100644
--- a/src/main/java/com/zy/core/thread/SiemensCrnThread.java
+++ b/src/main/java/com/zy/core/thread/SiemensCrnThread.java
@@ -154,7 +154,11 @@
      */
     private void readStatus(){
         try {
-            OperateResultExOne<byte[]> result = siemensNet.Read("DB101.0", (short) 56);
+            short len = 56;
+            if (slave.getId() == 1) {
+                len = 58;
+            }
+            OperateResultExOne<byte[]> result = siemensNet.Read("DB101.0", len);
             if (result.IsSuccess) {
                 if (null == crnProtocol) {
                     crnProtocol = new CrnProtocol();
@@ -181,6 +185,9 @@
                 crnProtocol.setyDistance(siemensNet.getByteTransform().TransInt16(result.Content, 44));
                 crnProtocol.setxDuration(siemensNet.getByteTransform().TransInt16(result.Content, 48));
                 crnProtocol.setyDuration(siemensNet.getByteTransform().TransInt16(result.Content, 52));
+                if (slave.getId() == 1) {
+                    crnProtocol.setCrnLane((int) siemensNet.getByteTransform().TransInt16(result.Content, 56));
+                }
 
                 OutputQueue.CRN.offer(MessageFormat.format("銆恵0}銆慬id:{1}] <<<<< 瀹炴椂鏁版嵁鏇存柊鎴愬姛",DateUtils.convert(new Date()), slave.getId()));
 

--
Gitblit v1.9.1