From cbeff29a3261cb13ed3c5aada8bbd9cc4c1fee72 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期二, 22 七月 2025 09:57:48 +0800
Subject: [PATCH] #空托盘程序

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

diff --git a/src/main/java/com/zy/core/thread/SiemensCrnThread.java b/src/main/java/com/zy/core/thread/SiemensCrnThread.java
index 1dd59a3..64dd38d 100644
--- a/src/main/java/com/zy/core/thread/SiemensCrnThread.java
+++ b/src/main/java/com/zy/core/thread/SiemensCrnThread.java
@@ -282,11 +282,18 @@
         OperateResult result = null;
         int idx = 0;
         do {
-            OperateResultExOne<byte[]> resultRead = siemensNet.Read("DB100.0", (short) 4);
+            OperateResultExOne<byte[]> resultRead = siemensNet.Read("DB100.0", (short) 20);
             if (resultRead.IsSuccess) {
                 if (command.getAckFinish() == 0) {
                     short taskNo = siemensNet.getByteTransform().TransInt16(resultRead.Content, 2);
-                    if(taskNo == 0) {
+                    short taskMode = siemensNet.getByteTransform().TransInt16(resultRead.Content, 4);
+                    short sourcePosX = siemensNet.getByteTransform().TransInt16(resultRead.Content, 6);
+                    short sourcePosY = siemensNet.getByteTransform().TransInt16(resultRead.Content, 8);
+                    short sourcePosZ = siemensNet.getByteTransform().TransInt16(resultRead.Content, 10);
+                    short destinationPosX = siemensNet.getByteTransform().TransInt16(resultRead.Content, 12);
+                    short destinationPosY = siemensNet.getByteTransform().TransInt16(resultRead.Content, 14);
+                    short destinationPosZ = siemensNet.getByteTransform().TransInt16(resultRead.Content, 16);
+                    if(taskNo == 0 || taskMode == 0 || sourcePosX == 0 || sourcePosY == 0 || sourcePosZ == 0 || destinationPosX == 0 || destinationPosY == 0 || destinationPosZ == 0) {
                         result = siemensNet.Write("DB100.0", array);
                     }else {
                         break;

--
Gitblit v1.9.1