From ff24cc446cc9fe43aac388912074ed98e73a8ff5 Mon Sep 17 00:00:00 2001 From: wangfei <3597712270@qq.com> Date: 星期五, 20 九月 2024 15:20:43 +0800 Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes --- hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownLoadCacheGlassTask.java | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownLoadCacheGlassTask.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownLoadCacheGlassTask.java index 27d3131..54db40d 100644 --- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownLoadCacheGlassTask.java +++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownLoadCacheGlassTask.java @@ -131,10 +131,12 @@ @Scheduled(fixedDelay = 300) public void plcShelfFull() { List<DownWorkstation> list = downGlassInfoService.queryWorkStationIsFull(); + S7control s7control = S7object.getinstance().plccontrol; + PlcParameterObject plcMesObject = S7object.getinstance().PlcMesObject; if (CollectionUtils.isNotEmpty(list)) { - S7control s7control = S7object.getinstance().plccontrol; - PlcParameterObject plcMesObject = S7object.getinstance().PlcMesObject; s7control.writeWord(plcMesObject.getPlcParameter("alarm_signal").getAddress(), 1); + }else{ + s7control.writeWord(plcMesObject.getPlcParameter("alarm_signal").getAddress(), 0); } } @@ -639,7 +641,9 @@ return Boolean.FALSE; } } else { - if (downStorageCageDetails.getWidth() > maxWidth || downStorageCageDetails.getHeight() > maxHeight) { + double firstLength = Math.max(downStorageCageDetails.getWidth(), downStorageCageDetails.getHeight()); + double secondLength = Math.min(downStorageCageDetails.getWidth(), downStorageCageDetails.getHeight()); + if (firstLength > maxWidth || secondLength > maxHeight) { endCell = Const.G13_WORK_STATION; } else { DownWorkstation workstation; -- Gitblit v1.8.0