| | |
| | | add(112);add(113);add(114); |
| | | }}; |
| | | public static final ArrayList<Integer> staNos3 = new ArrayList<Integer>() {{ |
| | | add(212);add(214);add(213); |
| | | add(212);add(213);add(214); |
| | | }}; |
| | | |
| | | public boolean charge0; |
| | |
| | | |
| | | //读条码 |
| | | Thread.sleep(200); |
| | | if (slave.getId()==1){ |
| | | OperateResultExOne<byte[]> result2 = siemensS7Net.Read("DB100.100",(short)(barcodeSize*8)); |
| | | if (result2.IsSuccess) { |
| | | for (int i = 0; i < barcodeSize; i++) { |
| | |
| | | charge1 = status[1]; |
| | | charge2 = status[2]; |
| | | } |
| | | } else { |
| | | OperateResultExOne<byte[]> result2 = siemensS7Net.Read("DB100.100",(short)(8)); |
| | | if (result2.IsSuccess) { |
| | | String barcode = siemensS7Net.getByteTransform().TransString(result2.Content,0,8, "UTF-8"); |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, slave.getId()+1); |
| | | if(!Cools.isEmpty(barcodeThread) && !barcodeThread.getBarcode().equals(barcode)) { |
| | | barcodeThread.setBarcode(barcode); |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (result.IsSuccess && result0.IsSuccess && result1.IsSuccess) { |
| | | |