src/main/java/com/zy/asrs/controller/CrnController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/zy/core/enums/CrnLiftPosType.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/zy/core/thread/SiemensCrnThread.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/application.yml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/zy/asrs/controller/CrnController.java
@@ -394,8 +394,18 @@ if (param.getCrnNo() == null) { throw new CoolException("请选择堆垛机"); } MessageQueue.clear(SlaveType.Crn, param.getCrnNo()); return R.ok("清除命令成功"); CrnCommand command = new CrnCommand(); command.setCrnNo(param.getCrnNo()); // 堆垛机编号 command.setTaskNo((short) 0); // 工作号 command.setAckFinish((short) 0); // 任务完成确认位 command.setTaskMode(CrnTaskModeType.NONE); // 任务模式 command.setSourcePosX((short) 0); // 源库位排 command.setSourcePosY((short) 0); // 源库位列 command.setSourcePosZ((short) 0); // 源库位层 command.setDestinationPosX((short) 0); // 目标库位排 command.setDestinationPosY((short) 0); // 目标库位列 command.setDestinationPosZ((short) 0); // 目标库位层 return crnControl(command)?R.ok():R.error(); } @ManagerAuth(memo = "手动复位") src/main/java/com/zy/core/enums/CrnLiftPosType.java
@@ -3,9 +3,11 @@ public enum CrnLiftPosType { ERROR(-1, "未知"), // 不在定位 DOWN(0, "下定位"), // UP(1, "上定位"), // NONE(2, "不在定位"), // 不在定位 NONE(0, "不在定位"), // 不在定位 _DOWN(1, "双深低位"), // DOWN(2, "单深低位"), // _UP(3, "单深高位"), // UP(4, "双深高位"), // ; public Integer id; src/main/java/com/zy/core/thread/SiemensCrnThread.java
@@ -151,6 +151,7 @@ if (result.IsSuccess) { if (null == crnProtocol) { crnProtocol = new CrnProtocol(); crnProtocol.setCrnNo(slave.getId()); } crnProtocol.setMode(siemensNet.getByteTransform().TransInt16(result.Content, 0)); crnProtocol.setTaskNo(siemensNet.getByteTransform().TransInt16(result.Content, 2)); @@ -231,9 +232,9 @@ log.error("堆垛机写入命令为空"); return false; } convertRow(command); // convertRow(command); command.setCrnNo(slave.getId()); short[] array = new short[12]; short[] array = new short[10]; array[0] = command.getAckFinish(); array[1] = command.getTaskNo(); array[2] = command.getTaskMode(); @@ -243,14 +244,15 @@ array[6] = command.getDestinationPosX(); array[7] = command.getDestinationPosY(); array[8] = command.getDestinationPosZ(); array[9] = command.getSourceStaNo(); array[10] = command.getDestinationStaNo(); array[11] = command.getCommand(); // array[9] = command.getSourceStaNo(); // array[10] = command.getDestinationStaNo(); array[9] = command.getCommand(); OperateResult result = siemensNet.Write("DB100.0", array); if (command.getAckFinish() == 0) { short commandFinish = 1; result = siemensNet.Write("DB100.22", commandFinish); Thread.sleep(100L); result = siemensNet.Write("DB100.18", commandFinish); } try { src/main/resources/application.yml
@@ -47,8 +47,10 @@ # 堆垛机1 crn[0]: id: 1 ip: 10.10.10.10 port: 8888 ip: 10.10.10.101 port: 102 rack: 0 slot: 0 # 偏移量,当堆垛机站点列号=1时,偏移量=2 offset: 2 demo: false @@ -69,8 +71,10 @@ # 堆垛机2 crn[1]: id: 2 ip: 10.10.10.13 port: 8888 ip: 10.10.10.111 port: 102 rack: 0 slot: 0 # 偏移量,当堆垛机站点列号=1时,偏移量=2 offset: 2 demo: false @@ -91,8 +95,10 @@ # 堆垛机3 crn[2]: id: 3 ip: 10.10.10.16 port: 8888 ip: 10.10.10.121 port: 102 rack: 0 slot: 0 # 偏移量,当堆垛机站点列号=1时,偏移量=2 offset: 2 demo: false