| | |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.zy.asrs.service.BasDevpService; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.core.DevpThread; |
| | | import com.zy.core.cache.MessageQueue; |
| | | import com.zy.core.cache.OutputQueue; |
| | |
| | | add(160);add(161);add(162);add(163);add(164);add(165);add(166);add(167);add(168);add(169); |
| | | add(170);add(171);add(172);add(173);add(174);add(175);add(176);add(177);add(178);add(179); |
| | | add(180);add(181);add(182); |
| | | add(183);add(184);add(185);add(186);add(187);add(188);add(189); |
| | | add(190);add(191);add(192); |
| | | add(183);add(184);add(185);add(186);add(187);add(188);add(189);add(190);add(191);add(192); |
| | | }}; |
| | | |
| | | public IoModeType ioMode = IoModeType.NONE; |
| | | /** |
| | | * 182站堆垛机执行中出库数量 |
| | | */ |
| | | public int PRE_COUNT=0; |
| | | |
| | | public SiemensDevpThread(DevpSlave slave) { |
| | | this.slave = slave; |
| | |
| | | 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站任务数量失败"); |
| | | } |
| | | |
| | | } 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())); |
| | | // log.error("读取输送线plc状态信息失败 ===>> [id:{}] [ip:{}] [port:{}] [rack:{}] [slot:{}]", slave.getId(), slave.getIp(), slave.getPort(), slave.getRack(), slave.getSlot()); |