| | |
| | | private short heartBeatVal = 1; |
| | | private int barcodeSize = 1; |
| | | public static final ArrayList<Integer> staNos = new ArrayList<Integer>() {{ |
| | | add(100);add(101);add(102); |
| | | add(103);add(104);add(105); |
| | | add(106);add(107);add(108); |
| | | add(100);add(101); |
| | | add(102);add(103); |
| | | add(104);add(105); |
| | | add(200);add(201); |
| | | add(202);add(203); |
| | | add(204);add(205); |
| | | add(300);add(301); |
| | | add(340);add(341); |
| | | add(345);add(346); |
| | | }}; |
| | | |
| | | public static final ArrayList<Integer> outInStaNos = new ArrayList<Integer>() {{ |
| | |
| | | * 读取状态 ====> 整块plc |
| | | */ |
| | | private void read() throws InterruptedException { |
| | | OperateResultExOne<byte[]> result = siemensS7Net.Read("DB100.0", (short) (staNos.size()*4)); |
| | | OperateResultExOne<byte[]> result = siemensS7Net.Read("DB1000.0", (short) (staNos.size()*4)); |
| | | if (result.IsSuccess) { |
| | | for (int i = 0; i < staNos.size(); i++) { |
| | | Integer siteId = staNos.get(i); // 站点编号 |
| | |
| | | } |
| | | } |
| | | Thread.sleep(200); |
| | | OperateResultExOne<byte[]> result1 = siemensS7Net.Read("DB101.0", (short) (staNos.size())); |
| | | OperateResultExOne<byte[]> result1 = siemensS7Net.Read("DB1001.0", (short) (staNos.size())); |
| | | if (result1.IsSuccess) { |
| | | for (int i = 0; i < staNos.size(); i++) { |
| | | Integer siteId = staNos.get(i); // 站点编号 |