自动化立体仓库 - WCS系统
#
zjj
2024-05-09 6251bbbb179d3d8946b16184eeb9b3744344cd7c
src/main/java/com/zy/core/thread/SiemensCrnThread.java
@@ -256,9 +256,9 @@
                        || !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){
@@ -316,7 +316,7 @@
                        || !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));
@@ -330,7 +330,7 @@
                    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){
@@ -358,7 +358,7 @@
                                News.error("堆垛机任务确认位"+commandFinish+"写入数据与回读数据不一致!"+"循环执行次数:"+writeCount2+"次");
                            }else{
                                //任务命令写入成功
                                News.info("堆垛机任务确认位"+commandFinish+"回读成功!"+"循环执行次数:"+writeCount2+"次");
//                                News.info("堆垛机任务确认位"+commandFinish+"回读成功!"+"循环执行次数:"+writeCount2+"次");
                                break;
                            }
                        }else {
@@ -371,13 +371,6 @@
            }
        }
//        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 {
            // 日志记录
@@ -405,7 +398,7 @@
        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 {