| | |
| | | log.error("写入输送线站点数据失败。输送线plc编号={},站点数据={}", slave.getId(), JSON.toJSON(staProtocol)); |
| | | } else { |
| | | OutputQueue.DEVP.offer(MessageFormat.format("【{0}】 输送线命令下发 [id:{1}] >>>>> {2}", DateUtils.convert(new Date()), slave.getId(), JSON.toJSON(staProtocol))); |
| | | log.info("输送线命令下发完成 给输送复位 [id:{}] >>>>> 命令下发: {}", slave.getId(), JSON.toJSON(staProtocol)); |
| | | log.info("输送线命令下发完成 给输送复位 [id:{}] >>>>> 命令下发: {}", slave.getId(), JSON.toJSONString(staProtocol)); |
| | | } |
| | | } |
| | | |
| | |
| | | do { |
| | | try{ |
| | | if(!result1.IsSuccess){ |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSON(staProtocol),writeCount); |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSONString(staProtocol),writeCount); |
| | | result1 = siemensS7Net.Write(resultV1, resultS1); |
| | | Thread.sleep(100); |
| | | writeCount++; |
| | |
| | | if (status == 1){ |
| | | break; |
| | | } else { |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSON(staProtocol),writeCount); |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSONString(staProtocol),writeCount); |
| | | result1 = siemensS7Net.Write(resultV1, resultS1); |
| | | Thread.sleep(100); |
| | | writeCount++; |
| | | continue; |
| | | } |
| | | } else { |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSON(staProtocol),writeCount); |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSONString(staProtocol),writeCount); |
| | | result1 = siemensS7Net.Write(resultV1, resultS1); |
| | | Thread.sleep(100); |
| | | writeCount++; |
| | |
| | | do { |
| | | try{ |
| | | if(!result2.IsSuccess){ |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSON(staProtocol),writeCount); |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSONString(staProtocol),writeCount); |
| | | result2 = siemensS7Net.Write(resultV1, resultS2); |
| | | |
| | | Thread.sleep(100); |
| | |
| | | if (status == resultS2){ |
| | | break; |
| | | } else { |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSON(staProtocol),writeCount); |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSONString(staProtocol),writeCount); |
| | | result2 = siemensS7Net.Write(resultV1, resultS2); |
| | | Thread.sleep(100); |
| | | writeCount++; |
| | | continue; |
| | | } |
| | | } else { |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSON(staProtocol),writeCount); |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSONString(staProtocol),writeCount); |
| | | result2 = siemensS7Net.Write(resultV1, resultS2); |
| | | Thread.sleep(100); |
| | | writeCount++; |
| | |
| | | do { |
| | | try{ |
| | | if(!result1.IsSuccess){ |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSON(staProtocol),writeCount); |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSONString(staProtocol),writeCount); |
| | | result1 = siemensS7Net.Write(resultV1, resultS1); |
| | | Thread.sleep(100); |
| | | writeCount++; |
| | |
| | | if (statusR1 == resultS1){ |
| | | break; |
| | | } else { |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSON(staProtocol),writeCount); |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSONString(staProtocol),writeCount); |
| | | result1 = siemensS7Net.Write(resultV1, resultS1); |
| | | Thread.sleep(100); |
| | | writeCount++; |
| | | continue; |
| | | } |
| | | } else { |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSON(staProtocol),writeCount); |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSONString(staProtocol),writeCount); |
| | | result1 = siemensS7Net.Write(resultV1, resultS1); |
| | | Thread.sleep(100); |
| | | writeCount++; |
| | |
| | | do { |
| | | try{ |
| | | if(!result2.IsSuccess){ |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSON(staProtocol),writeCount); |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSONString(staProtocol),writeCount); |
| | | result2 = siemensS7Net.Write(resultV1, resultS2); |
| | | Thread.sleep(100); |
| | | writeCount++; |
| | |
| | | if (statusR1 == resultS2){ |
| | | break; |
| | | } else { |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSON(staProtocol),writeCount); |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSONString(staProtocol),writeCount); |
| | | result2 = siemensS7Net.Write(resultV1, resultS2); |
| | | |
| | | Thread.sleep(100); |
| | |
| | | continue; |
| | | } |
| | | } else { |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSON(staProtocol),writeCount); |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSONString(staProtocol),writeCount); |
| | | result2 = siemensS7Net.Write(resultV1, resultS2); |
| | | Thread.sleep(100); |
| | | writeCount++; |
| | |
| | | do { |
| | | try{ |
| | | if(!result1.IsSuccess){ |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSON(staProtocol),writeCount); |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSONString(staProtocol),writeCount); |
| | | result1 = siemensS7Net.Write(resultV1, resultS1); |
| | | Thread.sleep(100); |
| | | writeCount++; |
| | |
| | | if (transInt16 == resultS1){ |
| | | break; |
| | | } else { |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSON(staProtocol),writeCount); |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSONString(staProtocol),writeCount); |
| | | result1 = siemensS7Net.Write(resultV1, resultS1); |
| | | Thread.sleep(100); |
| | | writeCount++; |
| | | continue; |
| | | } |
| | | } else { |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSON(staProtocol),writeCount); |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSONString(staProtocol),writeCount); |
| | | result1 = siemensS7Net.Write(resultV1, resultS1); |
| | | Thread.sleep(100); |
| | | writeCount++; |
| | |
| | | do { |
| | | try{ |
| | | if(!result2.IsSuccess){ |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSON(staProtocol),writeCount); |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSONString(staProtocol),writeCount); |
| | | result2 = siemensS7Net.Write(resultV2, resultS1); |
| | | Thread.sleep(100); |
| | | writeCount++; |
| | |
| | | if (transInt16 == resultS1){ |
| | | break; |
| | | } else { |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSON(staProtocol),writeCount); |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSONString(staProtocol),writeCount); |
| | | result2 = siemensS7Net.Write(resultV2, resultS1); |
| | | Thread.sleep(100); |
| | | writeCount++; |
| | | continue; |
| | | } |
| | | } else { |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSON(staProtocol),writeCount); |
| | | log.error("写入RGV数据失败,重新下发任务 写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSONString(staProtocol),writeCount); |
| | | result2 = siemensS7Net.Write(resultV2, resultS1); |
| | | Thread.sleep(100); |
| | | writeCount++; |
| | |
| | | |
| | | if (!result1.IsSuccess) { |
| | | staProtocol = station.get(staProtocol.getSiteId()); |
| | | OutputQueue.DEVP.offer(MessageFormat.format("【{0}】写入输送线站点数据失败。输送线plc编号={1},站点数据={2}", slave.getId(), JSON.toJSON(staProtocol))); |
| | | log.error("写入输送线站点数据失败。输送线plc编号={},站点数据={}", slave.getId(), JSON.toJSON(staProtocol)); |
| | | OutputQueue.DEVP.offer(MessageFormat.format("【{0}】写入输送线站点数据失败。输送线plc编号={1},站点数据={2}", slave.getId(), JSON.toJSONString(staProtocol))); |
| | | log.error("写入输送线站点数据失败。输送线plc编号={},站点数据={}", slave.getId(), JSON.toJSONString(staProtocol)); |
| | | } else { |
| | | OutputQueue.DEVP.offer(MessageFormat.format("【{0}】 输送线命令下发 [id:{1}] >>>>> {2}", DateUtils.convert(new Date()), slave.getId(), JSON.toJSON(staProtocol))); |
| | | log.info("输送线命令下发完成 给输送复位 [id:{}] >>>>> 命令下发: {}", slave.getId(), JSON.toJSON(staProtocol)); |
| | | OutputQueue.DEVP.offer(MessageFormat.format("【{0}】 输送线命令下发 [id:{1}] >>>>> {2}", DateUtils.convert(new Date()), slave.getId(), JSON.toJSONString(staProtocol))); |
| | | log.info("输送线命令下发完成 给输送复位 [id:{}] >>>>> 命令下发: {}", slave.getId(), JSON.toJSONString(staProtocol)); |
| | | } |
| | | } |
| | | |