add: 技改
This commit is contained in:
@@ -1630,7 +1630,9 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
}
|
||||
} else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) {
|
||||
manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver();
|
||||
|
||||
List<String> linkDeviceCodes = manipulatorAgvStationDeviceDriver.getExtraDeviceCodes("link_device_code");
|
||||
String linkDeviceCode = linkDeviceCodes.get(0);
|
||||
Device linkDevice = deviceAppService.findDeviceByCode(linkDeviceCode);
|
||||
|
||||
//申请烘箱行架任务
|
||||
if (ObjectUtil.isNotEmpty(manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("request_robot_task"))
|
||||
@@ -1658,6 +1660,13 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
manipulatorAgvStationDeviceDriver.setOvenGantryTask(true);
|
||||
manipulatorAgvStationDeviceDriver.writing(4);
|
||||
|
||||
}else {
|
||||
// 失败的话将报错信息显示到大屏
|
||||
if (linkDevice.getDeviceDriver() instanceof OvenGantryManipulatorDeviceDriver) {
|
||||
OvenGantryManipulatorDeviceDriver ovenGantryManipulatorDeviceDriver;
|
||||
ovenGantryManipulatorDeviceDriver = (OvenGantryManipulatorDeviceDriver) linkDevice.getDeviceDriver();
|
||||
ovenGantryManipulatorDeviceDriver.setNotCreateInstMessage(jo.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
|
||||
@Override
|
||||
public void execute() {
|
||||
device_code
|
||||
= this.getDeviceCode();
|
||||
= this.getDeviceCode();
|
||||
heartbeat = this.itemProtocol.getItem_heartbeat();
|
||||
mode = this.itemProtocol.getItem_mode();
|
||||
move = this.itemProtocol.getItem_move();
|
||||
@@ -185,6 +185,9 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
|
||||
dto.setError_info(ErrorUtil.getDictDetail("hx_error_type", String.valueOf(error)));
|
||||
deviceErrorLogService.create(dto);
|
||||
}
|
||||
} else if (error != 0 || error1 != 0) {
|
||||
this.setIserror(true);
|
||||
message = "有报警";
|
||||
}
|
||||
if (finish != last_finish) {
|
||||
if (finish == 1) {
|
||||
@@ -283,7 +286,7 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
|
||||
|
||||
public void writing(int command) {
|
||||
String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
||||
+ "." ;
|
||||
+ ".";
|
||||
//String opcservcerid = this.getDevice().getOpc_server_id();
|
||||
//Server server = ReadUtil.getServer(opcservcerid);
|
||||
Map<String, Object> itemMap = new HashMap<String, Object>();
|
||||
@@ -433,6 +436,13 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
|
||||
if (error == 0 && iserror) {
|
||||
message = LangProcess.msg("universal_message11");
|
||||
}
|
||||
|
||||
if(this.getError() != 0){
|
||||
map.put("error", "error有报警,请检查烘箱!");
|
||||
}
|
||||
if (this.getError1() != 0){
|
||||
map.put("error", "error1有报警,请检查烘箱!");
|
||||
}
|
||||
String door = "关门状态";
|
||||
if (this.door == 1) {
|
||||
door = "开门状态";
|
||||
|
||||
@@ -478,7 +478,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
return false;
|
||||
}
|
||||
// 判断相邻烘箱是否有货有异常
|
||||
// if (filterNeighbors(startdevice)) return false;
|
||||
if (filterNeighbors(startdevice)) return false;
|
||||
}
|
||||
|
||||
if (nextdevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||
@@ -488,7 +488,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
return false;
|
||||
}
|
||||
// 判断相邻烘箱是否有货有异常
|
||||
// if (filterNeighbors(nextdevice)) return false;
|
||||
if (filterNeighbors(nextdevice)) return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -647,7 +647,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
Device deviceByAddress = deviceAppService.findDeviceByAddress(neighbor);
|
||||
hongXiangConveyorDeviceDriverNeighbor = (HongXiangConveyorDeviceDriver) deviceByAddress.getDeviceDriver();
|
||||
if (hongXiangConveyorDeviceDriverNeighbor.getMode() == 0 || hongXiangConveyorDeviceDriverNeighbor.getMove() == 0 || hongXiangConveyorDeviceDriverNeighbor.getError() != 0 || hongXiangConveyorDeviceDriverNeighbor.getError1() != 0) {
|
||||
notCreateInstMessage = "就绪任务未创建指令原因->-烘箱:" + hongXiangConveyorDeviceDriverNeighbor.getDevice_code() + "光电无货,无法生成指令!" + hongXiangConveyorDeviceDriverNeighbor.getError() + "异常" + +hongXiangConveyorDeviceDriverNeighbor.getError1() + "异常,无法生成指令!";
|
||||
notCreateInstMessage = "就绪任务未创建指令原因->-相邻光电异常烘箱:" + hongXiangConveyorDeviceDriverNeighbor.getDevice_code() + "光电无货,无法生成指令!" + hongXiangConveyorDeviceDriverNeighbor.getError() + "异常" + +hongXiangConveyorDeviceDriverNeighbor.getError1() + "异常,无法生成指令!";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1038,13 +1038,20 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
//5、输送任务
|
||||
//6、行架
|
||||
//7、立库
|
||||
if (StrUtil.equals(task_type, CommonFinalParam.ONE)) {
|
||||
instdto.setAgv_inst_type(CommonFinalParam.ONE);
|
||||
if (StrUtil.equals(task_type, CommonFinalParam.ONE) ) {
|
||||
//生箔四个点任务是生箔agv,两个点是普通任务
|
||||
if (StrUtil.isNotEmpty(instdto.getStart_device_code2())) {
|
||||
instdto.setAgv_inst_type(CommonFinalParam.ONE);
|
||||
instdto.setCarno("1");
|
||||
}else {
|
||||
instdto.setAgv_inst_type("2");
|
||||
}
|
||||
|
||||
} else if (StrUtil.equals(task_type, "3")) {
|
||||
instdto.setAgv_inst_type("2");
|
||||
} else if (StrUtil.equals(task_type, "2")) {
|
||||
}else if (StrUtil.equals(task_type, "2")) {
|
||||
instdto.setAgv_inst_type("3");
|
||||
} else if (StrUtil.equals(task_type, "8")) {
|
||||
}else if (StrUtil.equals(task_type, "8")) {
|
||||
instdto.setAgv_inst_type("2");
|
||||
} else {
|
||||
log.info("未找到对应的AGV指令类型,任务号:" + acsTask.getTask_code() + ",task_type:" + acsTask.getTask_type());
|
||||
|
||||
Reference in New Issue
Block a user