| | |
| | | @Value("${mes.maxHeight}") |
| | | private Integer maxHeight; |
| | | |
| | | @Value("${mes.minWidth}") |
| | | private Integer minWidth; |
| | | |
| | | @Scheduled(fixedDelay = 1000) |
| | | @Value("${mes.minHeight}") |
| | | private Integer minHeight; |
| | | |
| | | |
| | | @Scheduled(fixedDelay = 3000) |
| | | public void plcHomeEdgTask() { |
| | | PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject; |
| | | PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject; |
| | | String requestWord = plcParameterObject.getPlcParameter("requestWord").getValue(); |
| | | String glassIdeValue = plcParameterObject.getPlcParameter("requestID").getValue(); |
| | | //A08 A09表示线路相同 可做等价 无数据转int异常 |
| | |
| | | String confirmationWrodValue = plcParameterObject.getPlcParameter("confirmationWord").getValue(); |
| | | String confirmationWrodAddress = plcParameterObject.getPlcParameter("confirmationWord").getAddress(); |
| | | String currentSlot = plcParameterObject.getPlcParameter("currentCell").getValue(); |
| | | |
| | | |
| | | |
| | | log.info("1、获取到的请求字为:{},获取到的扫描ID为:{},获取到的确认字为:{},获取到的出片状态分别为:g06:{}、g08:{}、g11:{}、g13:{},当前格子号为:{}", |
| | | requestWord, glassIdeValue, confirmationWrodValue, out06Glassstate, out08Glassstate, out11Glassstate, out13Glassstate, currentSlot); |
| | |
| | | inTo(glassIdeValue, requestWord, currentSlot); |
| | | } else if ("2".equals(requestWord)) { |
| | | //09空闲 :1 10空闲 :2 都空闲:3 其他0 |
| | | log.info("2、出片请求,且确认字为0,执行进片任务"); |
| | | log.info("2、出片请求,且确认字为0,执行出片任务"); |
| | | outTo(out06Glassstate, out08Glassstate, out11Glassstate, out13Glassstate, glassIdeValue, currentSlot); |
| | | } else if ("3".equals(requestWord)) { |
| | | log.info("2、进片和出片都空闲,执行出片任务"); |
| | |
| | | } |
| | | Boolean checkFlag = Boolean.FALSE; |
| | | //玻璃尺寸是否走人工下片 |
| | | if (glassInfo.getWidth() > maxWidth || glassInfo.getHeight() > maxHeight) { |
| | | log.info("该玻璃尺寸走人工下片,直接进片"); |
| | | } else { |
| | | if (glassInfo.getWidth() > maxWidth || glassInfo.getHeight() > maxHeight || glassInfo.getWidth() < minWidth || glassInfo.getHeight() < minHeight) { |
| | | log.info("该玻璃尺寸不符合要求,需要走人工下片直接进片"); |
| | | } |
| | | else { |
| | | log.info("该玻璃尺寸非人工下片"); |
| | | //获取该玻璃的流程卡是否已绑定架子 |
| | | DownWorkstation one = downWorkstationService.getOne(new LambdaQueryWrapper<DownWorkstation>() |