| | |
| | | add(0); add(1); add(2); |
| | | }}; |
| | | public static final ArrayList<Integer> BarcodeListMat = new ArrayList<Integer>() {{ |
| | | add(3); add(4); add(5); |
| | | add(3); add(4); |
| | | }}; |
| | | public static final ArrayList<Integer> staNosErrList = new ArrayList<Integer>() {{ |
| | | add(106); add(107); add(159); |
| | |
| | | } |
| | | //条码扫描器 |
| | | ArrayList<Integer> barcodeListMat = BarcodeListMat; |
| | | OperateResultExOne<byte[]> result2Mat = siemensS7Net.Read("DB101.840", (short) (barcodeListMat.size() * 8)); |
| | | OperateResultExOne<byte[]> result2Mat = siemensS7Net.Read("DB103.0", (short) (barcodeListMat.size() * 30)); |
| | | if (result2Mat.IsSuccess) { |
| | | for (int i = 0; i < barcodeListMat.size(); i++) { |
| | | Integer barcodeId = barcodeListMat.get(i); |
| | | String barcode = siemensS7Net.getByteTransform().TransString(result2Mat.Content,i*8,8, "UTF-8"); |
| | | String barcode = siemensS7Net.getByteTransform().TransString(result2Mat.Content,i*30,30, "UTF-8"); |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, barcodeId + 1); |
| | | if(!Cools.isEmpty(barcodeThread) && !barcodeThread.getBarcode().equals(barcode)) { |
| | | barcodeThread.setBarcode(barcode); |