From 685c14c1e3ae1ac8ad89958abee78f6e9476a72d Mon Sep 17 00:00:00 2001 From: lsh <lsh123456> Date: 星期三, 01 三月 2023 14:22:36 +0800 Subject: [PATCH] # --- src/main/java/com/zy/core/thread/SiemensCrnThread.java | 15 +++++++++++++-- src/main/java/com/zy/core/thread/SteThread.java | 3 +++ src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 2 +- src/main/java/com/zy/core/enums/SteTaskModeType.java | 4 ++-- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java index 25427ac..6407cd7 100644 --- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java @@ -1244,7 +1244,7 @@ SteProtocol steProtocol = steThread.getSteProtocol(); if (steProtocol == null) { continue; } if (!steProtocol.isIdle()) { continue; } - if (steProtocol.getRow() == 1) { continue; } +// if (steProtocol.getRow() == 1) { continue; } String locNo = wrkMast.getWrkSts() < 10 ? wrkMast.getLocNo() : wrkMast.getSourceLocNo(); // 濡傛灉鍦ㄥ悓涓�涓簱浣嶇粍 if (Utils.getGroupRow(locNo, true).equals(Utils.getGroupRow(steProtocol.getRow().intValue(), true)) diff --git a/src/main/java/com/zy/core/enums/SteTaskModeType.java b/src/main/java/com/zy/core/enums/SteTaskModeType.java index 2cdd923..888965d 100644 --- a/src/main/java/com/zy/core/enums/SteTaskModeType.java +++ b/src/main/java/com/zy/core/enums/SteTaskModeType.java @@ -86,9 +86,9 @@ public static SteTaskModeType findOriginByLoc(SteProtocol steProtocol) { int row = steProtocol.getRow().intValue(); if (Utils.FIRST_GROUP_ROW_LIST.contains(row)) { - return SteTaskModeType.BACK_ORIGIN; - } else if (Utils.SECOND_GROUP_ROW_LIST.contains(row)) { return SteTaskModeType.GO_ORIGIN; + } else if (Utils.SECOND_GROUP_ROW_LIST.contains(row)) { + return SteTaskModeType.BACK_ORIGIN; } else { throw new CoolException("瑙f瀽绌挎杞﹀師鐐瑰畾浣嶅け璐�"); } diff --git a/src/main/java/com/zy/core/thread/SiemensCrnThread.java b/src/main/java/com/zy/core/thread/SiemensCrnThread.java index 525a2ce..d9383fd 100644 --- a/src/main/java/com/zy/core/thread/SiemensCrnThread.java +++ b/src/main/java/com/zy/core/thread/SiemensCrnThread.java @@ -232,10 +232,21 @@ array[0] = command.getAckFinish(); array[1] = command.getTaskNo(); array[2] = command.getTaskMode(); - array[3] = command.getSourcePosX(); + if (command.getSourcePosX()==4){ + array[3] = 1; + }else { + array[3] = 2; + } + + array[4] = command.getSourcePosY(); array[5] = command.getSourcePosZ(); - array[6] = command.getDestinationPosX(); + if (command.getDestinationPosX()==4){ + array[6] = 1; + }else { + array[6] = 2; + } + array[7] = command.getDestinationPosY(); array[8] = command.getDestinationPosZ(); array[9] = command.getCommand(); diff --git a/src/main/java/com/zy/core/thread/SteThread.java b/src/main/java/com/zy/core/thread/SteThread.java index df50048..823247a 100644 --- a/src/main/java/com/zy/core/thread/SteThread.java +++ b/src/main/java/com/zy/core/thread/SteThread.java @@ -290,6 +290,9 @@ OperateResult result = null; // 寮�濮嬩换鍔� if (!command.getComplete()) { + //缁勭粐浠诲姟鍓嶏紝鍏堟竻绌哄啓浠诲姟纭浣嶏紝浠ュ強浠诲姟瀹屾垚纭浣� + siemensS7Net.Write("V2000.0", false); + siemensS7Net.Write("V2000.1", false); // 1.浠诲姟鍙� OperateResult result0 = siemensS7Net.Write("V998", command.getTaskNo().shortValue()); try { -- Gitblit v1.9.1