| | |
| | | } |
| | | |
| | | for (int i = 0; i < 5; i++) { |
| | | if (command.getRun().intValue() == 4 || command.getRun().intValue() == 5) { |
| | | break;//系统复位和链条停止转动不需要重发 |
| | | } |
| | | readStatus();//重新读取状态 |
| | | if (liftProtocol.getRunning()) { |
| | | break; |
| | |
| | | News.info("提升机命令下发[id:{}] >>>>> {},次数:{}", slave.getId(), JSON.toJSON(command), i); |
| | | OutputQueue.LIFT.offer(MessageFormat.format("【{0}】[id:{1}] >>>>> 命令下发: {2},次数:{}", DateUtils.convert(new Date()), slave.getId(), JSON.toJSON(command), i)); |
| | | try { |
| | | Thread.sleep(3000);//命令下发后休眠 |
| | | Thread.sleep(300);//命令下发后休眠 |
| | | } catch (InterruptedException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | return true; |
| | | } else { |
| | | OutputQueue.LIFT.offer(MessageFormat.format("【{0}】写入提升机plc数据失败 ===>> [id:{1}] [ip:{2}] [port:{3}]", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort())); |
| | | OutputQueue.LIFT.offer(MessageFormat.format("【{0}】写入提升机plc数据失败 ===>> [id:{1}] [ip:{2}] [port:{3}],次数:{}", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort())); |
| | | News.error("写入提升机plc数据失败 ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); |
| | | return false; |
| | | } |