1
pjb
2025-08-02 2b2285cce415718135b6b8dd923a772098a04e96
src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -190,8 +190,6 @@
                return barcode1;
            case 2:
                return barcode2;
            case 3:
                return barcode3;
            default:
                throw new CoolException("获取条码扫描器失败!");
        }
@@ -360,8 +358,8 @@
     * 读取状态 ====> 整块plc
     */
    private void readsanqi() throws InterruptedException {
        ArrayList<Integer> staNos = getStaNo();
        int staNoSize = staNos.size();
        ArrayList<Integer> staNos = staNos3;
        int staNoSize = staNos3.size();
        //
        OperateResultExOne<byte[]> resultsanqi = siemensS7Net.Read("DB101.120", (short) (staNoSize * 8));
@@ -397,24 +395,27 @@
        //外形检测 三期
        OperateResultExOne<byte[]> resultErrsanqi = siemensS7Net.Read("DB101.160", (short) 8);
        OperateResultExOne<byte[]> resultErrsanqi = siemensS7Net.Read("DB101.160", (short) (staNoSize * 8));
        if (resultErrsanqi.IsSuccess) {
            boolean[] status = siemensS7Net.getByteTransform().TransBool(resultErrsanqi.Content, 0, 1);
            StaProtocol staProtocol = station.get(304);
            staProtocol.setFrontErr(status[0]);
            staProtocol.setBackErr(status[1]);
            staProtocol.setHighErr(status[2]);
            staProtocol.setLeftErr(status[3]);
            staProtocol.setRightErr(status[4]);
            staProtocol.setWeightErr(status[5]);
            staProtocol.setBarcodeErr(status[6]);
            for (int i = 0; i < staNoSize; i++) {
                Integer siteId = staNos.get(i); // 站点编号
                boolean[] status = siemensS7Net.getByteTransform().TransBool(resultErrsanqi.Content, i * 4, 1);
                StaProtocol staProtocol = station.get(siteId);
                staProtocol.setFrontErr(status[0]);
                staProtocol.setBackErr(status[1]);
                staProtocol.setHighErr(status[2]);
                staProtocol.setLeftErr(status[3]);
                staProtocol.setRightErr(status[4]);
                staProtocol.setWeightErr(status[5]);
                staProtocol.setBarcodeErr(status[6]);
            }
        }
        //条码扫描器 三期
        Thread.sleep(200);
        ArrayList<Integer> barcodeListsanqi = getBarcodeList();
        OperateResultExOne<byte[]> result2siqi = siemensS7Net.Read("DB101.60", (short) (barcodeListsanqi.size() * 8));
        ArrayList<Integer> barcodeListsanqi = barcode3;
        OperateResultExOne<byte[]> result2siqi = siemensS7Net.Read("DB101.180", (short) (barcodeListsanqi.size() * 8));
        if (result2siqi.IsSuccess) {
            for (int i = 0; i < barcodeListsanqi.size(); i++) {
                Integer barcodeId = barcodeListsanqi.get(i);
@@ -479,7 +480,7 @@
        int index2 = 0;
        if (staProtocol.getSiteId() >= 310) {
            index = staNos3.indexOf(staProtocol.getSiteId());
            index2 = 54;
            index2 = 66;
        } else {
            index = staNos.indexOf(staProtocol.getSiteId());
        }