src/main/java/com/zy/asrs/controller/CrnController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/zy/asrs/domain/vo/CrnStateTableVo.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/zy/core/thread/SiemensCrnThread.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/webapp/views/crn.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/zy/asrs/controller/CrnController.java
@@ -127,8 +127,15 @@ vo.setLoading(crnProtocol.getLoaded()==1?"有物":"无物"); // 有物 vo.setBay(crnProtocol.getBay()); // 列 vo.setLev(crnProtocol.getLevel()); // 层 vo.setXOrigin(crnProtocol.getBay()==1?"是":"否"); // 走行原点 vo.setYOrigin(crnProtocol.getLevel()==1?"是":"否"); // 升降原点 vo.setLiftPos(crnProtocol.getLiftPosType().desc); if (crnProtocol.getPlatformHigh()) { vo.setSitePos("站台高位"); } if (crnProtocol.getPlatformLow()) { vo.setSitePos("站台高位"); } // vo.setXOrigin(crnProtocol.getBay()==1?"是":"否"); // 走行原点 // vo.setYOrigin(crnProtocol.getLevel()==1?"是":"否"); // 升降原点 vo.setForkOffset(crnProtocol.getForkPosType().desc); // 货叉位置 vo.setXLocation(crnProtocol.getWalkPos() == 1?"是":"否"); // 走行定位 vo.setYLocation(crnProtocol.getLiftPosType().equals(CrnLiftPosType.NONE)?"否":"是"); // 升降定位 src/main/java/com/zy/asrs/domain/vo/CrnStateTableVo.java
@@ -29,6 +29,12 @@ // 升降原点 private String yOrigin = "-"; // 伸位高低 private String liftPos = "-"; // 站台高低 private String sitePos = "-"; // 走行定位 private String xLocation = "-"; @@ -38,8 +44,8 @@ // 货叉位置 private String forkOffset = "-"; // 载货台位置 private String liftPos = "-"; // // 载货台位置 // private String liftPos = "-"; // 急停 private String stop = "-"; src/main/java/com/zy/core/thread/SiemensCrnThread.java
@@ -243,15 +243,15 @@ log.error("堆垛机写入命令为空"); return false; } if (command.getTaskNo() == 0) { if (command.getTaskNo() == 0 && command.getAckFinish() == 0) { command.setTaskNo((short) 9999); } command.setCrnNo(slave.getId()); short[] array = new short[9]; if (!command.getTaskModeType().equals(CrnTaskModeType.CLEAR)) { if (command.getAckFinish() == 0) { array[0] = 5; } else { array[0] = 7; array[0] = 0; } array[1] = command.getSourcePosZ(); array[2] = command.getSourcePosY(); @@ -263,10 +263,17 @@ array[8] = command.getDestinationStaNo(); // 作业信息 OperateResult result = siemensNet.Write("DB1000.0", array); // 任务号 OperateResult result1 = siemensNet.Write("DB1000.24", command.getTaskNo()); // 任务号 + 完成位 short[] array2 = new short[2]; array2[0] = command.getTaskNo(); array2[1] = command.getAckFinish(); OperateResult result1 = siemensNet.Write("DB1000.24", array2); // 结束位 OperateResult result2 = siemensNet.Write("DB1000.28.1", true); if (command.getAckFinish() == 0) { OperateResult result2 = siemensNet.Write("DB1000.28.1", true); } // 日志记录 try { if (command.getAckFinish() != 1) { @@ -292,7 +299,7 @@ } } catch (Exception ignore) {} if (result.IsSuccess && result1.IsSuccess && result2.IsSuccess) { if (result.IsSuccess && result1.IsSuccess) { log.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))); src/main/webapp/views/crn.html
@@ -70,8 +70,8 @@ <th>有物</th> <th>列</th> <th>层</th> <th>走行原点</th> <th>升降原点</th> <th>伸位高低</th> <th>站台高低</th> <th>货叉位置</th> <th>走行定位</th> <th>升降定位</th> @@ -287,8 +287,8 @@ setVal(tr.children("td").eq(3), table[i-1].loading); setVal(tr.children("td").eq(4), table[i-1].bay); setVal(tr.children("td").eq(5), table[i-1].lev); setVal(tr.children("td").eq(6), table[i-1].xorigin); setVal(tr.children("td").eq(7), table[i-1].yorigin); setVal(tr.children("td").eq(6), table[i-1].liftPos); setVal(tr.children("td").eq(7), table[i-1].sitePos); setVal(tr.children("td").eq(8), table[i-1].forkOffset); setVal(tr.children("td").eq(9), table[i-1].xlocation); setVal(tr.children("td").eq(10), table[i-1].ylocation);