fix: 堆垛机异常入库次数限制

This commit is contained in:
2024-03-22 17:10:32 +08:00
parent 7d5a0d61dc
commit 00830d1835
2 changed files with 26 additions and 2 deletions

View File

@@ -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) {
//取货

View File

@@ -17,6 +17,12 @@ public class WcsConfig {
*/
public static String task_container_type_default_desc;
/**
* 堆垛机异常入库次数限制
*/
public static Integer stacker_error_in_count ;
/**
* 重复的指令下发超时 ms
*/