| | |
| | | /** |
| | | * 条码数量 |
| | | */ |
| | | private int barcodeSize = 3; |
| | | private int barcodeSize = 7; |
| | | |
| | | /** |
| | | * 入出库模式 |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | if (slave.getId() == 1){ |
| | | //条码 |
| | | Thread.sleep(200); |
| | | OperateResultExOne<byte[]> result2 = siemensS7Net.Read("DB101.100",(short)31); |
| | | OperateResultExOne<byte[]> result2 = siemensS7Net.Read("DB101.102",(short)60); |
| | | if (result2.IsSuccess) { |
| | | for (int i = 0; i < barcodeSize; i++) { |
| | | for (int i = 0; i < 6; i++) { |
| | | String barcode = siemensS7Net.getByteTransform().TransString(result2.Content,i*8,8, "UTF-8"); |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, i + 1); |
| | | if(!Cools.isEmpty(barcodeThread) && !barcodeThread.getBarcode().equals(barcode)) { |
| | | barcodeThread.setBarcode(barcode); |
| | | } |
| | | } |
| | | |
| | | } |
| | | if (slave.getId() == 1){ |
| | | |
| | | // 外形检测 - 102 |
| | | Thread.sleep(100); |
| | | OperateResultExOne<byte[]> result4 = siemensS7Net.Read("DB101.150", (short)1); |