更新
This commit is contained in:
@@ -316,8 +316,8 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
instructionService.update(instruction);
|
instructionService.update(instruction);
|
||||||
int start_addrIndex = getDeviceCodeList.indexOf(instruction.getStart_device_code());
|
int start_addrIndex = getDeviceCodeList.indexOf(instruction.getStart_device_code());
|
||||||
int next_addrIndex = putDeviceCodeList.indexOf(instruction.getNext_device_code());
|
int next_addrIndex = putDeviceCodeList.indexOf(instruction.getNext_device_code());
|
||||||
writing("to_onset", String.valueOf(start_addrIndex));
|
writing("to_onset", String.valueOf(start_addrIndex + 1));
|
||||||
writing("to_target", String.valueOf(next_addrIndex));
|
writing("to_target", String.valueOf(next_addrIndex + 1));
|
||||||
writing("to_task", instruction.getInstruction_code());
|
writing("to_task", instruction.getInstruction_code());
|
||||||
writing("to_command", "1");
|
writing("to_command", "1");
|
||||||
this.setRequireSucess(true);
|
this.setRequireSucess(true);
|
||||||
@@ -373,8 +373,8 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
//根据获取托盘信息返回的结果 得到对应抓取工位/放货工位设备编码所在的索引位置
|
//根据获取托盘信息返回的结果 得到对应抓取工位/放货工位设备编码所在的索引位置
|
||||||
int start_addrIndex = getDeviceCodeList.indexOf(start_device_code);
|
int start_addrIndex = getDeviceCodeList.indexOf(start_device_code);
|
||||||
int next_addrIndex = putDeviceCodeList.indexOf(next_device_code);
|
int next_addrIndex = putDeviceCodeList.indexOf(next_device_code);
|
||||||
writing("to_onset", String.valueOf(start_addrIndex));
|
writing("to_onset", String.valueOf(start_addrIndex + 1));
|
||||||
writing("to_target", String.valueOf(next_addrIndex));
|
writing("to_target", String.valueOf(next_addrIndex + 1));
|
||||||
writing("to_task", instdto.getInstruction_code());
|
writing("to_task", instdto.getInstruction_code());
|
||||||
writing("to_command", "1");
|
writing("to_command", "1");
|
||||||
this.setRequireSucess(true);
|
this.setRequireSucess(true);
|
||||||
|
|||||||
@@ -341,21 +341,21 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
log.debug("设备运转模式:等待工作");
|
log.debug("设备运转模式:等待工作");
|
||||||
return;
|
return;
|
||||||
case 2:
|
case 2:
|
||||||
//前工位申请任务 取空放空
|
//后工位申请任务 取空放空
|
||||||
if (move1 == 0 && action1 == 0 && !requireHeadSucess) {
|
if (move2 == 0 && action2 == 0 && task2 == 0 && !requireHeadSucess) {
|
||||||
instruction_require();
|
instruction_require2();
|
||||||
logServer.deviceExecuteLog(device_code, "", String.valueOf(task1), "move1:" + move1 + ",action1:" + action1 + ",move2:" + move2 + ",task1:" + task1 + ",requireHeadSucess:" + requireHeadSucess);
|
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) {
|
if (move1 == 0 && action1 == 0 && task1 == 0 && move2 == 0 && task2 > 0 && !requireBackSucess) {
|
||||||
instruction_require2();
|
instruction_require();
|
||||||
logServer.deviceExecuteLog(device_code, "", String.valueOf(task1), "move2:" + move2 + ",action2:" + action2 + ",move1:" + move1 + ",task2:" + task2 + ",requireBackSucess:" + requireBackSucess);
|
logServer.deviceExecuteLog(device_code, "", String.valueOf(task1), "move2:" + move2 + ",action2:" + action2 + ",move1:" + move1 + ",task2:" + task2 + ",requireBackSucess:" + requireBackSucess);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
//后工位申请任务 取满放满
|
//前工位申请任务 取满放满
|
||||||
if (task1 > 0 && move1 == 1 && action1 == 1 && move2 == 0 && action2 == 0 && !requireBackSucess) {
|
if (task2 > 0 && move2 == 1 && action2 == 1 && move1 == 0 && action1 == 0 && !requireBackSucess) {
|
||||||
instruction_require2();
|
instruction_require();
|
||||||
logServer.deviceExecuteLog(device_code, "", String.valueOf(task1), "move2:" + move2 + ",action2:" + action2 + ",move1:" + move1 + ",task2:" + task2 + ",requireBackSucess:" + requireBackSucess);
|
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);
|
instructionService.update(instruction);
|
||||||
int start_addrIndex = getDeviceCodeList.indexOf(instruction.getStart_device_code());
|
int start_addrIndex = getDeviceCodeList.indexOf(instruction.getStart_device_code());
|
||||||
int next_addrIndex = putDeviceCodeList.indexOf(instruction.getNext_device_code());
|
int next_addrIndex = putDeviceCodeList.indexOf(instruction.getNext_device_code());
|
||||||
this.writing("to_onset1", String.valueOf(start_addrIndex));
|
this.writing("to_onset1", String.valueOf(start_addrIndex + 1));
|
||||||
this.writing("to_target1", String.valueOf(next_addrIndex));
|
this.writing("to_target1", String.valueOf(next_addrIndex + 1));
|
||||||
this.writing("to_task1", instruction.getInstruction_code());
|
this.writing("to_task1", instruction.getInstruction_code());
|
||||||
this.writing("to_command1", "1");
|
this.writing("to_command1", "1");
|
||||||
requireHeadSucess = true;
|
requireHeadSucess = true;
|
||||||
@@ -457,8 +457,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
//根据查询的任务起始点位 得出取放工位的索引值 写入后工位电气中
|
//根据查询的任务起始点位 得出取放工位的索引值 写入后工位电气中
|
||||||
int start_addrIndex = getDeviceCodeList.indexOf(start_device_code);
|
int start_addrIndex = getDeviceCodeList.indexOf(start_device_code);
|
||||||
int next_addrIndex = putDeviceCodeList.indexOf(next_device_code);
|
int next_addrIndex = putDeviceCodeList.indexOf(next_device_code);
|
||||||
this.writing("to_onset1", String.valueOf(start_addrIndex));
|
this.writing("to_onset1", String.valueOf(start_addrIndex + 1));
|
||||||
this.writing("to_target1", String.valueOf(next_addrIndex));
|
this.writing("to_target1", String.valueOf(next_addrIndex + 1));
|
||||||
this.writing("to_task1", instdto.getInstruction_code());
|
this.writing("to_task1", instdto.getInstruction_code());
|
||||||
this.writing("to_command1", "1");
|
this.writing("to_command1", "1");
|
||||||
requireHeadSucess = true;
|
requireHeadSucess = true;
|
||||||
@@ -493,8 +493,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
instructionService.update(instruction);
|
instructionService.update(instruction);
|
||||||
int start_addrIndex = getDeviceCodeList.indexOf(instruction.getStart_device_code());
|
int start_addrIndex = getDeviceCodeList.indexOf(instruction.getStart_device_code());
|
||||||
int next_addrIndex = putDeviceCodeList.indexOf(instruction.getNext_device_code());
|
int next_addrIndex = putDeviceCodeList.indexOf(instruction.getNext_device_code());
|
||||||
this.writing("to_onset2", String.valueOf(start_addrIndex));
|
this.writing("to_onset2", String.valueOf(start_addrIndex + 1));
|
||||||
this.writing("to_target2", String.valueOf(next_addrIndex));
|
this.writing("to_target2", String.valueOf(next_addrIndex + 1));
|
||||||
this.writing("to_task2", instruction.getInstruction_code());
|
this.writing("to_task2", instruction.getInstruction_code());
|
||||||
this.writing("to_command2", "1");
|
this.writing("to_command2", "1");
|
||||||
requireBackSucess = true;
|
requireBackSucess = true;
|
||||||
@@ -552,8 +552,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
//根据查询的任务起始点位 得出取放工位的索引值 写入后工位电气中
|
//根据查询的任务起始点位 得出取放工位的索引值 写入后工位电气中
|
||||||
int start_addrIndex = getDeviceCodeList.indexOf(start_device_code);
|
int start_addrIndex = getDeviceCodeList.indexOf(start_device_code);
|
||||||
int next_addrIndex = putDeviceCodeList.indexOf(next_device_code);
|
int next_addrIndex = putDeviceCodeList.indexOf(next_device_code);
|
||||||
this.writing("to_onset2", String.valueOf(start_addrIndex));
|
this.writing("to_onset2", String.valueOf(start_addrIndex + 1));
|
||||||
this.writing("to_target2", String.valueOf(next_addrIndex));
|
this.writing("to_target2", String.valueOf(next_addrIndex + 1));
|
||||||
this.writing("to_task2", instdto.getInstruction_code());
|
this.writing("to_task2", instdto.getInstruction_code());
|
||||||
this.writing("to_command2", "1");
|
this.writing("to_command2", "1");
|
||||||
requireBackSucess = true;
|
requireBackSucess = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user