| | |
| | | || !command.getSourcePosZ().equals(one.getSourcePosZ()) || !command.getDestinationPosX().equals(one.getDestinationPosX()) |
| | | || !command.getDestinationPosY().equals(one.getDestinationPosY()) || !command.getDestinationPosZ().equals(one.getDestinationPosZ()) |
| | | ){ |
| | | News.error("下发前:[id:{}] >>>>> 写入[{}],===>>回读[{}]", slave.getId(), JSON.toJSON(command),JSON.toJSON(one)); |
| | | // News.error("下发前:[id:{}] >>>>> 写入[{}],===>>回读[{}]", slave.getId(), JSON.toJSON(command),JSON.toJSON(one)); |
| | | } else { |
| | | News.info("下发前:[id:{}] >>>>> 写入[{}],===>>回读[{}]", slave.getId(), JSON.toJSON(command),JSON.toJSON(one)); |
| | | // News.info("下发前:[id:{}] >>>>> 写入[{}],===>>回读[{}]", slave.getId(), JSON.toJSON(command),JSON.toJSON(one)); |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | |
| | | || !command.isTraySize() == one.isTraySize() |
| | | ){ |
| | | try{ |
| | | News.error("堆垛机命令地址写入后回读失败[id:{}] >>>>> 写入[{}],===>>回读[{}]", slave.getId(), JSON.toJSON(command),JSON.toJSON(one)); |
| | | // News.error("堆垛机命令地址写入后回读失败[id:{}] >>>>> 写入[{}],===>>回读[{}]", slave.getId(), JSON.toJSON(command),JSON.toJSON(one)); |
| | | }catch (Exception e){ |
| | | try{ |
| | | News.error("日志打印失败:===>>参数one报错 [id:{}],{}", slave.getId(), JSON.toJSON(command),JSON.toJSON(resultRead)); |
| | |
| | | readStatus(); |
| | | return false; |
| | | } else { |
| | | News.info("堆垛机命令地址写入后回读成功[id:{}] >>>>> 写入[{}],===>>回读[{}]", slave.getId(), JSON.toJSON(command),JSON.toJSON(one)); |
| | | // News.info("堆垛机命令地址写入后回读成功[id:{}] >>>>> 写入[{}],===>>回读[{}]", slave.getId(), JSON.toJSON(command),JSON.toJSON(one)); |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | |
| | | News.error("堆垛机任务确认位"+commandFinish+"写入数据与回读数据不一致!"+"循环执行次数:"+writeCount2+"次"); |
| | | }else{ |
| | | //任务命令写入成功 |
| | | News.info("堆垛机任务确认位"+commandFinish+"回读成功!"+"循环执行次数:"+writeCount2+"次"); |
| | | // News.info("堆垛机任务确认位"+commandFinish+"回读成功!"+"循环执行次数:"+writeCount2+"次"); |
| | | break; |
| | | } |
| | | }else { |
| | |
| | | } |
| | | } |
| | | |
| | | // if (command.getAckFinish() == 0) { |
| | | // short commandFinish = 1; |
| | | // Thread.sleep(200L); |
| | | // result = siemensNet.Write("DB100.18", commandFinish); |
| | | // log.info("堆垛机commandFinish下发[id:{}] >>>>> {}", slave.getId(), commandFinish); |
| | | //// result = siemensNet.Write("DB100.22", commandFinish); |
| | | // } |
| | | |
| | | try { |
| | | // 日志记录 |
| | |
| | | if (result != null && result.IsSuccess) { |
| | | Thread.sleep(200); |
| | | this.readStatus(); |
| | | News.info("堆垛机命令下发[id:{}] >>>>> {}", slave.getId(), JSON.toJSON(command)); |
| | | // News.info("堆垛机命令下发[id:{}] >>>>> {}", slave.getId(), JSON.toJSON(command)); |
| | | OutputQueue.CRN.offer(MessageFormat.format("【{0}】[id:{1}] >>>>> 命令下发: {2}", DateUtils.convert(new Date()), slave.getId(), JSON.toJSON(command))); |
| | | return true; |
| | | } else { |