| | |
| | | Long aLong = (Long) task.getData(); |
| | | rgvOpt(aLong); |
| | | write5(aLong); |
| | | //工位1写入取消数据 |
| | | case 6: |
| | | rgvOpt(); |
| | | write6(); |
| | | break; |
| | | default: |
| | | break; |
| | |
| | | log.error("RGV写入命令保存失败!!"); |
| | | } |
| | | } |
| | | private void rgvOpt() { |
| | | try{ |
| | | BasRgvOptService basRgvOptService = SpringUtils.getBean(BasRgvOptService.class); |
| | | BasRgvOpt basRgvOpt = new BasRgvOpt(rgvProtocol.getTaskNo1().intValue(), rgvProtocol.getRgvNo(), rgvProtocol.getRgvPosI()); |
| | | basRgvOptService.insert(basRgvOpt); |
| | | }catch (Exception e){ |
| | | log.error("RGV写入命令保存失败!!"); |
| | | } |
| | | } |
| | | private boolean write(RgvCommand command) throws InterruptedException { |
| | | if (null == command) { |
| | | log.error("RGV写入命令为空"); |
| | |
| | | } |
| | | } |
| | | |
| | | private void write6(){ |
| | | try { |
| | | siemensNet.Write("DB24.11.1", true); |
| | | |
| | | } catch (Exception ignore) { |
| | | log.error("写入RGV plc工位1漫游数据失败 ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); |
| | | } |
| | | } |
| | | |
| | | private boolean write3(RgvCommand command) throws InterruptedException { |
| | | if (null == command) { |
| | | log.error("RGV写入命令为空"); |