| | |
| | | errMsg = "扫码失败"; |
| | | back = true; |
| | | } |
| | | |
| | | // 退回 |
| | | if (back) { |
| | | log.info("errmsg: " + errMsg); |
| | | // News.warn("扫码入库失败,{}入库站因{}异常,托盘已被退回", inSta.getStaNo(), errMsg); |
| | | MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(3, errMsg)); |
| | | |
| | |
| | | StartupDto dto = jsonObject.getObject("data", StartupDto.class); |
| | | barcodeThread.setBarcode(""); |
| | | staProtocol.setWorkNo(dto.getWorkNo()); |
| | | staProtocol.setStaNo(RouteUtils.SouStaEnd(dto.getStaNo(),dto.getSourceStaNo())); |
| | | //staProtocol.setStaNo(RouteUtils.SouStaEnd(dto.getStaNo(),dto.getSourceStaNo())); |
| | | staProtocol.setStaNo(dto.getStaNo().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | log.error("输送线下发2:"+dto.getWorkNo()+","+dto.getStaNo()); |
| | |
| | | crnCommand.setSourcePosX(crnStn.getRow().shortValue()); // 源库位排 |
| | | crnCommand.setSourcePosY(crnStn.getBay().shortValue()); // 源库位列 |
| | | crnCommand.setSourcePosZ(crnStn.getLev().shortValue()); // 源库位层 |
| | | crnCommand.setDestinationPosX(locMast.getRow1().shortValue()); // 目标库位排 |
| | | crnCommand.setDestinationPosY(locMast.getBay1().shortValue()); // 目标库位列 |
| | | crnCommand.setDestinationPosZ(locMast.getLev1().shortValue()); // 目标库位层 |
| | | crnCommand.setDestinationPosX((short)(locMast.getRow1()+slave.getOffset())); // 目标库位排 |
| | | crnCommand.setDestinationPosY((short)(locMast.getBay1()+slave.getOffset())); // 目标库位列 |
| | | crnCommand.setDestinationPosZ((short)(locMast.getLev1()+slave.getOffset())); // 目标库位层 |
| | | crnCommand.setTraySize(locMast.getLocType1() == 2); |
| | | if (!MessageQueue.offer(SlaveType.Crn, wrkMast.getCrnNo(), new Task(2, crnCommand))) { |
| | | News.error(""+mark+" - 1"+" - 16"+" - 堆垛机命令下发失败,堆垛机号={},任务数据={}", wrkMast.getCrnNo(), JSON.toJSON(crnCommand)); |
| | |
| | | crnCommand.setTaskNo(wrkMast.getWrkNo().shortValue()); // 工作号 |
| | | // crnCommand.setAckFinish((short) 0); // 任务完成确认位 |
| | | crnCommand.setTaskMode(CrnTaskModeType.LOC_MOVE); // 任务模式: 库位移转 |
| | | crnCommand.setSourcePosX(sourceSta.getRow1().shortValue()); // 源库位排 |
| | | crnCommand.setSourcePosY(sourceSta.getBay1().shortValue()); // 源库位列 |
| | | crnCommand.setSourcePosZ(sourceSta.getLev1().shortValue()); // 源库位层 |
| | | crnCommand.setSourcePosX((short)(sourceSta.getRow1()+slave.getOffset())); // 源库位排 |
| | | crnCommand.setSourcePosY((short)(sourceSta.getBay1()+slave.getOffset())); // 源库位列 |
| | | crnCommand.setSourcePosZ((short)(sourceSta.getLev1()+slave.getOffset())); // 源库位层 |
| | | crnCommand.setDestinationPosX(crnStn.getRow().shortValue()); // 目标库位排 |
| | | crnCommand.setDestinationPosY(crnStn.getBay().shortValue()); // 目标库位列 |
| | | crnCommand.setDestinationPosZ(crnStn.getLev().shortValue()); // 目标库位层 |
| | |
| | | |
| | | // 更新站点信息 且 下发plc命令 |
| | | staProtocol.setWorkNo(dto.getWorkNo()); |
| | | staProtocol.setStaNo(staProtocol.getSiteId().shortValue()); |
| | | staProtocol.setStaNo(dto.getStaNo().shortValue()); |
| | | //staProtocol.setStaNo(staProtocol.getSiteId().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | log.error("输送线下发6:"+dto.getWorkNo()+","+staProtocol.getSiteId()); |