更新监控
This commit is contained in:
@@ -185,12 +185,28 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
if (device.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) device.getDeviceDriver();
|
||||
//hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
||||
if (hongXiangConveyorDeviceDriver.getMode() == 1 && hongXiangConveyorDeviceDriver.getDoor() == 1 && hongXiangConveyorDeviceDriver.getAction() == 1 && hongXiangConveyorDeviceDriver.getError1() == 0) {
|
||||
int mode = hongXiangConveyorDeviceDriver.getMode();
|
||||
int door = hongXiangConveyorDeviceDriver.getDoor();
|
||||
int action = hongXiangConveyorDeviceDriver.getAction();
|
||||
int error1 = hongXiangConveyorDeviceDriver.getError1();
|
||||
if (mode == 1 && door == 1 && action == 1 && error1 == 0) {
|
||||
this.writing("to_command", "2");
|
||||
this.setNow_steps_type(3);
|
||||
} else {
|
||||
if (this.getNow_steps_type() == 2) {
|
||||
feedMessage = "请检查烘箱:door=1&&action==1&&error1=0";
|
||||
feedMessage = "烘箱:" + hongXiangConveyorDeviceDriver.getDevice_code();
|
||||
if (mode != 1) {
|
||||
feedMessage = feedMessage + "mode未联机,";
|
||||
}
|
||||
if (door != 1) {
|
||||
feedMessage = feedMessage + "door未开门,";
|
||||
}
|
||||
if (action != 1) {
|
||||
feedMessage = feedMessage + "action未允许取放,";
|
||||
}
|
||||
if (error1 != 0) {
|
||||
feedMessage = feedMessage + "error1出现故障。";
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -200,7 +216,19 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
}
|
||||
} else {
|
||||
if (this.getNow_steps_type() == 2) {
|
||||
feedMessage = "请检查:mode == 3 && action == 1 && move == 0 && task > 0";
|
||||
feedMessage = "行架机械手:";
|
||||
if (mode != 3) {
|
||||
feedMessage = feedMessage + "mode不为运行中状态,";
|
||||
}
|
||||
if (action != 1) {
|
||||
feedMessage = feedMessage + "action不为取货中状态,";
|
||||
}
|
||||
if (move != 0) {
|
||||
feedMessage = feedMessage + "move不为无货状态,";
|
||||
}
|
||||
if (task == 0) {
|
||||
feedMessage = feedMessage + "task为0。";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,7 +248,19 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
}
|
||||
} else {
|
||||
if (this.getNow_steps_type() == 3) {
|
||||
feedMessage = "请检查:mode == 3 && action == 2 && move == 1 && task > 0";
|
||||
feedMessage = "行架机械手:";
|
||||
if (mode != 3) {
|
||||
feedMessage = feedMessage + "mode不为运行中状态,";
|
||||
}
|
||||
if (action != 2) {
|
||||
feedMessage = feedMessage + "action不为取货完成状态,";
|
||||
}
|
||||
if (move != 1) {
|
||||
feedMessage = feedMessage + "move不为有货状态,";
|
||||
}
|
||||
if (task == 0) {
|
||||
feedMessage = feedMessage + "task为0。";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -233,11 +273,27 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
if (nextDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) nextDevice.getDeviceDriver();
|
||||
//hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
||||
if (hongXiangConveyorDeviceDriver.getMode() == 1 && hongXiangConveyorDeviceDriver.getDoor() == 1 && hongXiangConveyorDeviceDriver.getAction() == 1 && hongXiangConveyorDeviceDriver.getError1() == 0) {
|
||||
int mode = hongXiangConveyorDeviceDriver.getMode();
|
||||
int door = hongXiangConveyorDeviceDriver.getDoor();
|
||||
int action = hongXiangConveyorDeviceDriver.getAction();
|
||||
int error1 = hongXiangConveyorDeviceDriver.getError1();
|
||||
if (mode == 1 && door == 1 && action == 1 && error1 == 0) {
|
||||
this.writing("to_command", "4");
|
||||
this.setNow_steps_type(5);
|
||||
} else {
|
||||
feedMessage = "请检查烘箱:door=1&&action==1&&error1=0";
|
||||
feedMessage = "烘箱:" + hongXiangConveyorDeviceDriver.getDevice_code();
|
||||
if (mode != 1) {
|
||||
feedMessage = feedMessage + "mode未联机,";
|
||||
}
|
||||
if (door != 1) {
|
||||
feedMessage = feedMessage + "door未开门,";
|
||||
}
|
||||
if (action != 1) {
|
||||
feedMessage = feedMessage + "action未允许取放,";
|
||||
}
|
||||
if (error1 != 0) {
|
||||
feedMessage = feedMessage + "error1出现故障。";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.writing("to_command", "4");
|
||||
@@ -245,7 +301,19 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
}
|
||||
} else {
|
||||
if (this.getNow_steps_type() == 4) {
|
||||
feedMessage = "请检查:mode == 3 && action == 3 && move == 1 && task > 0";
|
||||
feedMessage = "行架机械手:";
|
||||
if (mode != 3) {
|
||||
feedMessage = feedMessage + "mode不为运行中状态,";
|
||||
}
|
||||
if (action != 3) {
|
||||
feedMessage = feedMessage + "action不为放货中状态,";
|
||||
}
|
||||
if (move != 1) {
|
||||
feedMessage = feedMessage + "move不为有货状态,";
|
||||
}
|
||||
if (task == 0) {
|
||||
feedMessage = feedMessage + "task为0。";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -293,7 +361,19 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
}
|
||||
} else {
|
||||
if (this.getNow_steps_type() == 5) {
|
||||
feedMessage = "请检查:mode == 3 && action == 4 && move == 0 && task > 0";
|
||||
feedMessage = "行架机械手:";
|
||||
if (mode != 3) {
|
||||
feedMessage = feedMessage + "mode不为运行中状态,";
|
||||
}
|
||||
if (action != 4) {
|
||||
feedMessage = feedMessage + "action不为放货完成状态,";
|
||||
}
|
||||
if (move != 0) {
|
||||
feedMessage = feedMessage + "move不为无货状态,";
|
||||
}
|
||||
if (task == 0) {
|
||||
feedMessage = feedMessage + "task为0。";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -334,15 +414,18 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
} else {
|
||||
if (mode == 2) {
|
||||
//if (!requireSucess) {
|
||||
String remark = "";
|
||||
String remark = "未查找任务原因为:";
|
||||
if (mode != 2) {
|
||||
remark = remark + "mode不为2,";
|
||||
remark = remark + "mode不是待机状态,";
|
||||
}
|
||||
if (move != 0) {
|
||||
remark = remark + "move不为0,";
|
||||
remark = remark + "move为有货状态,";
|
||||
}
|
||||
if (task != 0) {
|
||||
remark = remark + "task不为0,";
|
||||
remark = remark + "task任务号不为0,";
|
||||
}
|
||||
if (requireSucess) {
|
||||
remark = remark + "请求标记requireSucess为true。";
|
||||
}
|
||||
this.setNotCreateTaskMessage(remark);
|
||||
//}
|
||||
@@ -505,7 +588,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
||||
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
||||
}
|
||||
if (startDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver){
|
||||
if (startDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) startDevice.getDeviceDriver();
|
||||
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
||||
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
||||
|
||||
Reference in New Issue
Block a user