| | |
| | | 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(109); |
| | | add(110);add(111);add(112);add(113);add(114);add(115);add(116);add(117);add(118);add(119); |
| | | add(200);add(201);add(202);add(203);add(204);add(205);add(206);add(207);add(208);add(209); |
| | | add(1000);add(2000); |
| | | add(200);add(201);add(202);add(203);add(204);add(205);add(206);add(207);add(208);add(209); |
| | | }}; |
| | | |
| | | public boolean charge0; |
| | |
| | | * 读取状态 ====> 整块plc |
| | | */ |
| | | private void read() throws InterruptedException { |
| | | OperateResultExOne<byte[]> result = siemensS7Net.Read("DB100.0", (short) 50); |
| | | OperateResultExOne<byte[]> result = siemensS7Net.Read("DB100.0", (short) 64); |
| | | if (result.IsSuccess) { |
| | | for (int i = 0; i < staNos.size(); i++) { |
| | | Integer siteId = staNos.get(i); // 站点编号 |
| | |
| | | } |
| | | } |
| | | Thread.sleep(200); |
| | | OperateResultExOne<byte[]> result0 = siemensS7Net.Read("DB101.0", (short) 50); |
| | | OperateResultExOne<byte[]> result0 = siemensS7Net.Read("DB101.0", (short) 64); |
| | | if (result0.IsSuccess) { |
| | | for (int i = 0; i < staNos.size(); i++) { |
| | | Integer siteId = staNos.get(i); // 站点编号 |
| | |
| | | } |
| | | } |
| | | Thread.sleep(200); |
| | | OperateResultExOne<byte[]> result1 = siemensS7Net.Read("DB102.0", (short) 50); |
| | | OperateResultExOne<byte[]> result1 = siemensS7Net.Read("DB102.0", (short) 64); |
| | | if (result1.IsSuccess) { |
| | | for (int i = 0; i < staNos.size(); i++) { |
| | | Integer siteId = staNos.get(i); // 站点编号 |