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 */