#
yxFwq
2024-08-07 2940d3a42bc0ae1a1ef5cefaf1ed881da28e8b06
src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -133,7 +133,7 @@
    /**
     * 条码数量
     */
    private int barcodeSize = 9;
    private int barcodeSize = 5;
    /**
     * 入出库模式
@@ -354,11 +354,15 @@
        Thread.sleep(200);
        OperateResultExOne<byte[]> result2 = siemensS7Net.Read("DB101.2440",(short)(barcodeSize*8));
        if (result2.IsSuccess) {
            int[] staNosRgv = {281,292,173,214,120,100,101,102,103};
            for (int i = 0; i < barcodeSize; i++) {  //1:281  2:292  3:174(173) 4:214  5:120
            int[] staNosRgv = new int[]{281,292,173,214,120};
            if (slave.getId()==2){
                staNosRgv = new int[]{453,460,508,534,611};
            }
            for (int i = 0; i < barcodeSize; i++) {
                //1:281  2:292  3:174(173) 4:214  5:120
                //6:453  7:460  8:508 9:534  10:611
                String barcode = siemensS7Net.getByteTransform().TransString(result2.Content,i*8,8, "UTF-8");
                BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, i + 1);
                BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, (i + 1+((slave.getId()-1)*5)));
                if(!Cools.isEmpty(barcodeThread) && !barcodeThread.getBarcode().equals(barcode)) {
                    Integer siteId = staNosRgv[i]; // 站点编号
                    StaProtocol staProtocol = station.get(siteId);