自动化立体仓库 - WCS系统
#
yxFwq
2024-11-22 45943c779909587c4457226df41015412ef7abbd
src/main/java/com/zy/core/thread/RgvThread.java
@@ -185,6 +185,7 @@
                    rgvProtocol = new RgvProtocol();
                    rgvProtocol.setRgvNo(slave.getId());
                }
                rgvProtocol.setRgvNo(slave.getId());
                rgvProtocol.setMode(siemensNet.getByteTransform().TransInt16(result.Content, 0));
                rgvProtocol.setStatus(siemensNet.getByteTransform().TransInt16(result.Content, 2));
                rgvProtocol.setTaskNo1(siemensNet.getByteTransform().TransInt16(result.Content, 4));
@@ -371,8 +372,8 @@
        if (result != null && result.IsSuccess) {
            Thread.sleep(200);
            this.readStatus();
            log.info("RGV 工位1命令下发[id:{}] >>>>> {}", slave.getId(), JSON.toJSON(command));
            OutputQueue.RGV.offer(MessageFormat.format("【{0}】[id:{1}] >>>>> 工位1命令下发: {2}", DateUtils.convert(new Date()), slave.getId(), JSON.toJSON(command)));
            log.info("RGV 工位1命令下发[id:{}] >>>>> {}", slave.getId(), JSON.toJSONString(command));
            OutputQueue.RGV.offer(MessageFormat.format("【{0}】[id:{1}] >>>>> 工位1命令下发: {2}", DateUtils.convert(new Date()), slave.getId(), JSON.toJSONString(command)));
            return true;
        } else {
            OutputQueue.RGV.offer(MessageFormat.format("【{0}】写入RGV plc工位1数据失败 ===>> [id:{1}] [ip:{2}] [port:{3}]", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort()));
@@ -430,8 +431,8 @@
        if (result != null && result.IsSuccess) {
            Thread.sleep(200);
            this.readStatus();
            log.info("RGV 工位2命令下发[id:{}] >>>>> {}", slave.getId(), JSON.toJSON(command));
            OutputQueue.RGV.offer(MessageFormat.format("【{0}】[id:{1}] >>>>> 工位2命令下发: {2}", DateUtils.convert(new Date()), slave.getId(), JSON.toJSON(command)));
            log.info("RGV 工位2命令下发[id:{}] >>>>> {}", slave.getId(), JSON.toJSONString(command));
            OutputQueue.RGV.offer(MessageFormat.format("【{0}】[id:{1}] >>>>> 工位2命令下发: {2}", DateUtils.convert(new Date()), slave.getId(), JSON.toJSONString(command)));
            return true;
        } else {
            OutputQueue.RGV.offer(MessageFormat.format("【{0}】写入RGV plc工位2数据失败 ===>> [id:{1}] [ip:{2}] [port:{3}]", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort()));