| | |
| | | staProtocol.setWorkNo(9999); |
| | | staProtocol.setStaNo(inSta.getBackSta()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | devpThread.setPakMkRun(staProtocol.getSiteId(), false); |
| | | devpThread.setErrorDev(staProtocol.getSiteId(), errMsg); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | TaskWrk taskWrk = taskWrkMapper.selectByWrkNo(Integer.valueOf(workNo)); |
| | |
| | | } |
| | | |
| | | // 判断堆垛机出库站状态 |
| | | if (staProtocol.isAutoing() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y")) { |
| | | // if (staProtocol.isAutoing() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y")) { |
| | | |
| | | // // 判断堆垛机出库站状态 |
| | | // if (staProtocol.isAutoing() && !staProtocol.isLoading() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y") |
| | | // && staProtocol.getWorkNo() == 0 && staProtocol.isOutEnable()) { |
| | | if (staProtocol.isAutoing() && !staProtocol.isLoading() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y") |
| | | && staProtocol.getWorkNo() == 0 && staProtocol.isOutEnable()) { |
| | | // 命令下发区 -------------------------------------------------------------------------- |
| | | |
| | | // 堆垛机控制过滤 |
| | |
| | | } |
| | | if (staProtocol.isOutEnable()){ |
| | | CrnErrCache.updateCrnErr(crnProtocol.getCrnNo(), "没有可出"); |
| | | } |
| | | if (staProtocol.isLoading()){ |
| | | CrnErrCache.updateCrnErr(crnProtocol.getCrnNo(), "出库站有物"); |
| | | } |
| | | } else { |
| | | CrnErrCache.updateCrnErr(crnProtocol.getCrnNo(), "出库站点:非自动"); |
| | |
| | | return null; |
| | | } |
| | | // 判断是否满足取货条件 |
| | | if (!staProtocol.isPakMkTask()) { |
| | | devpThread.setErrorDev(staProtocol.getSiteId(), "任务已下发等待小车取"); |
| | | return null; |
| | | } |
| | | // 判断是否满足取货条件 |
| | | if (staProtocol.isAutoing() |
| | | // && staProtocol.isLoading() |
| | | // && staProtocol.isStaOk() |
| | |
| | | if (taskWrk != null) { |
| | | Integer stano = staProtocol.getStaNo(); |
| | | if (staProtocol.getSiteId() == 1004 || staProtocol.getSiteId()==1020){ |
| | | // 判断是否满足取货条件 |
| | | if (!staProtocol.isPakMkRun()) { |
| | | devpThread.setErrorDev(staProtocol.getSiteId(), "异常回退标记,需要回退"); |
| | | return null; |
| | | } |
| | | if (!staProtocol.isLoading()) { |
| | | devpThread.setErrorDev(staProtocol.getSiteId(), "无物"); |
| | | return null; |
| | | } |
| | | if (!staProtocol.isInEnable()) { |
| | | devpThread.setErrorDev(staProtocol.getSiteId(), "等待可入信号"); |
| | | return null; |
| | | } |
| | | if (!staProtocol.isStaOk()) { |
| | | devpThread.setErrorDev(staProtocol.getSiteId(), "等待链条就绪"); |
| | | return null; |
| | | } |
| | | // 尺寸检测异常 |
| | |
| | | staProtocol.setWorkNo(9999); |
| | | staProtocol.setStaNo(staProtocol.getStaNo()+1); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | devpThread.setPakMkRun(staProtocol.getSiteId(), false); |
| | | devpThread.setPakMkTask(staProtocol.getSiteId(), false); |
| | | devpThread.setErrorDev(staProtocol.getSiteId(), errMsg); |
| | | MessageQueue.offer(SlaveType.Devp, 1, new Task(2, staProtocol)); |
| | | try{ |
| | |
| | | try { |
| | | RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, rgvSlave.getId()); |
| | | TaskProtocolCache taskProtocolCache = rgvThread.getTaskProtocolCache(); |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, rgvStn.getDevpPlcId()); |
| | | |
| | | TaskProtocol issuedTake = new TaskProtocol(); |
| | | TaskProtocol issuedPut = new TaskProtocol(); |
| | |
| | | return false; |
| | | } |
| | | } |
| | | try{ |
| | | devpThread.setPakMkTask(rgvStn.getStaNo(), false); |
| | | } catch (Exception e2){ |
| | | RgvErrCache.updateRgvErr(rgvSlave.getId(),rgvStn.getStaNo()+"小车任务下发标记更新失败"); |
| | | } |
| | | |
| | | |
| | | BasDevpPosition basDevpPositionSou = basDevpPositionService.selectOne(new EntityWrapper<BasDevpPosition>().eq("DEV_NO", rgvStn.getStaNo())); |
| | | BasDevpPosition basDevpPositionEnd = basDevpPositionService.selectOne(new EntityWrapper<BasDevpPosition>().eq("DEV_NO", targetPointConvert)); |