| | |
| | | } |
| | | } |
| | | |
| | | Thread.sleep(100); |
| | | //获取提升机异常数据 |
| | | OperateResultExOne<byte[]> result3 = siemensS7Net.Read("DB82.22.0", (short) 2); |
| | | if (result3.IsSuccess) { |
| | | liftProtocol.setErrorCode(siemensS7Net.getByteTransform().TransInt16(result3.Content, 0));//错误码 |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | OutputQueue.LIFT.offer(MessageFormat.format("【{0}】提升机plc状态信息失败 ===>> [id:{1}] [ip:{2}] [port:{3}]", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort())); |
| | | } |
| | |
| | | |
| | | OperateResult result = siemensS7Net.Write("DB83.0", array); |
| | | if (result != null && result.IsSuccess) { |
| | | liftProtocol.setSendTime(System.currentTimeMillis());//指令下发时间 |
| | | News.info("提升机命令下发[id:{}] >>>>> {}", slave.getId(), JSON.toJSON(command)); |
| | | OutputQueue.LIFT.offer(MessageFormat.format("【{0}】[id:{1}] >>>>> 命令下发: {2}", DateUtils.convert(new Date()), slave.getId(), JSON.toJSON(command))); |
| | | return true; |