| | |
| | | log.error("更新数据库数据失败 ===>> [id:{}] [ip:{}] [port:{}] [rack:{}] [slot:{}]", slave.getId(), slave.getIp(), slave.getPort(), slave.getRack(), slave.getSlot()); |
| | | } |
| | | |
| | | //出库到182站堆垛机任务数据发送给PLC |
| | | try{ |
| | | WrkMastService wrkMastService = SpringUtils.getBean(WrkMastService.class); |
| | | if(null != wrkMastService){ |
| | | int count = wrkMastService.getOutToStn182(182); |
| | | if(count != PRE_COUNT){ |
| | | OperateResult write = siemensS7Net.Write("DB300.2",(short)count); |
| | | if (write.IsSuccess) { |
| | | PRE_COUNT = count; |
| | | } else { |
| | | log.error("更新堆垛机出库到182站任务数量错误,任务数量==>>" + count); |
| | | } |
| | | } |
| | | } |
| | | }catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("更新堆垛机出库到182站任务数量失败"); |
| | | } |
| | | // //出库到182站堆垛机任务数据发送给PLC |
| | | // try{ |
| | | // WrkMastService wrkMastService = SpringUtils.getBean(WrkMastService.class); |
| | | // if(null != wrkMastService){ |
| | | // int count = wrkMastService.getOutToStn182(182); |
| | | // if(count != PRE_COUNT){ |
| | | // OperateResult write = siemensS7Net.Write("DB300.2",(short)count); |
| | | // if (write.IsSuccess) { |
| | | // PRE_COUNT = count; |
| | | // } else { |
| | | // log.error("更新堆垛机出库到182站任务数量错误,任务数量==>>" + count); |
| | | // } |
| | | // } |
| | | // } |
| | | // }catch (Exception e) { |
| | | // e.printStackTrace(); |
| | | // log.error("更新堆垛机出库到182站任务数量失败"); |
| | | // } |
| | | |
| | | } else { |
| | | OutputQueue.DEVP.offer(MessageFormat.format("【{0}】读取输送线plc状态信息失败 ===>> [id:{1}] [ip:{2}] [port:{3}] [rack:{4}] [slot:{5}]", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort(), slave.getRack(), slave.getSlot())); |