| | |
| | | runRgv: |
| | | for (List<WrkMast> wrkMastList : wrkMastLists){ |
| | | for (WrkMast wrkMast: wrkMastList){ |
| | | log.error("存在任务,RGV号={},任务数据={}", rgvId, JSON.toJSON(wrkMast)); |
| | | |
| | | rgvId++; |
| | | BasCircularShuttle basCircularShuttle = basCircularShuttleService.selectOne(new EntityWrapper<BasCircularShuttle>().eq("rgv_id", 1L)); |
| | | RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, basCircularShuttle.getRgvNo()); |
| | |
| | | RgvCommand rgvCommand = new RgvCommand(); |
| | | rgvCommand.setRgvNo(rgvProtocol.getRgvNo()); |
| | | rgvCommand.setAckFinish1((short) 0); // 工位1任务完成确认位 |
| | | rgvCommand.setTaskNo1(wrkMast.getWrkNo().shortValue()); |
| | | rgvCommand.setTaskMode1(RgvTaskModeType.FETCH_PUT); // 工位1任务模式: 取放货 |
| | | rgvCommand.setSourceStaNo1(wrkMast.getSourceStaNo().shortValue()); //工位1起点 |
| | | rgvCommand.setDestinationStaNo1(wrkMast.getStaNo().shortValue()); //工位1目标站点 |
| | |
| | | log.error("RGV命令下发失败,RGV号={},任务数据={}", rgvId, JSON.toJSON(rgvCommand)); |
| | | break runRgv; |
| | | } |
| | | log.error("RGV命令下发成功,RGV号={},任务数据={}", rgvId, JSON.toJSON(rgvCommand)); |
| | | |
| | | wrkMast.setWrkSts(2L); |
| | | wrkMast.setRgvNo(rgvProtocol.getRgvNo()); |
| | | wrkMast.setAppeTime(new Date()); |
| | |
| | | log.error("{}号RGV尚未在数据库进行维护!", rgvSlave.getId()); |
| | | continue; |
| | | } |
| | | |
| | | if (rgvProtocol.getStatusType() == RgvStatusType.WAITING){ |
| | | log.info("{}号小车等待wcs确认,状态{},参数{}",rgvProtocol.getRgvNo(),rgvProtocol.getStatusType(),rgvProtocol); |
| | | } |
| | | // 只有当RGV等待WCS确认、自动 |
| | | if (rgvProtocol.getStatusType() == RgvStatusType.WAITING |
| | | && rgvProtocol.getModeType() == RgvModeType.AUTO |