| | |
| | | array[9] = command.getCommand(); |
| | | // array[10] = 0; //备用1 |
| | | |
| | | boolean[] array2 = new boolean[1]; |
| | | array2[0] = command.isTraySize(); |
| | | |
| | | OperateResult result = siemensNet.Write("DB100.0", array); |
| | | OperateResult result2 = siemensNet.Write("DB100.22", array2); |
| | | News.info("堆垛机命令下发[id:{}] >>>>> {}", slave.getId(), array); |
| | | |
| | | //堆垛机任务写入后,回读一次,看是否成功 |
| | |
| | | |
| | | do { |
| | | try{ |
| | | if(!result.IsSuccess || !result2.IsSuccess){ |
| | | if(!result.IsSuccess ){ |
| | | News.error("写入堆垛机plc数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSON(command),writeCount1); |
| | | // MessageQueue.offer(SlaveType.Crn, slave.getId(), new Task(2, command)); |
| | | result = siemensNet.Write("DB100.0", array); |
| | | result2 = siemensNet.Write("DB100.22", array2); |
| | | Thread.sleep(100); |
| | | writeCount1++; |
| | | continue; |
| | |
| | | // MessageQueue.offer(SlaveType.Crn, slave.getId(), new Task(2, command)); |
| | | News.error("写入堆垛机plc数据失败,重新下发任务 回读不一致 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSON(command),writeCount1); |
| | | result = siemensNet.Write("DB100.0", array); |
| | | result2 = siemensNet.Write("DB100.22", array2); |
| | | writeCount1++; |
| | | continue; |
| | | |