zc
2025-05-17 c946b206b0923e8b9567a529b8fd5d2d684c8265
src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -56,6 +56,11 @@
        add(1131);add(1132);add(1133);add(1134);add(1135);
    }};
    public static final ArrayList<Integer> staNos2 = new ArrayList<Integer>() {{
        add(1112);add(1114);add(1122);add(1124);add(1131);add(1135);
    }};
    public static final ArrayList<Integer> BarcodeList = new ArrayList<Integer>() {{
        add(1112); add(1122);
    }};
@@ -205,8 +210,8 @@
                staProtocol.setAutoing(status[0]);  // 自动
                staProtocol.setIdle(status[1]); //空闲
                staProtocol.setLoading(status[2]);  // 有物
//                staProtocol.setInEnable(status[2]); // 可入
//                staProtocol.setOutEnable(status[3]);// 可出
                staProtocol.setIn(status[3]);
                staProtocol.setOut(status[4]);
                staProtocol.setBackErr(status[5]);
                staProtocol.setLeftErr(status[6]);
                staProtocol.setRightErr(status[7]);
@@ -214,6 +219,9 @@
                staProtocol.setWeightErr(status[9]);
                staProtocol.setLow(status[10]);
                staProtocol.setHigh(status[11]);
                staProtocol.setInEnable(status[13]); // 可入
                staProtocol.setOutEnable(status[14]);// 可出
                staProtocol.setWorkNo(siemensS7Net.getByteTransform().TransInt16(result.Content, i*26+2));     // 工作号
@@ -267,14 +275,13 @@
        if (null == staProtocol) {
            return;
        }
        ArrayList<Integer> staNos = getStaNo();
        int index = staNos.indexOf(staProtocol.getSiteId());
        int index = staNos2.indexOf(staProtocol.getSiteId());
        OperateResult write = null;
        OperateResult write1 = null;
        //任务下发次数
        int writeCount = 0;
        do {
            write = siemensS7Net.Write("DB83." + index*8+6, staProtocol.getWorkNo());    // 工作号
            write = siemensS7Net.Write("DB83." + (index*8+6), staProtocol.getWorkNo());    // 工作号
            Thread.sleep(200);
            write1 = siemensS7Net.Write("DB83." + (index*8+4), staProtocol.getStaNo());    // 目标站
            if(write.IsSuccess && write1.IsSuccess){