| | |
| | | hollowRemoveChildTask("CMJ2.CMJ2."); |
| | | } |
| | | |
| | | private void hollowRemoveChildTask(String cell) throws Exception { |
| | | private void hollowRemoveChildTask(String cell) throws Exception { |
| | | ReadWriteEntity requestEntity = miloService.readFromOpcUa(cell + "mesControl"); |
| | | if ("0".equals(requestEntity.getValue() + "")) { |
| | | log.info("当前除膜机为单机状态"); |
| | |
| | | } |
| | | int request = Integer.parseInt(requestEntity.getValue() + ""); |
| | | int flagRequest = request & 3; |
| | | ReadWriteEntity glassIdEntity = miloService.readFromOpcUa(cell + "glassId"); |
| | | log.info("除膜{}获取当前的信号为:{},玻璃id:{}", cell, flagRequest, glassIdEntity); |
| | | if (flagRequest != 3) { |
| | | log.info("当前未收到请求玻璃id数据,结束任务"); |
| | | return; |
| | | } |
| | | ReadWriteEntity glassIdEntity = miloService.readFromOpcUa(cell + "glassId"); |
| | | |
| | | log.info("除膜{}获取当前的玻璃id:{}", cell, glassIdEntity); |
| | | if (null == glassIdEntity.getValue() || StringUtils.isBlank(glassIdEntity.getValue() + "")) { |
| | | log.info("当前未收到玻璃id数据,结束任务"); |
| | | return; |
| | | } |
| | | log.info("当前需要除膜的玻璃id为:{}", glassIdEntity.getValue() + ""); |
| | | //按照玻璃id获取对应的任务id |
| | | HollowGlassFormulaVO detailsVO = hollowFormulaDetailsService.queryFormulaDetailsByGlassId(glassIdEntity.getValue() + "", null, null); |
| | | if (null == detailsVO) { |
| | |
| | | |
| | | List<ReadWriteEntity> ualist = new ArrayList<>(); |
| | | List<ReadWriteEntity> wordlist = new ArrayList<>(); |
| | | |
| | | log.info("除膜{}获取玻璃{},是否除膜:{}", cell, glassIdEntity.getValue(), detailsVO.getFilmRemove()); |
| | | if (detailsVO.getFilmRemove() == 0) { |
| | | // 10111011 |
| | | int sendId = request & 63; |
| | |
| | | } |
| | | //向电气发送清楚信号 |
| | | int sendId = request & 251; |
| | | log.info("{}收到除膜机ID接收完成信号,将写入数据完成置0,发送数据为:{}", cell, sendId); |
| | | List<ReadWriteEntity> list = new ArrayList<>(); |
| | | list.add(opcPlcStorageCageHollowTask.generateReadWriteEntity(cell + "mesControl", sendId)); |
| | | miloService.writeToOpcWord(list); |