| | |
| | | private Map<Integer, StaProtocol> station = new ConcurrentHashMap<>(); |
| | | private short heartBeatVal = 1; |
| | | public static final ArrayList<Integer> staNos = new ArrayList<Integer>() {{ |
| | | add(101);add(102);add(103);add(104); |
| | | add(201);add(202);add(203);add(204);add(205);add(206); |
| | | add(207);add(208);add(209);add(210);add(211);add(212); |
| | | add(213);add(101);add(102);add(103);add(104);add(105); |
| | | add(213);add(105); |
| | | }}; |
| | | |
| | | /** |
| | | * 条码数量 |
| | | */ |
| | | private int barcodeSize = 1; |
| | | private int barcodeSize = 2; |
| | | public IoModeType ioMode = IoModeType.NONE; |
| | | |
| | | public int[][] startSignal = new int[48][2]; |
| | |
| | | OperateResultExOne<byte[]> result2 = siemensS7Net.Read("DB100.190",(short)(barcodeSize*6)); |
| | | if (result2.IsSuccess) { |
| | | for (int i = 0; i < barcodeSize; i++) { |
| | | String barcode = siemensS7Net.getByteTransform().TransString(result2.Content,i*6,6, "UTF-8"); |
| | | String barcode =siemensS7Net.getByteTransform().TransString(result2.Content,i*6,6, "UTF-8"); |
| | | // String barcode=new String(result2.Content,i*12,12); |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, i + 1); |
| | | if(!Cools.isEmpty(barcodeThread) && !barcodeThread.getBarcode().equals(barcode)) { |