| | |
| | | //获取数据 |
| | | byte[] content = result.Content; |
| | | //提升机锁定 |
| | | liftProtocol.setLiftLock(modbusTcpNet.getByteTransform().TransInt16(content,0)); |
| | | liftProtocol.setLiftLock(modbusTcpNet.getByteTransform().TransBool(content,0)); |
| | | //位置到达反馈 |
| | | liftProtocol.setPositionArrivalFeedback(modbusTcpNet.getByteTransform().TransInt16(content,2)); |
| | | //准备就绪 |
| | |
| | | ///读取提升机状态-end |
| | | |
| | | OutputQueue.LIFT.offer(MessageFormat.format("【{0}】[id:{1}] <<<<< 实时数据更新成功",DateUtils.convert(new Date()), slave.getId())); |
| | | log.info(MessageFormat.format("【{0}】[id:{1}] <<<<< 实时数据更新成功",DateUtils.convert(new Date()), slave.getId())); |
| | | // log.info(MessageFormat.format("【{0}】[id:{1}] <<<<< 实时数据更新成功",DateUtils.convert(new Date()), slave.getId())); |
| | | |
| | | // 根据实时信息更新数据库 |
| | | //..... |
| | |
| | | //四层高度设定 |
| | | array[5] = command.getHeight4(); |
| | | //提升机锁定 |
| | | array[29] = command.getLiftLock(); |
| | | array[29] = command.getLiftLockShortValue(); |
| | | |
| | | OperateResult result = modbusTcpNet.Write("0", array);; |
| | | if (result != null && result.IsSuccess) { |
| | |
| | | command.setHeight2((short) 100); |
| | | command.setHeight3((short) 200); |
| | | command.setHeight4((short) 303); |
| | | command.setLiftLock((short) 1); |
| | | command.setLiftLock(true); |
| | | thread.write(command); |
| | | |
| | | } |