From 00830d18352f5208766f8e08113f05a2c4cec5ab Mon Sep 17 00:00:00 2001 From: LENOVO <1793460677@qq.com> Date: Fri, 22 Mar 2024 17:10:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A0=86=E5=9E=9B=E6=9C=BA=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E5=85=A5=E5=BA=93=E6=AC=A1=E6=95=B0=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StandardStackerDeviceDriver.java | 22 +++++++++++++++++-- .../main/java/org/nl/acs/opc/WcsConfig.java | 6 +++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/stacker/standard_stacker/StandardStackerDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/stacker/standard_stacker/StandardStackerDeviceDriver.java index 644c049b1..a1b7bfa5a 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/stacker/standard_stacker/StandardStackerDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/stacker/standard_stacker/StandardStackerDeviceDriver.java @@ -29,6 +29,7 @@ import org.nl.acs.log.service.DeviceExecuteLogService; import org.nl.acs.monitor.DeviceStageMonitor; import org.nl.acs.opc.DeviceAppService; import org.nl.acs.opc.DeviceAppServiceImpl; +import org.nl.acs.opc.WcsConfig; import org.nl.acs.route.service.RouteLineService; import org.nl.acs.route.service.dto.RouteLineDto; import org.nl.acs.route.service.impl.RouteLineServiceImpl; @@ -283,6 +284,11 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme */ Instruction inst = null; + /** + * 入库异常错误限制 + */ + Integer count = 0; + @Override public Device getDevice() { @@ -344,6 +350,10 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme logServer.deviceExecuteLog(this.device_code, "", "", "读取信号值时出现异常:" + var17.getMessage() + ",this.itemProtocol is null:" + ObjectUtil.isEmpty(this.itemProtocol)); } + //不同任务限制清零 + if (!Objects.equals(task, last_task)){ + count = 0; + } if (mode != 3 || requireSucess) { message = "one_message7"; @@ -351,7 +361,11 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme } else if (error != 0) { message = "universal_message3"; //指定库位满入 - if (error == 5) { + if (error == 5 && count< WcsConfig.stacker_error_in_count) { + //相同任务时限制加一 + if (Objects.equals(task, last_task)){ + count++; + } applyUpdatePointCode(StandarStirageErroEnum.FILL.getType()); } //空出 @@ -362,7 +376,11 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme //浅货位有货 if (error == 16) { //放货 - if (cargoMove == 1) { + if (cargoMove == 1 && count< WcsConfig.stacker_error_in_count) { + //相同任务时限制加一 + if (Objects.equals(task, last_task)){ + count++; + } applyUpdatePointCode(StandarStirageErroEnum.BLOCK_OUT.getType()); } else if (cargoMove == 0) { //取货 diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/opc/WcsConfig.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/opc/WcsConfig.java index bf2a71841..8d5564262 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/opc/WcsConfig.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/opc/WcsConfig.java @@ -17,6 +17,12 @@ public class WcsConfig { */ public static String task_container_type_default_desc; + /** + * 堆垛机异常入库次数限制 + */ + public static Integer stacker_error_in_count ; + + /** * 重复的指令下发超时 ms */