From 8ee2064b48bf7e8beb1b88326fcbbc5f548d764f Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期一, 14 十一月 2022 08:50:47 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/core/thread/SiemensDevpThread.java |   28 +++++-----------------------
 1 files changed, 5 insertions(+), 23 deletions(-)

diff --git a/src/main/java/com/zy/core/thread/SiemensDevpThread.java b/src/main/java/com/zy/core/thread/SiemensDevpThread.java
index 6901ef7..816b175 100644
--- a/src/main/java/com/zy/core/thread/SiemensDevpThread.java
+++ b/src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -15,7 +15,6 @@
 import com.zy.core.cache.OutputQueue;
 import com.zy.core.cache.SlaveConnection;
 import com.zy.core.enums.SlaveType;
-import com.zy.core.enums.SteChargeType;
 import com.zy.core.model.DevpSlave;
 import com.zy.core.model.Task;
 import com.zy.core.model.protocol.StaProtocol;
@@ -44,10 +43,9 @@
     private int barcodeSize = 2;
     public static final ArrayList<Integer> staNos = new ArrayList<Integer>() {{
         add(100);add(101);add(102);add(103);add(104);add(105);add(106);add(107);add(108);add(109);
-        add(110);add(111);
+        add(110);add(111);add(112);add(113);add(114);add(115);add(116);add(117);add(118);add(119);
         add(200);add(201);add(202);add(203);add(204);add(205);add(206);add(207);add(208);add(209);
-        add(210);add(211);
-        add(300);
+        add(1000);add(2000);
     }};
 
     public boolean charge0;
@@ -116,7 +114,7 @@
     private void read() throws InterruptedException {
         OperateResultExOne<byte[]> result = siemensS7Net.Read("DB100.0", (short) 50);
         if (result.IsSuccess) {
-            for (int i = 0; i < 25; i++) {
+            for (int i = 0; i < staNos.size(); i++) {
                 Integer siteId = staNos.get(i); // 绔欑偣缂栧彿
                 StaProtocol staProtocol = station.get(siteId);
                 if (null == staProtocol) {
@@ -130,7 +128,7 @@
         Thread.sleep(200);
         OperateResultExOne<byte[]> result0 = siemensS7Net.Read("DB101.0", (short) 50);
         if (result0.IsSuccess) {
-            for (int i = 0; i < 25; i++) {
+            for (int i = 0; i < staNos.size(); i++) {
                 Integer siteId = staNos.get(i); // 绔欑偣缂栧彿
                 StaProtocol staProtocol = station.get(siteId);
                 if (null == staProtocol) {
@@ -144,7 +142,7 @@
         Thread.sleep(200);
         OperateResultExOne<byte[]> result1 = siemensS7Net.Read("DB102.0", (short) 50);
         if (result1.IsSuccess) {
-            for (int i = 0; i < 25; i++) {
+            for (int i = 0; i < staNos.size(); i++) {
                 Integer siteId = staNos.get(i); // 绔欑偣缂栧彿
                 boolean[] status = siemensS7Net.getByteTransform().TransBool(result1.Content, i*2, 1);
                 StaProtocol staProtocol = station.get(siteId);
@@ -278,22 +276,6 @@
             log.error("杈撻�佺嚎plc缂栧彿={} {}鍙峰厖鐢垫々{}鎺у埗鎴愬姛", slave.getId(), index + 1, open?"鎵撳紑":"鍏抽棴");
         }
         return true;
-    }
-
-    /**
-     * 鑾峰彇绌洪棽鍏呯數妗�
-     */
-    public SteChargeType getIdleChargeLocNo() {
-        if (!this.charge0) {
-            return SteChargeType.FIRST;
-        }
-        if (!this.charge1) {
-            return SteChargeType.SECOND;
-        }
-        if (!this.charge2) {
-            return SteChargeType.THIRD;
-        }
-        return null;
     }
 
     @Override

--
Gitblit v1.9.1