| | |
| | | // } |
| | | // } |
| | | |
| | | LiftThread liftThread = (LiftThread) SlaveConnection.get(SlaveType.Lift, 1); |
| | | LiftProtocol liftProtocol = liftThread.getLiftProtocol(); |
| | | |
| | | List<ShuttleCommand> commands = redisCommand.getAssignCommand().getCommands(); |
| | | //当前步序 |
| | | int commandStep = redisCommand.getCommandStep(); |
| | |
| | | if (command.getDistCodeNum().intValue() == shuttleProtocol.getCurrentCode().intValue()) { |
| | | //上一条指令的目标位置和当前小车位置相同,则认定上一条任务完成 |
| | | command.setComplete(true); |
| | | |
| | | //上一条指令起点是提升机二维码,则清零提升机任务号 |
| | | if (command.getStartCodeNum().intValue() == liftProtocol.getBarcode().intValue()) { |
| | | //判断提升机是否处于空闲 |
| | | if (liftProtocol.isIdleNoTask()) { |
| | | liftProtocol.setTaskNo((short) 0);//清空任务号 |
| | | } |
| | | } |
| | | } |
| | | } else if (command.getCommandWord().intValue() == 2) { |
| | | //托盘顶升命令 |
| | |
| | | } |
| | | } |
| | | |
| | | LiftThread liftThread = (LiftThread) SlaveConnection.get(SlaveType.Lift, 1); |
| | | LiftProtocol liftProtocol = liftThread.getLiftProtocol(); |
| | | |
| | | |
| | | //判断小车当前二维码是否为提升机二维码 |
| | | if (shuttleProtocol.getCurrentCode().intValue() == liftProtocol.getBarcode().intValue()) { |
| | |
| | | if (!staProtocol.isLiftArrival()) { |
| | | return false;//站点提升机到位信号false,禁止下发命令 |
| | | } |
| | | |
| | | //条件满足,占用提升机 |
| | | liftProtocol.setTaskNo(wrkNo); |
| | | } |
| | | } |
| | | |
| | |
| | | return true; |
| | | }else { |
| | | if (liftProtocol.getPositionArrivalFeedback$() == shuttleLocNoLev) { |
| | | liftProtocol.setTaskNo(wrkNo);//给提升机写工作号,防止被占用 |
| | | return true;//提升机到位 |
| | | } |
| | | executeLift(liftThread, liftProtocol, redisCommand, shuttleLocNoLev);//调度提升机 |