更新
This commit is contained in:
@@ -109,6 +109,7 @@ public class HfTwoRGVDeviceDriver extends AbstractOpcDeviceDriver implements Dev
|
||||
String device_code;
|
||||
|
||||
|
||||
|
||||
//后工位申请任务请求时间
|
||||
private Date instruction_require_time = new Date();
|
||||
//前工位申请任务请求时间
|
||||
@@ -139,6 +140,10 @@ public class HfTwoRGVDeviceDriver extends AbstractOpcDeviceDriver implements Dev
|
||||
task2 = this.itemProtocol.getTask2();
|
||||
|
||||
if (mode != last_mode) {
|
||||
if (mode == 2){
|
||||
this.setRequireBackSucess(false);
|
||||
this.setRequireHeadSucess(false);
|
||||
}
|
||||
logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||
}
|
||||
@@ -151,16 +156,10 @@ public class HfTwoRGVDeviceDriver extends AbstractOpcDeviceDriver implements Dev
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号status:" + last_status + "->" + status);
|
||||
}
|
||||
if (move1 != last_move1) {
|
||||
if (move1 == 0) {
|
||||
this.setRequireHeadSucess(false);
|
||||
}
|
||||
logServer.deviceItemValue(this.device_code, "move1", String.valueOf(move1));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号move1:" + last_move1 + "->" + move1);
|
||||
}
|
||||
if (move2 != last_move2) {
|
||||
if (move2 == 0) {
|
||||
this.setRequireBackSucess(false);
|
||||
}
|
||||
logServer.deviceItemValue(this.device_code, "move2", String.valueOf(move2));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号move2:" + last_move2 + "->" + move2);
|
||||
}
|
||||
@@ -317,7 +316,7 @@ public class HfTwoRGVDeviceDriver extends AbstractOpcDeviceDriver implements Dev
|
||||
}
|
||||
}
|
||||
//后工位取货时判断取货位光电信号
|
||||
if (mode == 3 && action2 == 2 && move2 == 0 && task2 > 0) {
|
||||
if (mode == 3 && action2 == 1 && move2 == 0 && task2 > 0) {
|
||||
Instruction inst1 = instructionService.findByCodeFromCache(String.valueOf(task2));
|
||||
String start_device_code = inst1.getStart_device_code();
|
||||
Device startDevice = deviceAppservice.findDeviceByCode(start_device_code);
|
||||
@@ -385,14 +384,14 @@ public class HfTwoRGVDeviceDriver extends AbstractOpcDeviceDriver implements Dev
|
||||
logServer.deviceExecuteLog(device_code, "", String.valueOf(task2), "move2:" + move2 + ",action2:" + action2 + ",move1:" + move1 + ",task2:" + task2 + ",requireBackSucess:" + requireBackSucess);
|
||||
}
|
||||
//前工位申请任务
|
||||
if (mode == 2 && move2 == 0 && action2 == 0 && task2 == 0 && move1 == 0 && task1 > 0 && !requireHeadSucess) {
|
||||
if (mode == 2 && move2 == 0 && action2 == 0 && task2 == 0 && move1 == 0 && !requireHeadSucess) {
|
||||
instruction_require();
|
||||
logServer.deviceExecuteLog(device_code, "", String.valueOf(task1), "move2:" + move2 + ",action2:" + action2 + ",move1:" + move1 + ",task2:" + task2 + ",requireHeadSucess:" + requireHeadSucess);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
//前工位申请任务
|
||||
if (mode == 3 && move2 == 1 && action2 == 1 && move1 == 0 && action1 == 0 && !requireHeadSucess) {
|
||||
if (mode == 3 && move2 == 1 && action2 == 1 && move1 == 0 && !requireHeadSucess) {
|
||||
instruction_require();
|
||||
logServer.deviceExecuteLog(device_code, "", String.valueOf(task1), "move2:" + move2 + ",action2:" + action2 + ",move1:" + move1 + ",task2:" + task2 + ",requireHeadSucess:" + requireHeadSucess);
|
||||
}
|
||||
|
||||
@@ -852,7 +852,6 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
String compound_task = acsTask.getCompound_task();
|
||||
String next_point_code = acsTask.getNext_point_code();
|
||||
String next_device_code = acsTask.getNext_device_code();
|
||||
String maxInstnumber = paramService.findByCode(AcsConfig.MAXINSTNUMBER).getValue();
|
||||
|
||||
/**
|
||||
* 开始平均分解校验
|
||||
|
||||
Reference in New Issue
Block a user