| | |
| | | // private RgvProtocol rgvProtocol; |
| | | private TaskProtocolCache taskProtocolCache = new TaskProtocolCache(); |
| | | // # 轨道总长 |
| | | private Long trackEntireLength = 246600L; |
| | | private Long trackEntireLength = 240000L; |
| | | //# 轨道基准点 |
| | | private Long trackBenchmark = 1L; |
| | | // # 避让距离 |
| | | private Long avoidDistance = 7000L; |
| | | private Long avoidDistance = 14000L; |
| | | private String errorRgv = "-"; |
| | | |
| | | /** |
| | |
| | | if (rgvProtocol == null) { |
| | | rgvProtocol = new RgvProtocol(); |
| | | } |
| | | if (rgvProtocol.getStatusType().equals(RgvStatusType.WAITING)){ |
| | | if (rgvProtocol.getStatusType().equals(RgvStatusType.WAITING) || rgvProtocol.getStatusType().equals(RgvStatusType.FETCHWAITING)){ |
| | | OperateResult result2 = siemensNet.Write("DB100.2",(int) 0); |
| | | OperateResult result = siemensNet.Write("DB100.14", (int) 0); |
| | | OperateResult result1 = siemensNet.Write("DB100.6", (short) 0); |
| | | OperateResult result4 = siemensNet.Write("DB100.0", (short) 1); |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | * 写入数据 |
| | | */ |
| | | private boolean write(TaskProtocol taskProtocol) throws InterruptedException { |
| | | Thread.sleep(50L); |
| | | if (null == taskProtocol) { |
| | | log.error("RGV写入命令为空 ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); |
| | | |