| | |
| | | steProtocol = new SteProtocol(); |
| | | } |
| | | steProtocol.setSteNo(slave.getId().shortValue()); |
| | | steProtocol.setMode((short) 0); |
| | | steProtocol.setMode((short) -1); |
| | | steProtocol.setStatus(SteStatusType.OFF_LINE); |
| | | steProtocol.setTaskNo((short) 0); |
| | | steProtocol.setExecute(false); |
| | |
| | | |
| | | // 复位信号 |
| | | if (steProtocol.getWaiting()) { |
| | | News.error("-------------------------------------------第一步、[穿梭车号:{}, 工作号:{}]==>> 状态为3,等待WCS确认!!", |
| | | slave.getId(),steProtocol.getTaskNo()); |
| | | News.error("-------------------------------------------第一步、[穿梭车号:{}, 工作号:{}]==>> 状态为{},等待WCS确认!!", |
| | | slave.getId(),steProtocol.getTaskNo(),steProtocol.getStatus()); |
| | | if (resetFlag) { |
| | | SteCommand steCommand = new SteCommand(); |
| | | steCommand.setComplete(true); |
| | |
| | | } else { |
| | | OutputQueue.STE.offer(MessageFormat.format("【{0}】写入穿梭车plc数据失败 ===>> [id:{1}] [ip:{2}] [port:{3}]", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort())); |
| | | News.error("写入穿梭车plc数据失败 ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); |
| | | |
| | | //写入失败后,重新添加commanddao 任务队列中,并立即回读一次设备状态 |
| | | MessageQueue.offer(SlaveType.Ste, slave.getId(), new Task(2, command)); |
| | | readStatus(); |
| | | |
| | | initSte(); |
| | | return false; |
| | | } |
| | | } |