| | |
| | | } |
| | | } |
| | | } |
| | | // 台车位置 |
| | | OperateResultExOne<Integer> result2 = siemensS7Net.ReadInt32("DB100.48"); |
| | | if (result2.IsSuccess) { |
| | | StaProtocol staProtocol = station.get(8); |
| | | staProtocol.setPosition(result2.Content); |
| | | } else { |
| | | OutputQueue.DEVP.offer(MessageFormat.format("【{0}】8号台车获取实时位置失败!!!", DateUtils.convert(new Date()))); |
| | | log.error("8号台车获取实时位置失败!!!"); |
| | | } |
| | | |
| | | if (result.IsSuccess && result1.IsSuccess) { |
| | | |
| | | OutputQueue.DEVP.offer(MessageFormat.format("【{0}】[id:{1}] <<<<< 实时数据更新成功",DateUtils.convert(new Date()), slave.getId())); |
| | |
| | | return; |
| | | } |
| | | OperateResult write = siemensS7Net.Write("DB100." + (staProtocol.getSiteId() - 1) * 2, staProtocol.getWorkNo()); // 工作号 |
| | | Thread.sleep(100); |
| | | Thread.sleep(300); |
| | | OperateResult write1 = siemensS7Net.Write("DB100." + ((staProtocol.getSiteId() - 1) * 2 + 20), staProtocol.getStaNo()); // 目标站 |
| | | // boolean[] status = new boolean[8]; |
| | | // status[0] = staProtocol.isAutoing(); |