fix: 堆垛机异常入库次数限制
This commit is contained in:
@@ -29,6 +29,7 @@ import org.nl.acs.log.service.DeviceExecuteLogService;
|
|||||||
import org.nl.acs.monitor.DeviceStageMonitor;
|
import org.nl.acs.monitor.DeviceStageMonitor;
|
||||||
import org.nl.acs.opc.DeviceAppService;
|
import org.nl.acs.opc.DeviceAppService;
|
||||||
import org.nl.acs.opc.DeviceAppServiceImpl;
|
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.RouteLineService;
|
||||||
import org.nl.acs.route.service.dto.RouteLineDto;
|
import org.nl.acs.route.service.dto.RouteLineDto;
|
||||||
import org.nl.acs.route.service.impl.RouteLineServiceImpl;
|
import org.nl.acs.route.service.impl.RouteLineServiceImpl;
|
||||||
@@ -283,6 +284,11 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
*/
|
*/
|
||||||
Instruction inst = null;
|
Instruction inst = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入库异常错误限制
|
||||||
|
*/
|
||||||
|
Integer count = 0;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Device getDevice() {
|
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));
|
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) {
|
if (mode != 3 || requireSucess) {
|
||||||
message = "one_message7";
|
message = "one_message7";
|
||||||
@@ -351,7 +361,11 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
} else if (error != 0) {
|
} else if (error != 0) {
|
||||||
message = "universal_message3";
|
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());
|
applyUpdatePointCode(StandarStirageErroEnum.FILL.getType());
|
||||||
}
|
}
|
||||||
//空出
|
//空出
|
||||||
@@ -362,7 +376,11 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
//浅货位有货
|
//浅货位有货
|
||||||
if (error == 16) {
|
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());
|
applyUpdatePointCode(StandarStirageErroEnum.BLOCK_OUT.getType());
|
||||||
} else if (cargoMove == 0) {
|
} else if (cargoMove == 0) {
|
||||||
//取货
|
//取货
|
||||||
|
|||||||
@@ -17,6 +17,12 @@ public class WcsConfig {
|
|||||||
*/
|
*/
|
||||||
public static String task_container_type_default_desc;
|
public static String task_container_type_default_desc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 堆垛机异常入库次数限制
|
||||||
|
*/
|
||||||
|
public static Integer stacker_error_in_count ;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重复的指令下发超时 ms
|
* 重复的指令下发超时 ms
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user