add:刻字机取放货判断工作模式

This commit is contained in:
2023-07-06 16:31:42 +08:00
parent 5d7c70570d
commit 3d1b6119e1

View File

@@ -428,7 +428,7 @@ public class HailiangEngravingMachineDeviceDriver extends AbstractOpcDeviceDrive
//到达取货点
if (agvphase == 0x03) {
if (ObjectUtil.isNotEmpty(inst) && move == 1) {
if (mode == 1 && ObjectUtil.isNotEmpty(inst) && move == 1) {
inst.setExecute_status(InstActionEnum.EXECUTE_TO_GET.getCode());
instructionService.update(inst);
byte[] data = agvService.sendAgvOneModeInst(agvphase, index, 0);
@@ -451,7 +451,7 @@ public class HailiangEngravingMachineDeviceDriver extends AbstractOpcDeviceDrive
//取货完成
if (agvphase == 0x05) {
if (ObjectUtil.isNotEmpty(inst) && move == 0) {
if (mode == 1 && ObjectUtil.isNotEmpty(inst) && move == 0) {
inst.setExecute_status(InstActionEnum.EXECUTE_GET_FINISH.getCode());
instructionService.update(inst);
byte[] data = agvService.sendAgvOneModeInst(agvphase, index, 0);
@@ -473,7 +473,7 @@ public class HailiangEngravingMachineDeviceDriver extends AbstractOpcDeviceDrive
}
if (agvphase == 0x07) {
if (ObjectUtil.isNotEmpty(inst) && move == 0) {
if (mode == 1 && ObjectUtil.isNotEmpty(inst) && move == 0) {
inst.setExecute_status(InstActionEnum.EXECUTE_TO_PUT_FALL_SEND_FULL.getCode());
instructionService.update(inst);
byte[] data = agvService.sendAgvOneModeInst(agvphase, index, 0);
@@ -495,7 +495,7 @@ public class HailiangEngravingMachineDeviceDriver extends AbstractOpcDeviceDrive
}
if (agvphase == 0x09) {
if (ObjectUtil.isNotEmpty(inst) && move == 1) {
if (mode == 1 && ObjectUtil.isNotEmpty(inst) && move == 1) {
inst.setExecute_status(InstActionEnum.EXECUTE_PUT_FALL_SEND_FULL_FINISH.getCode());
instructionService.update(inst);
byte[] data = agvService.sendAgvOneModeInst(agvphase, index, 0);