| | |
| | | liftProtocol.setLiftLock(CommonUtils.shortToBoolean(modbusTcpNet.getByteTransform().TransInt16(content, 0))); |
| | | //位置到达反馈 |
| | | liftProtocol.setPositionArrivalFeedback(modbusTcpNet.getByteTransform().TransInt16(content,2)); |
| | | |
| | | byte by = modbusTcpNet.getByteTransform().TransByte(content, 5); |
| | | int[] datas = CommonUtils.byteToBits(by); |
| | | //准备就绪 |
| | | liftProtocol.setReady(CommonUtils.intToBoolean(datas[0])); |
| | | //运行中 |
| | | liftProtocol.setRunning(CommonUtils.intToBoolean(datas[1])); |
| | | //联机/单机 |
| | | liftProtocol.setMode(CommonUtils.intToBoolean(datas[2])); |
| | | //输送线前端光电有货 |
| | | liftProtocol.setLineFrontHasStock(CommonUtils.intToBoolean(datas[3])); |
| | | //输送线正转反馈 |
| | | liftProtocol.setForwardRotationFeedback(CommonUtils.intToBoolean(datas[4])); |
| | | //输送线反转反馈 |
| | | liftProtocol.setReverseFeedback(CommonUtils.intToBoolean(datas[5])); |
| | | //输送线电机过载 |
| | | liftProtocol.setMotorOverload(CommonUtils.intToBoolean(datas[6])); |
| | | //输送线末端光电有货 |
| | | liftProtocol.setLineEndHasStock(CommonUtils.intToBoolean(datas[7])); |
| | | //进输送线卡托盘报警 |
| | | liftProtocol.setInConveyLineCardTrayAlarm(CommonUtils.intToBoolean(datas[8])); |
| | | //出输送线卡托盘报警 |
| | | liftProtocol.setOutConveyLineCardTrayAlarm(CommonUtils.intToBoolean(datas[9])); |
| | | //平台位置偏差报警 |
| | | liftProtocol.setPlatPositionDeviationAlarm(CommonUtils.intToBoolean(datas[10])); |
| | | //平台扭矩偏差报警 |
| | | liftProtocol.setPlatTorqueDeviationAlarm(CommonUtils.intToBoolean(datas[11])); |
| | | //平台四向车检测 |
| | | liftProtocol.setPlatShuttleCheck(CommonUtils.intToBoolean(datas[12])); |
| | | |
| | | |
| | | byte b1 = modbusTcpNet.getByteTransform().TransByte(content, 5); |
| | | byte b2 = modbusTcpNet.getByteTransform().TransByte(content, 4); |
| | | int[] datas1 = CommonUtils.byteToBits(b1); |
| | | int[] datas2 = CommonUtils.byteToBits(b2); |
| | | //准备就绪 |
| | | liftProtocol.setReady(CommonUtils.intToBoolean(datas1[0])); |
| | | //运行中 |
| | | liftProtocol.setRunning(CommonUtils.intToBoolean(datas1[1])); |
| | | //联机/单机 |
| | | liftProtocol.setMode(CommonUtils.intToBoolean(datas1[2])); |
| | | //输送线前端光电有货 |
| | | liftProtocol.setLineFrontHasStock(CommonUtils.intToBoolean(datas1[3])); |
| | | //输送线正转反馈 |
| | | liftProtocol.setForwardRotationFeedback(CommonUtils.intToBoolean(datas1[4])); |
| | | //输送线反转反馈 |
| | | liftProtocol.setReverseFeedback(CommonUtils.intToBoolean(datas1[5])); |
| | | //输送线电机过载 |
| | | liftProtocol.setMotorOverload(CommonUtils.intToBoolean(datas1[6])); |
| | | //输送线末端光电有货 |
| | | liftProtocol.setLineEndHasStock(CommonUtils.intToBoolean(datas1[7])); |
| | | //进输送线卡托盘报警 |
| | | liftProtocol.setInConveyLineCardTrayAlarm(CommonUtils.intToBoolean(datas2[0])); |
| | | //出输送线卡托盘报警 |
| | | liftProtocol.setOutConveyLineCardTrayAlarm(CommonUtils.intToBoolean(datas2[1])); |
| | | //平台位置偏差报警 |
| | | liftProtocol.setPlatPositionDeviationAlarm(CommonUtils.intToBoolean(datas2[2])); |
| | | //平台扭矩偏差报警 |
| | | liftProtocol.setPlatTorqueDeviationAlarm(CommonUtils.intToBoolean(datas2[3])); |
| | | //平台四向车检测 |
| | | liftProtocol.setPlatShuttleCheck(CommonUtils.intToBoolean(datas2[4])); |
| | | |
| | | //未就绪状态 |
| | | liftProtocol.setNotReady(modbusTcpNet.getByteTransform().TransInt16(content,6)); |
| | | //伺服1错误 |