更新
This commit is contained in:
@@ -219,7 +219,6 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
}
|
||||
|
||||
|
||||
|
||||
public boolean exe_error() {
|
||||
if (this.error == 0) {
|
||||
return true;
|
||||
@@ -242,6 +241,14 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
protected void thingToNothing() throws Exception {
|
||||
this.setRequireSucess(false);
|
||||
this.setApplySucess(false);
|
||||
this.writing("to_command", "0");
|
||||
this.writing("to_target", "0");
|
||||
this.writing("to_container_type", "0");
|
||||
this.writing("to_task", "0");
|
||||
this.writing("to_strap_times", "0");
|
||||
this.writing("to_length", "0");
|
||||
this.writing("to_weight", "0");
|
||||
this.writing("to_height", "0");
|
||||
}
|
||||
|
||||
|
||||
@@ -332,7 +339,6 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
|
||||
/**
|
||||
* 请求指令
|
||||
*
|
||||
*/
|
||||
public synchronized boolean instruction_require() throws Exception {
|
||||
Date date = new Date();
|
||||
|
||||
@@ -292,6 +292,10 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
start_device_code = inst1.getStart_device_code2();
|
||||
}
|
||||
Device startDevice = deviceAppservice.findDeviceByCode(start_device_code);
|
||||
if (ObjectUtil.isEmpty(startDevice)) {
|
||||
feedMessage = "后工位取货位:" + start_device_code + "为空!";
|
||||
return;
|
||||
}
|
||||
SiemensConveyorDeviceDriver siemensConveyorDeviceDriver;
|
||||
if (startDevice.getDeviceDriver() instanceof SiemensConveyorDeviceDriver) {
|
||||
siemensConveyorDeviceDriver = (SiemensConveyorDeviceDriver) startDevice.getDeviceDriver();
|
||||
@@ -419,14 +423,23 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
//单任务/双任务 前工位放货时判断放货位光电信号
|
||||
if (mode == 3 && action1 == 3 && move1 == 1 && task1 > 0) {
|
||||
Instruction inst1 = instructionService.findByCodeFromCache(String.valueOf(task1));
|
||||
String next_device_code = inst1.getNext_device_code();
|
||||
String next_device_code = "";
|
||||
if (type == 1) {
|
||||
next_device_code = inst1.getNext_device_code();
|
||||
} else if (type == 3) {
|
||||
next_device_code = inst1.getNext_device_code2();
|
||||
}
|
||||
Device nextDevice = deviceAppservice.findDeviceByCode(next_device_code);
|
||||
if (ObjectUtil.isEmpty(nextDevice)) {
|
||||
feedMessage = "前工位放货位:" + next_device_code + "为空!";
|
||||
return;
|
||||
}
|
||||
SiemensConveyorDeviceDriver siemensConveyorDeviceDriver;
|
||||
if (nextDevice.getDeviceDriver() instanceof SiemensConveyorDeviceDriver) {
|
||||
siemensConveyorDeviceDriver = (SiemensConveyorDeviceDriver) nextDevice.getDeviceDriver();
|
||||
int move = siemensConveyorDeviceDriver.getMove();
|
||||
int mode = siemensConveyorDeviceDriver.getMode();
|
||||
if (move == 0 && mode == 2) {
|
||||
if (move == 1 && mode == 2) {
|
||||
this.writing("to_command1", "4");
|
||||
if (type == 1) {
|
||||
this.setNow_steps_type1(5);
|
||||
@@ -436,7 +449,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
} else {
|
||||
log.warn("后工位放货位有货,放货位:{},mode:{},move:{}", next_device_code, mode, move);
|
||||
if (this.getNow_steps_type1() == 4 || this.getNow_steps_type3() == 8) {
|
||||
feedMessage = "请检查输送线:move == 0 && mode == 2";
|
||||
feedMessage = "请检查输送线:move == 1 && mode == 2";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user