From fce5bc7e29232d98b18e5f0c85eb49ebdb54be3c Mon Sep 17 00:00:00 2001 From: lsh <lsh@163.com> Date: 星期三, 04 六月 2025 10:46:49 +0800 Subject: [PATCH] * --- src/main/java/com/zy/core/thread/RgvThread.java | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/zy/core/thread/RgvThread.java b/src/main/java/com/zy/core/thread/RgvThread.java index ece3eeb..3bacee8 100644 --- a/src/main/java/com/zy/core/thread/RgvThread.java +++ b/src/main/java/com/zy/core/thread/RgvThread.java @@ -112,6 +112,20 @@ command.setDestinationStaNo1((short)0); // 鐩爣绔� write3(command); break; + // 澶嶄綅 + case 4: + RgvCommand command4 = (RgvCommand) task.getData(); + if (null == command4) { + command4 = new RgvCommand(); + } + command4.setRgvNo(slave.getId()); // RGV缂栧彿 + command4.setTaskNo1((short) 0); // 宸ヤ綔鍙� + command4.setAckFinish1((short) 1); // 浠诲姟瀹屾垚纭浣� + command4.setTaskMode1(RgvTaskModeType.X_MOVE); // 浠诲姟妯″紡 + command4.setSourceStaNo1((short)0); // 婧愮珯 + command4.setDestinationStaNo1((short)0); // 鐩爣绔� + write3(command4); + break; default: break; } @@ -215,7 +229,7 @@ OperateResultExOne<byte[]> result = siemensNet.Read("DB100.0", (short) 20); OperateResultExOne<byte[]> resultV = siemensNet.Read("DB20.16", (short) 2); OperateResultExOne<byte[]> resultE = siemensNet.Read("DB20.26", (short) 2); - if (result.IsSuccess) { + if (result.IsSuccess && resultV.IsSuccess && resultE.IsSuccess) { if (null == rgvProtocol) { rgvProtocol = new RgvProtocol(); rgvProtocol.setRgvNo(slave.getId()); -- Gitblit v1.9.1