This commit is contained in:
2022-11-28 09:50:11 +08:00
parent 48907753bd
commit 96f53ef7ef
2 changed files with 21 additions and 21 deletions

View File

@@ -316,8 +316,8 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
instructionService.update(instruction);
int start_addrIndex = getDeviceCodeList.indexOf(instruction.getStart_device_code());
int next_addrIndex = putDeviceCodeList.indexOf(instruction.getNext_device_code());
writing("to_onset", String.valueOf(start_addrIndex));
writing("to_target", String.valueOf(next_addrIndex));
writing("to_onset", String.valueOf(start_addrIndex + 1));
writing("to_target", String.valueOf(next_addrIndex + 1));
writing("to_task", instruction.getInstruction_code());
writing("to_command", "1");
this.setRequireSucess(true);
@@ -373,8 +373,8 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
//根据获取托盘信息返回的结果 得到对应抓取工位/放货工位设备编码所在的索引位置
int start_addrIndex = getDeviceCodeList.indexOf(start_device_code);
int next_addrIndex = putDeviceCodeList.indexOf(next_device_code);
writing("to_onset", String.valueOf(start_addrIndex));
writing("to_target", String.valueOf(next_addrIndex));
writing("to_onset", String.valueOf(start_addrIndex + 1));
writing("to_target", String.valueOf(next_addrIndex + 1));
writing("to_task", instdto.getInstruction_code());
writing("to_command", "1");
this.setRequireSucess(true);

View File

@@ -341,21 +341,21 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
log.debug("设备运转模式:等待工作");
return;
case 2:
//工位申请任务 取空放空
if (move1 == 0 && action1 == 0 && !requireHeadSucess) {
instruction_require();
//工位申请任务 取空放空
if (move2 == 0 && action2 == 0 && task2 == 0 && !requireHeadSucess) {
instruction_require2();
logServer.deviceExecuteLog(device_code, "", String.valueOf(task1), "move1:" + move1 + ",action1:" + action1 + ",move2:" + move2 + ",task1:" + task1 + ",requireHeadSucess:" + requireHeadSucess);
}
//工位申请任务 取满放满
if (move2 == 0 && action2 == 0 && task2 == 0 && move1 == 0 && task1 > 0 && !requireBackSucess) {
instruction_require2();
//工位申请任务 取满放满
if (move1 == 0 && action1 == 0 && task1 == 0 && move2 == 0 && task2 > 0 && !requireBackSucess) {
instruction_require();
logServer.deviceExecuteLog(device_code, "", String.valueOf(task1), "move2:" + move2 + ",action2:" + action2 + ",move1:" + move1 + ",task2:" + task2 + ",requireBackSucess:" + requireBackSucess);
}
break;
case 3:
//工位申请任务 取满放满
if (task1 > 0 && move1 == 1 && action1 == 1 && move2 == 0 && action2 == 0 && !requireBackSucess) {
instruction_require2();
//工位申请任务 取满放满
if (task2 > 0 && move2 == 1 && action2 == 1 && move1 == 0 && action1 == 0 && !requireBackSucess) {
instruction_require();
logServer.deviceExecuteLog(device_code, "", String.valueOf(task1), "move2:" + move2 + ",action2:" + action2 + ",move1:" + move1 + ",task2:" + task2 + ",requireBackSucess:" + requireBackSucess);
}
}
@@ -397,8 +397,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
instructionService.update(instruction);
int start_addrIndex = getDeviceCodeList.indexOf(instruction.getStart_device_code());
int next_addrIndex = putDeviceCodeList.indexOf(instruction.getNext_device_code());
this.writing("to_onset1", String.valueOf(start_addrIndex));
this.writing("to_target1", String.valueOf(next_addrIndex));
this.writing("to_onset1", String.valueOf(start_addrIndex + 1));
this.writing("to_target1", String.valueOf(next_addrIndex + 1));
this.writing("to_task1", instruction.getInstruction_code());
this.writing("to_command1", "1");
requireHeadSucess = true;
@@ -457,8 +457,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
//根据查询的任务起始点位 得出取放工位的索引值 写入后工位电气中
int start_addrIndex = getDeviceCodeList.indexOf(start_device_code);
int next_addrIndex = putDeviceCodeList.indexOf(next_device_code);
this.writing("to_onset1", String.valueOf(start_addrIndex));
this.writing("to_target1", String.valueOf(next_addrIndex));
this.writing("to_onset1", String.valueOf(start_addrIndex + 1));
this.writing("to_target1", String.valueOf(next_addrIndex + 1));
this.writing("to_task1", instdto.getInstruction_code());
this.writing("to_command1", "1");
requireHeadSucess = true;
@@ -493,8 +493,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
instructionService.update(instruction);
int start_addrIndex = getDeviceCodeList.indexOf(instruction.getStart_device_code());
int next_addrIndex = putDeviceCodeList.indexOf(instruction.getNext_device_code());
this.writing("to_onset2", String.valueOf(start_addrIndex));
this.writing("to_target2", String.valueOf(next_addrIndex));
this.writing("to_onset2", String.valueOf(start_addrIndex + 1));
this.writing("to_target2", String.valueOf(next_addrIndex + 1));
this.writing("to_task2", instruction.getInstruction_code());
this.writing("to_command2", "1");
requireBackSucess = true;
@@ -552,8 +552,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
//根据查询的任务起始点位 得出取放工位的索引值 写入后工位电气中
int start_addrIndex = getDeviceCodeList.indexOf(start_device_code);
int next_addrIndex = putDeviceCodeList.indexOf(next_device_code);
this.writing("to_onset2", String.valueOf(start_addrIndex));
this.writing("to_target2", String.valueOf(next_addrIndex));
this.writing("to_onset2", String.valueOf(start_addrIndex + 1));
this.writing("to_target2", String.valueOf(next_addrIndex + 1));
this.writing("to_task2", instdto.getInstruction_code());
this.writing("to_command2", "1");
requireBackSucess = true;