| | |
| | | News.info("{}任务,{}站点,不在自动状态", wrkMast.getWrkNo(), staProtocol.getSiteId()); |
| | | return false; |
| | | } |
| | | |
| | | if (wrkMast.getStaNo() == 1031) { |
| | | //TODO |
| | | if (staProtocol.getOutInModel() != 1) { |
| | | News.info("{}任务,{}站点,没有可出信号", wrkMast.getWrkNo(), staProtocol.getSiteId()); |
| | | return false; |
| | | } |
| | | } else { |
| | | if (!isOutEnable(devpThread, wrkMast.getStaNo())) { |
| | | News.info("{}任务,{}站点,没有可出信号", wrkMast.getWrkNo(), staProtocol.getSiteId()); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | String locNo = "0200305"; |
| | |
| | | try { |
| | | // 根据输送线plc遍历 |
| | | FyDevpThread devpThread = (FyDevpThread) SlaveConnection.get(SlaveType.Devp, 1); |
| | | WrkMast pakout = wrkMastService.selectWorkingPakout(1032); |
| | | WrkMast pakout = wrkMastService.selectWorkingPakout(1031); |
| | | if (pakout != null) { |
| | | if (devpThread.ioModeOf2_5 != IoModeType.PAKOUT_MODE) { |
| | | // 出库切换中 |
| | |
| | | |
| | | //去待机位 |
| | | String locNo = Utils.getLocNo(Utils.getRow(liftStandByLocNo) + 1, Utils.getBay(liftStandByLocNo) - 1, Utils.getLev(liftStandByLocNo)); |
| | | //防止另一辆车占用待机位 |
| | | try{ |
| | | if (shuttleProtocol.getShuttleNo() == 2) { |
| | | ShuttleThread shuttleThread1 = (ShuttleThread) SlaveConnection.get(SlaveType.Shuttle, 1); |
| | | if (locNo.equals(shuttleThread1.getStatus().getCurrentLocNo())) { |
| | | locNo = Utils.getLocNo(Utils.getRow(liftStandByLocNo) + 2, Utils.getBay(liftStandByLocNo) - 1, Utils.getLev(liftStandByLocNo)); |
| | | } |
| | | } else { |
| | | ShuttleThread shuttleThread2 = (ShuttleThread) SlaveConnection.get(SlaveType.Shuttle, 2); |
| | | if (locNo.equals(shuttleThread2.getStatus().getCurrentLocNo())) { |
| | | locNo = Utils.getLocNo(Utils.getRow(liftStandByLocNo) + 2, Utils.getBay(liftStandByLocNo) - 1, Utils.getLev(liftStandByLocNo)); |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | //获取小车到提升机待机行走命令 |
| | | List<ShuttleCommand> commands = shuttleOperaUtils.getStartToTargetCommands(shuttleProtocol.getCurrentLocNo(), locNo, NavigationMapType.DFX.id, assignCommand, shuttleThread); |
| | | if (commands == null) { |
| | |
| | | private SiemensS7Net siemensS7Net; |
| | | private Map<Integer, StaProtocol> station = new ConcurrentHashMap<>(); |
| | | |
| | | public IoModeType ioModeOf2_5 = IoModeType.PAKIN_MODE; |
| | | public IoModeType ioModeOf2_5 = IoModeType.PAKOUT_MODE; |
| | | |
| | | private short heartBeatVal = 1; |
| | | private int barcodeSize = 10; |
| | |
| | | |
| | | |
| | | // 更新入出库模式 |
| | | private void updateIoMode() throws InterruptedException { |
| | | private void updateIoMode() { |
| | | if (this.ioModeOf2_5 != null && (this.ioModeOf2_5.id == 0 || this.ioModeOf2_5.id == 1)) { |
| | | short[] array = new short[1]; |
| | | array[0] = this.ioModeOf2_5.id; |
| | | if (!siemensS7Net.Write("DB83.80", this.ioModeOf2_5.id).IsSuccess) { |
| | | OutputQueue.DEVP.offer(MessageFormat.format("【{0}】写入输送线2.5F入出库模式失败", this.ioModeOf2_5)); |
| | | log.error("【{0}】写入输送线2.5F入出库模式失败。输送线plc编号={}", this.ioModeOf2_5); |