fix: 堆垛机异常报警重新下发

This commit is contained in:
2024-05-14 20:20:19 +08:00
parent 00d823ccd3
commit 1a0e0fe86c

View File

@@ -588,11 +588,11 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
} }
//空出直接完结指令 //空出直接完结指令
if (error == 6) { if (error == 6) {
//清警
cleanErro();
Instruction instruction = checkInst(); Instruction instruction = checkInst();
try { try {
finish_instruction(instruction); finish_instruction(instruction);
//清警
cleanErro();
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
@@ -806,7 +806,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
String startDeviceCode = instructionErro.getStart_device_code(); String startDeviceCode = instructionErro.getStart_device_code();
Device startDeviceError = deviceAppService.findDeviceByCode(startDeviceCode); Device startDeviceError = deviceAppService.findDeviceByCode(startDeviceCode);
if (StrUtil.equals(startDevice.getDevice_type(), DeviceType.conveyor.name())) { if (StrUtil.equals(startDevice.getDevice_type(), DeviceType.conveyor.name())) {
pakagePLCData(list, startDeviceError.getExtraValue().get("x").toString(), startDeviceError.getExtraValue().get("y").toString(), startDeviceError.getExtraValue().get("z").toString(), instructionErro.getExecute_code(), instructionErro.getInstruction_code()); pakagePLCData(list, startDeviceError.getExtraValue().get("x").toString(), startDeviceError.getExtraValue().get("z").toString(), startDeviceError.getExtraValue().get("y").toString(), instructionErro.getExecute_code(), instructionErro.getInstruction_code());
requireSucess = true; requireSucess = true;
return true; return true;
} }
@@ -839,7 +839,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
Device nextDevice = deviceAppService.findDeviceByCode(next_device_code); Device nextDevice = deviceAppService.findDeviceByCode(next_device_code);
List list = new ArrayList(); List list = new ArrayList();
if (StrUtil.equals(startDevice.getDevice_type(), DeviceType.conveyor.name())) { if (StrUtil.equals(startDevice.getDevice_type(), DeviceType.conveyor.name())) {
pakagePLCData(list, nextDevice.getExtraValue().get("x").toString(), nextDevice.getExtraValue().get("y").toString(), nextDevice.getExtraValue().get("z").toString(), instructionErro.getExecute_code(), instructionErro.getInstruction_code()); pakagePLCData(list, nextDevice.getExtraValue().get("x").toString(), nextDevice.getExtraValue().get("z").toString(), nextDevice.getExtraValue().get("y").toString(), instructionErro.getExecute_code(), instructionErro.getInstruction_code());
requireSucess = true; requireSucess = true;
return true; return true;
} }