更新
This commit is contained in:
@@ -15,6 +15,7 @@ import org.nl.acs.device_driver.DeviceDriver;
|
|||||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||||
import org.nl.acs.device_driver.basedriver.hongxiang_conveyor.HongXiangStationDeviceDriver;
|
import org.nl.acs.device_driver.basedriver.hongxiang_conveyor.HongXiangStationDeviceDriver;
|
||||||
import org.nl.acs.device_driver.basedriver.hongxiang_device.HongXiangConveyorDeviceDriver;
|
import org.nl.acs.device_driver.basedriver.hongxiang_device.HongXiangConveyorDeviceDriver;
|
||||||
|
import org.nl.acs.device_driver.basedriver.photoelectric_inspection_site.PhotoelectricInspectionSiteDeviceDriver;
|
||||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||||
@@ -194,7 +195,8 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
int door = hongXiangConveyorDeviceDriver.getDoor();
|
int door = hongXiangConveyorDeviceDriver.getDoor();
|
||||||
int action = hongXiangConveyorDeviceDriver.getAction();
|
int action = hongXiangConveyorDeviceDriver.getAction();
|
||||||
int error1 = hongXiangConveyorDeviceDriver.getError1();
|
int error1 = hongXiangConveyorDeviceDriver.getError1();
|
||||||
if (mode == 1 && door == 1 && action == 1 && error1 == 0) {
|
int move = hongXiangConveyorDeviceDriver.getMove();
|
||||||
|
if (mode == 1 && door == 1 && action == 1 && error1 == 0 && move == 1) {
|
||||||
if (this.getNow_steps_type() == 2) {
|
if (this.getNow_steps_type() == 2) {
|
||||||
this.writing("to_command", "2");
|
this.writing("to_command", "2");
|
||||||
this.setNow_steps_type(3);
|
this.setNow_steps_type(3);
|
||||||
@@ -213,6 +215,9 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
if (action != 1) {
|
if (action != 1) {
|
||||||
feedMessage = feedMessage + "允许取放(action)信号未允许取放,";
|
feedMessage = feedMessage + "允许取放(action)信号未允许取放,";
|
||||||
}
|
}
|
||||||
|
if (move != 1){
|
||||||
|
feedMessage = feedMessage + "取货位光电信号(move)不应该为无货状态,";
|
||||||
|
}
|
||||||
if (error1 != 0) {
|
if (error1 != 0) {
|
||||||
feedMessage = feedMessage + "故障(error1)信号出现故障,故障值:" + error1 + "。";
|
feedMessage = feedMessage + "故障(error1)信号出现故障,故障值:" + error1 + "。";
|
||||||
}
|
}
|
||||||
@@ -287,6 +292,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
String next_device_code = instructionDto.getNext_device_code();
|
String next_device_code = instructionDto.getNext_device_code();
|
||||||
Device nextDevice = deviceAppService.findDeviceByCode(next_device_code);
|
Device nextDevice = deviceAppService.findDeviceByCode(next_device_code);
|
||||||
HongXiangConveyorDeviceDriver hongXiangConveyorDeviceDriver;
|
HongXiangConveyorDeviceDriver hongXiangConveyorDeviceDriver;
|
||||||
|
PhotoelectricInspectionSiteDeviceDriver photoelectricInspectionSiteDeviceDriver;
|
||||||
if (nextDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
if (nextDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) nextDevice.getDeviceDriver();
|
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) nextDevice.getDeviceDriver();
|
||||||
//hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
//hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
||||||
@@ -294,7 +300,38 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
int door = hongXiangConveyorDeviceDriver.getDoor();
|
int door = hongXiangConveyorDeviceDriver.getDoor();
|
||||||
int action = hongXiangConveyorDeviceDriver.getAction();
|
int action = hongXiangConveyorDeviceDriver.getAction();
|
||||||
int error1 = hongXiangConveyorDeviceDriver.getError1();
|
int error1 = hongXiangConveyorDeviceDriver.getError1();
|
||||||
if (mode == 1 && door == 1 && action == 1 && error1 == 0) {
|
int move = hongXiangConveyorDeviceDriver.getMove();
|
||||||
|
if (mode == 1 && door == 1 && action == 1 && error1 == 0 && move == 0) {
|
||||||
|
if (this.getNow_steps_type() == 4) {
|
||||||
|
this.writing("to_command", "4");
|
||||||
|
this.setNow_steps_type(5);
|
||||||
|
} else {
|
||||||
|
feedMessage = "未反馈电气信号原因:当前步骤不为允许放货(now_steps_type!=4)";
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "未反馈电气信号原因:当前步骤不为允许放货(now_steps_type!=4)");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (this.getNow_steps_type() == 4) {
|
||||||
|
feedMessage = "烘箱:" + hongXiangConveyorDeviceDriver.getDevice_code();
|
||||||
|
if (mode != 1) {
|
||||||
|
feedMessage = feedMessage + "工作模式(mode)信号未联机,";
|
||||||
|
}
|
||||||
|
if (door != 1) {
|
||||||
|
feedMessage = feedMessage + "门状态(door)信号未开门,";
|
||||||
|
}
|
||||||
|
if (action != 1) {
|
||||||
|
feedMessage = feedMessage + "允许取放(action)信号未允许取放,";
|
||||||
|
}
|
||||||
|
if (move != 0) {
|
||||||
|
feedMessage = feedMessage + "放货位光电信号不应该为有货状态";
|
||||||
|
}
|
||||||
|
if (error1 != 0) {
|
||||||
|
feedMessage = feedMessage + "故障(error1)信号出现故障。";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (nextDevice.getDeviceDriver() instanceof PhotoelectricInspectionSiteDeviceDriver){
|
||||||
|
photoelectricInspectionSiteDeviceDriver = (PhotoelectricInspectionSiteDeviceDriver) device.getDeviceDriver();
|
||||||
|
if (photoelectricInspectionSiteDeviceDriver.getMove() == 0){
|
||||||
if (this.getNow_steps_type() == 4) {
|
if (this.getNow_steps_type() == 4) {
|
||||||
this.writing("to_command", "4");
|
this.writing("to_command", "4");
|
||||||
this.setNow_steps_type(5);
|
this.setNow_steps_type(5);
|
||||||
@@ -302,26 +339,11 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
logServer.deviceExecuteLog(this.device_code, "", "", "未反馈电气信号原因:当前步骤不为允许放货(now_steps_type!=4)");
|
logServer.deviceExecuteLog(this.device_code, "", "", "未反馈电气信号原因:当前步骤不为允许放货(now_steps_type!=4)");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
feedMessage = "烘箱:" + hongXiangConveyorDeviceDriver.getDevice_code();
|
if (this.getNow_steps_type() == 4) {
|
||||||
if (mode != 1) {
|
if (photoelectricInspectionSiteDeviceDriver.getMove() != 0){
|
||||||
feedMessage = feedMessage + "工作模式(mode)信号未联机,";
|
feedMessage = "烘箱对接位有货不允许放货!";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (door != 1) {
|
|
||||||
feedMessage = feedMessage + "门状态(door)信号未开门,";
|
|
||||||
}
|
|
||||||
if (action != 1) {
|
|
||||||
feedMessage = feedMessage + "允许取放(action)信号未允许取放,";
|
|
||||||
}
|
|
||||||
if (error1 != 0) {
|
|
||||||
feedMessage = feedMessage + "故障(error1)信号出现故障。";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (this.getNow_steps_type() == 4) {
|
|
||||||
this.writing("to_command", "4");
|
|
||||||
this.setNow_steps_type(5);
|
|
||||||
} else {
|
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "未反馈电气信号原因:当前步骤不为允许放货(now_steps_type!=4)");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user