Merge branch 'master' of http://121.40.234.130:8899/root/lanzhouhailiang_one
# Conflicts: # lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java
This commit is contained in:
@@ -296,7 +296,7 @@ public class NDCAgvServiceImpl implements NDCAgvService {
|
||||
(byte) 0X00, (byte) 0X6D,
|
||||
(byte) 0X00, (byte) 0X06,
|
||||
(byte) indexhigh, (byte) indexlow,
|
||||
(byte) 0X01, (byte) 0X10,
|
||||
(byte) 0X01, (byte) 0X12,
|
||||
(byte) phasehigh, (byte) phaselow
|
||||
};
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.instruction.service.dto.Instruction;
|
||||
import org.nl.acs.instruction.service.impl.InstructionServiceImpl;
|
||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||
import org.nl.acs.opc.Device;
|
||||
import org.nl.acs.opc.DeviceAppService;
|
||||
import org.nl.modules.system.service.ParamService;
|
||||
@@ -68,7 +69,7 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
return "2楼1区域AGV系统";
|
||||
}
|
||||
|
||||
public void autoRun() {
|
||||
public void autoRun() throws IOException {
|
||||
|
||||
try {
|
||||
System.out.println("2楼1区域AGV系统链接开始");
|
||||
@@ -78,6 +79,7 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
NDCAgvService ndcAgvService = SpringContextHolder.getBean(NDCAgvService.class);
|
||||
DeviceAppService deviceAppService = SpringContextHolder.getBean(DeviceAppService.class);
|
||||
DeviceService deviceService = SpringContextHolder.getBean(DeviceService.class);
|
||||
DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class);
|
||||
ip = paramService.findByCode(AcsConfig.AGVURL2).getValue();
|
||||
port = Integer.parseInt(paramService.findByCode(AcsConfig.AGVPORT2).getValue());
|
||||
byte[] b = new byte[1028];
|
||||
@@ -210,6 +212,16 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
System.out.println("TwoAgv链接异常");
|
||||
log.info("TwoAgv链接异常");
|
||||
log.error("agv连接出现异常:{}", e);
|
||||
// logServer.deviceExecuteLog("1","","","agv异常"+e.getMessage());
|
||||
// logServer.deviceExecuteLog("1","","","agv异常" + e);
|
||||
if(ObjectUtil.isNotEmpty(s)){
|
||||
s.close();
|
||||
}
|
||||
System.out.println(e.getMessage());
|
||||
e.printStackTrace();
|
||||
|
||||
} finally {
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
int last_status = 0;
|
||||
int last_error = 0;
|
||||
|
||||
@LokiLog(type = LokiLogType.ACS_TO_LMS)
|
||||
@LokiLog(type = LokiLogType.AGV)
|
||||
public synchronized void processSocket(int[] arr) throws Exception {
|
||||
device_code = this.getDeviceCode();
|
||||
byte[] data = null;
|
||||
@@ -81,6 +81,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
agvaddr = arr[18] * 256 + arr[19];
|
||||
//车号
|
||||
int carno = arr[20];
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "接收agv上报信息:" + "phase--" + phase + " index--" + index + " 指令号--" + ikey + " 站点号--" + agvaddr + " 车号--" + carno);
|
||||
Instruction link_inst = null;
|
||||
List<Instruction> insts = null;
|
||||
Instruction inst = null;
|
||||
@@ -126,7 +127,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
if (phase == 0x02) {
|
||||
inst.setCarno(String.valueOf(carno));
|
||||
instructionService.update(inst);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + "反馈:" + data);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈车号:" +carno+",指令号:" + ikey);
|
||||
|
||||
//到达取货点
|
||||
//(需要WCS反馈)
|
||||
@@ -202,8 +203,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
if (device.getDeviceDriver() instanceof StandardStorageDeviceDriver) {
|
||||
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||
|
||||
//取货完毕
|
||||
//(需要WCS反馈)
|
||||
} else if (phase == 0x05) {
|
||||
@@ -291,8 +290,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
}
|
||||
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||
|
||||
if(ObjectUtil.isNotEmpty(data)){
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + Bytes2HexString(data));
|
||||
}
|
||||
//到达放货点
|
||||
//(需要WCS反馈)
|
||||
} else if (phase == 0x07) {
|
||||
@@ -330,9 +330,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
|
||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
||||
// standardOrdinarySiteDeviceDriver.setAgvphase(phase);
|
||||
// standardOrdinarySiteDeviceDriver.setIndex(index);
|
||||
// standardOrdinarySiteDeviceDriver.setInst(inst);
|
||||
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
|
||||
}
|
||||
|
||||
@@ -342,8 +339,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
}
|
||||
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||
|
||||
//放货完毕
|
||||
//(需要WCS反馈)
|
||||
} else if (phase == 0x09) {
|
||||
@@ -387,15 +382,10 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
|
||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
||||
// standardOrdinarySiteDeviceDriver.setAgvphase(phase);
|
||||
// standardOrdinarySiteDeviceDriver.setIndex(index);
|
||||
// standardOrdinarySiteDeviceDriver.setInst(inst);
|
||||
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
|
||||
}
|
||||
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||
|
||||
}
|
||||
//到达位置点
|
||||
//(需要WCS反馈)
|
||||
@@ -404,18 +394,28 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
agvaddr = arr[18] * 256 + arr[19];
|
||||
agvaddr_copy = agvaddr;
|
||||
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||
} else if (phase == 0x50) {//进入交通灯区域
|
||||
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||
} else if (phase == 0x51) {//离开交通灯区域
|
||||
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(data)) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" +Bytes2HexString(data));
|
||||
OneNDCSocketConnectionAutoRun.write(data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static String Bytes2HexString(byte[] b) {
|
||||
String ret = "";
|
||||
for (int i = 0; i < b.length; i++) {
|
||||
String hex = Integer.toHexString(b[i] & 0xFF);
|
||||
if (hex.length() == 1) {
|
||||
hex = '0' + hex;
|
||||
}
|
||||
ret += hex.toUpperCase();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
int phase = 0;
|
||||
int region = 0;
|
||||
|
||||
@LokiLog(type = LokiLogType.ACS_TO_LMS)
|
||||
@LokiLog(type = LokiLogType.AGV)
|
||||
public synchronized void processSocket(int[] arr) throws Exception {
|
||||
device_code = this.getDeviceCode();
|
||||
byte[] data = null;
|
||||
@@ -63,6 +63,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
agvaddr = arr[18] * 256 + arr[19];
|
||||
//车号
|
||||
int carno = arr[20];
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "接收agv上报信息:" + "phase--" + phase + " index--" + index + " 指令号--" + ikey + " 站点号--" + agvaddr + " 车号--" + carno);
|
||||
Instruction inst = null;
|
||||
Device agv_device = null;
|
||||
if (carno != 0) {
|
||||
@@ -105,7 +106,8 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
}
|
||||
inst.setCarno(String.valueOf(carno));
|
||||
instructionService.update(inst);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + "反馈:" + data);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈车号:" +carno+",指令号:" + ikey);
|
||||
|
||||
}
|
||||
//到达取货点
|
||||
//(Itype=1/2/3,需要WCS反馈Phase)
|
||||
@@ -163,7 +165,6 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
}
|
||||
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||
}
|
||||
// 取货完毕
|
||||
//(Itype=1/2/3,需要WCS反馈Phase)
|
||||
@@ -200,7 +201,6 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
return;
|
||||
}
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||
}
|
||||
//到达取货点(Itype=1、3,需要WCS反馈)
|
||||
else if (phase == 0x08) {
|
||||
@@ -236,7 +236,6 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
String agv_inst_type = inst.getAgv_inst_type();
|
||||
if (StrUtil.equals(agv_inst_type, "1") || StrUtil.equals(agv_inst_type, "3")) {
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||
}
|
||||
}
|
||||
// 取货完毕
|
||||
@@ -275,7 +274,6 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
String agv_inst_type = inst.getAgv_inst_type();
|
||||
if (StrUtil.equals(agv_inst_type, "1") || StrUtil.equals(agv_inst_type, "3")) {
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -289,10 +287,9 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
//上传称重数据
|
||||
if (StrUtil.equals(instruction_type, "1")) {
|
||||
weight = agvaddr;
|
||||
// inst.setWeight(String.valueOf(weight));
|
||||
// instructionService.update(inst);
|
||||
inst.setWeight(String.valueOf(weight));
|
||||
instructionService.update(inst);
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||
}
|
||||
}
|
||||
// 到达放货点
|
||||
@@ -329,7 +326,6 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
return;
|
||||
}
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||
}
|
||||
//放货完成
|
||||
//(Itype=1/2/3,需要WCS反馈)
|
||||
@@ -365,7 +361,6 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
return;
|
||||
}
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||
}
|
||||
//到达放货点
|
||||
//(Itype=1、3,需要WCS反馈)
|
||||
@@ -403,7 +398,6 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
String agv_inst_type = inst.getAgv_inst_type();
|
||||
if (StrUtil.equals(agv_inst_type, "1") || StrUtil.equals(agv_inst_type, "3")) {
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||
}
|
||||
}
|
||||
//放货完成
|
||||
@@ -442,7 +436,6 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
String agv_inst_type = inst.getAgv_inst_type();
|
||||
if (StrUtil.equals(agv_inst_type, "1") || StrUtil.equals(agv_inst_type, "3")) {
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||
}
|
||||
}
|
||||
//上传AGV电量
|
||||
@@ -453,7 +446,6 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
}
|
||||
agv_power = ikey;
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||
|
||||
} //进入区域(phase值)
|
||||
else if (phase == 0x50) {
|
||||
@@ -463,7 +455,6 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
}
|
||||
region = agvaddr;
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||
|
||||
}
|
||||
//离开区域(phase值)
|
||||
@@ -474,8 +465,6 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
}
|
||||
region = agvaddr;
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||
|
||||
}
|
||||
//上报异常信息
|
||||
//(不需要WCS反馈)
|
||||
@@ -484,10 +473,9 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
if (agvaddr == 0) {
|
||||
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(data)) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" +Bytes2HexString(data));
|
||||
if (StrUtil.equals(inst.getAgv_system_type(), "2")) {
|
||||
TwoNDCSocketConnectionAutoRun.write(data);
|
||||
} else if (StrUtil.equals(inst.getAgv_system_type(), "3")) {
|
||||
@@ -496,4 +484,17 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static String Bytes2HexString(byte[] b) {
|
||||
String ret = "";
|
||||
for (int i = 0; i < b.length; i++) {
|
||||
String hex = Integer.toHexString(b[i] & 0xFF);
|
||||
if (hex.length() == 1) {
|
||||
hex = '0' + hex;
|
||||
}
|
||||
ret += hex.toUpperCase();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -193,8 +193,6 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
|
||||
}
|
||||
|
||||
if (finish == 1 && !requireSucess) {
|
||||
message = "烘箱完成反馈LMS...";
|
||||
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "开始烘箱完成反馈lms~");
|
||||
//烘箱完成反馈LMS
|
||||
apply_finish();
|
||||
}
|
||||
@@ -354,6 +352,8 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
|
||||
return false;
|
||||
} else {
|
||||
this.instruction_apply_time = date;
|
||||
message = "烘箱完成反馈LMS...";
|
||||
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "开始烘箱完成反馈lms~");
|
||||
ApplyLabelingAndBindingRequest applyLabelingAndBindingRequest = new ApplyLabelingAndBindingRequest();
|
||||
JSONObject device_json = WQLObject.getWQLObject("acs_storage_cell").query("storage_code ='" + this.device_code + "'").uniqueResult(0);
|
||||
String start_point_code = null;
|
||||
@@ -366,10 +366,10 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
|
||||
if (applyLabelingAndBindingResponse.getstatus() == 200) {
|
||||
requireSucess = true;
|
||||
message = "烘箱完成反馈LMS成功...";
|
||||
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "烘箱完成反馈lms响应消息:" + String.valueOf(applyLabelingAndBindingResponse));
|
||||
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "烘箱完成反馈LMS响应消息:" + String.valueOf(applyLabelingAndBindingResponse));
|
||||
} else {
|
||||
message = "烘箱完成反馈LMS失败,"+String.valueOf(applyLabelingAndBindingResponse);
|
||||
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "烘箱完成反馈lms响应消息:" + String.valueOf(applyLabelingAndBindingResponse));
|
||||
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "烘箱完成反馈LMS响应消息:" + String.valueOf(applyLabelingAndBindingResponse));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -128,6 +128,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
if (mode == 2) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号复位前requireSuccess:" + requireSucess);
|
||||
this.setRequireSucess(false);
|
||||
this.setNow_steps_type(0);
|
||||
message = null;
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号复位后requireSuccess:" + requireSucess);
|
||||
}
|
||||
@@ -204,16 +205,16 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
if (this.getNow_steps_type() == 2) {
|
||||
feedMessage = "烘箱:" + hongXiangConveyorDeviceDriver.getDevice_code();
|
||||
if (mode != 1) {
|
||||
feedMessage = feedMessage + "mode未联机,";
|
||||
feedMessage = feedMessage + "工作模式(mode)信号未联机,";
|
||||
}
|
||||
if (door != 1) {
|
||||
feedMessage = feedMessage + "door未开门,";
|
||||
feedMessage = feedMessage + "门状态(door)信号未开门,";
|
||||
}
|
||||
if (action != 1) {
|
||||
feedMessage = feedMessage + "action未允许取放,";
|
||||
feedMessage = feedMessage + "允许取放(action)信号未允许取放,";
|
||||
}
|
||||
if (error1 != 0) {
|
||||
feedMessage = feedMessage + "error1出现故障。";
|
||||
feedMessage = feedMessage + "故障(error1)信号出现故障,故障值:" + error1 + "。";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -230,16 +231,16 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
if (this.getNow_steps_type() == 2) {
|
||||
feedMessage = "行架机械手:";
|
||||
if (mode != 3) {
|
||||
feedMessage = feedMessage + "mode不为运行中状态,";
|
||||
feedMessage = feedMessage + "工作模式(mode)不为运行中状态,";
|
||||
}
|
||||
if (action != 1) {
|
||||
feedMessage = feedMessage + "action不为取货中状态,";
|
||||
feedMessage = feedMessage + "动作信号(action)不为取货中状态,";
|
||||
}
|
||||
if (move != 0) {
|
||||
feedMessage = feedMessage + "move不为无货状态,";
|
||||
feedMessage = feedMessage + "光电信号(move)不为无货状态,";
|
||||
}
|
||||
if (task == 0) {
|
||||
feedMessage = feedMessage + "task为0。";
|
||||
feedMessage = feedMessage + "当前上报任务号(task)不应该为0。";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -266,16 +267,16 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
if (this.getNow_steps_type() == 3) {
|
||||
feedMessage = "行架机械手:";
|
||||
if (mode != 3) {
|
||||
feedMessage = feedMessage + "mode不为运行中状态,";
|
||||
feedMessage = feedMessage + "工作模式(mode)不为运行中状态,";
|
||||
}
|
||||
if (action != 2) {
|
||||
feedMessage = feedMessage + "action不为取货完成状态,";
|
||||
feedMessage = feedMessage + "动作信号(action)不为取货完成状态,";
|
||||
}
|
||||
if (move != 1) {
|
||||
feedMessage = feedMessage + "move不为有货状态,";
|
||||
feedMessage = feedMessage + "光电信号(move)不为有货状态,";
|
||||
}
|
||||
if (task == 0) {
|
||||
feedMessage = feedMessage + "task为0。";
|
||||
feedMessage = feedMessage + "当前上报任务号(task)不应该为0。";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -303,16 +304,16 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
} else {
|
||||
feedMessage = "烘箱:" + hongXiangConveyorDeviceDriver.getDevice_code();
|
||||
if (mode != 1) {
|
||||
feedMessage = feedMessage + "mode未联机,";
|
||||
feedMessage = feedMessage + "工作模式(mode)信号未联机,";
|
||||
}
|
||||
if (door != 1) {
|
||||
feedMessage = feedMessage + "door未开门,";
|
||||
feedMessage = feedMessage + "门状态(door)信号未开门,";
|
||||
}
|
||||
if (action != 1) {
|
||||
feedMessage = feedMessage + "action未允许取放,";
|
||||
feedMessage = feedMessage + "允许取放(action)信号未允许取放,";
|
||||
}
|
||||
if (error1 != 0) {
|
||||
feedMessage = feedMessage + "error1出现故障。";
|
||||
feedMessage = feedMessage + "故障(error1)信号出现故障。";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -327,16 +328,16 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
if (this.getNow_steps_type() == 4) {
|
||||
feedMessage = "行架机械手:";
|
||||
if (mode != 3) {
|
||||
feedMessage = feedMessage + "mode不为运行中状态,";
|
||||
feedMessage = feedMessage + "工作模式(mode)不为运行中状态,";
|
||||
}
|
||||
if (action != 3) {
|
||||
feedMessage = feedMessage + "action不为放货中状态,";
|
||||
feedMessage = feedMessage + "动作信号(action)不为放货中状态,";
|
||||
}
|
||||
if (move != 1) {
|
||||
feedMessage = feedMessage + "move不为有货状态,";
|
||||
feedMessage = feedMessage + "光电信号(move)不为有货状态,";
|
||||
}
|
||||
if (task == 0) {
|
||||
feedMessage = feedMessage + "task为0。";
|
||||
feedMessage = feedMessage + "当前上报任务号(task)不应该为0。";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -391,16 +392,16 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
if (this.getNow_steps_type() == 5) {
|
||||
feedMessage = "行架机械手:";
|
||||
if (mode != 3) {
|
||||
feedMessage = feedMessage + "mode不为运行中状态,";
|
||||
feedMessage = feedMessage + "工作模式(mode)不为运行中状态,";
|
||||
}
|
||||
if (action != 4) {
|
||||
feedMessage = feedMessage + "action不为放货完成状态,";
|
||||
feedMessage = feedMessage + "动作信号(action)不为放货完成状态,";
|
||||
}
|
||||
if (move != 0) {
|
||||
feedMessage = feedMessage + "move不为无货状态,";
|
||||
feedMessage = feedMessage + "光电信号(move)不为无货状态,";
|
||||
}
|
||||
if (task == 0) {
|
||||
feedMessage = feedMessage + "task为0。";
|
||||
feedMessage = feedMessage + "当前上报任务号(task)不应该为0。";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -442,16 +443,16 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
//if (!requireSucess) {
|
||||
String remark = "未查找任务原因为:";
|
||||
if (mode != 2) {
|
||||
remark = remark + "mode不是待机状态,";
|
||||
remark = remark + "工作模式(mode)不是待机状态,";
|
||||
}
|
||||
if (move != 0) {
|
||||
remark = remark + "move为有货状态,";
|
||||
remark = remark + "光电信号(move)为有货状态,";
|
||||
}
|
||||
if (task != 0) {
|
||||
remark = remark + "task任务号不为0,";
|
||||
remark = remark + "当前上报任务号(task)应该为0,";
|
||||
}
|
||||
if (requireSucess) {
|
||||
remark = remark + "请求标记requireSucess为true。";
|
||||
remark = remark + "请右击该图标,将请求任务复位标记(requireSucess)改为否。";
|
||||
}
|
||||
this.setNotCreateTaskMessage(remark);
|
||||
//}
|
||||
@@ -828,7 +829,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
String requestSucess = data.getString("requireSucess");
|
||||
if (StrUtil.equals(requestSucess, "0")) {
|
||||
this.requireSucess = false;
|
||||
} else if(StrUtil.equals(requestSucess, "1")) {
|
||||
} else if (StrUtil.equals(requestSucess, "1")) {
|
||||
this.requireSucess = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
device_code, "", "", "入库输送线任务开始反馈执行中状态,反馈失败任务状态不为就绪或者执行中状态,指令号:" + task);
|
||||
}
|
||||
} else {
|
||||
logServer.deviceExecuteLog(device_code, "", "", "入库输送线任务开始反馈任务状态,反馈失败,查询不到指令号:" + task);
|
||||
// logServer.deviceExecuteLog(device_code, "", "", "入库输送线任务开始反馈任务状态,反馈失败,查询不到指令号:" + task);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
|
||||
|
||||
@Override
|
||||
public synchronized void execute(){
|
||||
public synchronized void execute() {
|
||||
String message = null;
|
||||
try {
|
||||
device_code = this.getDeviceCode();
|
||||
@@ -163,6 +163,9 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
if (mode == 2) {
|
||||
logServer.deviceExecuteLog(device_code, "", "", "开始请求标记复位`此时请求标记值为:" + requireSucess);
|
||||
requireSucess = false;
|
||||
this.setNow_steps_type1(0);
|
||||
this.setNow_steps_type2(0);
|
||||
this.setNow_steps_type3(0);
|
||||
logServer.deviceExecuteLog(device_code, "", "", "请求标记复位成功`此时请求标记值为:" + requireSucess);
|
||||
}
|
||||
logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode));
|
||||
@@ -280,7 +283,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
int move = siemensConveyorDeviceDriver.getMove();
|
||||
int mode = siemensConveyorDeviceDriver.getMode();
|
||||
if (mode == 2 && move == 1) {
|
||||
if(to_command2 != 2){
|
||||
if (to_command2 != 2) {
|
||||
this.writing("to_command2", "2");
|
||||
}
|
||||
if (type == 2) {
|
||||
@@ -291,11 +294,12 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
} else {
|
||||
log.warn("后工位取货位无货,取货位:{},mode:{},move:{}", start_device_code, mode, move);
|
||||
if (this.getNow_steps_type2() == 2 || this.getNow_steps_type3() == 2) {
|
||||
feedMessage = "后工位未取货原因-->";
|
||||
feedMessage = "后工位未取货原因-->取货位:" + siemensConveyorDeviceDriver.getDevice_code();
|
||||
if (mode != 2) {
|
||||
feedMessage += "后工位取货位工作模式不为待机(mode != 2),";
|
||||
} else if (move != 1) {
|
||||
feedMessage += "后工位取货位无货(move != 1)";
|
||||
feedMessage += "工作模式不为待机(mode != 2),";
|
||||
}
|
||||
if (move != 1) {
|
||||
feedMessage += "光电信号不应该为无货状态(move != 1)";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -310,17 +314,17 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
feedMessage += "后工位动作信号不为取货中(action2 != 1),";
|
||||
}
|
||||
if (move2 != 0) {
|
||||
feedMessage += "后工位光电信号不为空(move2 != 0),";
|
||||
feedMessage += "后工位光电信号应该为0(move2 != 0),";
|
||||
}
|
||||
if (task2 == 0) {
|
||||
feedMessage += "后工位没有任务(task2 == 0)";
|
||||
feedMessage += "后工位没有任务号(task2 == 0)";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//单任务/或双任务 后工位收到取货完成信号并反馈
|
||||
if (mode == 3 && action2 == 2 && move2 == 1 && task2 > 0) {
|
||||
if(to_command2 != 3){
|
||||
if (to_command2 != 3) {
|
||||
this.writing("to_command2", "3");
|
||||
}
|
||||
if (type == 2) {
|
||||
@@ -336,20 +340,20 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
feedMessage += "行架工作模式不为运行中(mode != 3),";
|
||||
}
|
||||
if (action2 != 2) {
|
||||
feedMessage += "后工位未取货完成(action2 != 2),";
|
||||
feedMessage += "后工位动作信号未取货完成(action2 != 2),";
|
||||
}
|
||||
if (move2 == 0) {
|
||||
feedMessage += "后工位光电信号为空(move2 == 0),";
|
||||
feedMessage += "后工位光电信号不应该为0(move2 == 0),";
|
||||
}
|
||||
if (task2 == 0) {
|
||||
feedMessage += "后工位没有任务(task2 == 0)";
|
||||
feedMessage += "后工位没有任务号(task2 == 0)";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//单任务/双任务 前工位取货时判断动作信号并反馈
|
||||
if (mode == 3 && action1 == 1 && move1 == 0 && task1 > 0) {
|
||||
if(to_command1 != 2){
|
||||
if (to_command1 != 2) {
|
||||
this.writing("to_command1", "2");
|
||||
}
|
||||
if (type == 1) {
|
||||
@@ -359,7 +363,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
}
|
||||
} else {
|
||||
if (this.getNow_steps_type1() == 2 || this.getNow_steps_type3() == 4) {
|
||||
feedMessage = "前工位未取货原因";
|
||||
feedMessage = "前工位未取货原因:";
|
||||
if (mode != 3) {
|
||||
feedMessage += "行架工作模式不为运行中(mode != 3),";
|
||||
}
|
||||
@@ -367,17 +371,17 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
feedMessage += "前工位动作信号不为取货中(action2 != 1),";
|
||||
}
|
||||
if (move1 != 0) {
|
||||
feedMessage += "前工位光电信号不为空(move2 != 0),";
|
||||
feedMessage += "前工位光电信号应该为0(move2 != 0),";
|
||||
}
|
||||
if (task1 == 0) {
|
||||
feedMessage += "前工位没有任务(task2 == 0)";
|
||||
feedMessage += "前工位没有任务号(task2 == 0)";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//单任务/双任务 前工位取货完成并反馈
|
||||
if (mode == 3 && action1 == 2 && move1 == 1 && task1 > 0) {
|
||||
if(to_command1 != 3){
|
||||
if (to_command1 != 3) {
|
||||
this.writing("to_command1", "3");
|
||||
}
|
||||
if (type == 1) {
|
||||
@@ -393,13 +397,13 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
feedMessage += "行架工作模式不为运行中(mode != 3),";
|
||||
}
|
||||
if (action1 != 2) {
|
||||
feedMessage += "前工位未取货完成(action2 != 2),";
|
||||
feedMessage += "前工位动作信号未取货完成(action2 != 2),";
|
||||
}
|
||||
if (move1 == 0) {
|
||||
feedMessage += "前工位光电信号为空(move2 == 0),";
|
||||
feedMessage += "前工位光电信号不应该为无货状态(move2 == 0),";
|
||||
}
|
||||
if (task1 == 0) {
|
||||
feedMessage += "前工位没有任务(task2 == 0)";
|
||||
feedMessage += "前工位没有任务号(task2 == 0)";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -407,7 +411,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
|
||||
//单任务/双任务 后工位放货时判断信号并反馈
|
||||
if (mode == 3 && action2 == 3 && move2 == 1 && task2 > 0) {
|
||||
if(to_command2 != 4){
|
||||
if (to_command2 != 4) {
|
||||
this.writing("to_command2", "4");
|
||||
}
|
||||
if (type == 2) {
|
||||
@@ -425,10 +429,10 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
feedMessage += "后工位动作信号不为放货中(action2 != 3),";
|
||||
}
|
||||
if (move2 == 0) {
|
||||
feedMessage += "后工位光电信号为空(move2 == 0),";
|
||||
feedMessage += "后工位光电信号为不应该为0(move2 == 0),";
|
||||
}
|
||||
if (task2 == 0) {
|
||||
feedMessage += "后工位没有任务(task2 == 0)";
|
||||
feedMessage += "后工位没有任务号(task2 == 0)";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -440,7 +444,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
if (inst2 != null) {
|
||||
if (StrUtil.equals(inst2.getInstruction_status(), "1")) {
|
||||
finish_instruction(inst2);
|
||||
if(to_command2 != 5){
|
||||
if (to_command2 != 5) {
|
||||
this.writing("to_command2", "5");
|
||||
}
|
||||
this.setNow_steps_type2(6);
|
||||
@@ -454,13 +458,13 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
feedMessage += "行架工作模式不为运行中(mode != 3),";
|
||||
}
|
||||
if (action2 != 4) {
|
||||
feedMessage += "后工位未放货完成(action2 != 4),";
|
||||
feedMessage += "后工位动作信号未放货完成(action2 != 4),";
|
||||
}
|
||||
if (move2 != 0) {
|
||||
feedMessage += "后工位光电信号为有货(move2 != 0),";
|
||||
feedMessage += "后工位光电信号应该为无货状态(move2 != 0),";
|
||||
}
|
||||
if (task2 == 0) {
|
||||
feedMessage += "后工位没有任务(task2 == 0),";
|
||||
feedMessage += "后工位没有任务号(task2 == 0),";
|
||||
}
|
||||
if (type != 2) {
|
||||
feedMessage += "不是后工位单任务(type != 2)";
|
||||
@@ -470,7 +474,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
|
||||
//双任务 后工位反馈任务完成 并反馈
|
||||
if (mode == 3 && action2 == 4 && move2 == 0 && task1 > 0 && task2 > 0 && type == 3) {
|
||||
if(to_command2 != 5){
|
||||
if (to_command2 != 5) {
|
||||
this.writing("to_command2", "5");
|
||||
}
|
||||
this.setNow_steps_type3(8);
|
||||
@@ -481,16 +485,16 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
feedMessage += "行架工作模式不为运行中(mode != 3),";
|
||||
}
|
||||
if (action2 != 4) {
|
||||
feedMessage += "后工位未放货完成(action2 != 4),";
|
||||
feedMessage += "后工位动作信号未放货完成(action2 != 4),";
|
||||
}
|
||||
if (move2 != 0) {
|
||||
feedMessage += "后工位光电信号为有货(move2 != 0),";
|
||||
feedMessage += "后工位光电信号不应该为有货状态(move2 != 0),";
|
||||
}
|
||||
if (task1 == 0) {
|
||||
feedMessage += "前工位没有任务(task1 == 0),";
|
||||
feedMessage += "前工位没有任务号(task1 == 0),";
|
||||
}
|
||||
if (task2 == 0) {
|
||||
feedMessage += "后工位没有任务(task2 == 0),";
|
||||
feedMessage += "后工位没有任务号(task2 == 0),";
|
||||
}
|
||||
if (type != 3) {
|
||||
feedMessage += "不是双任务(type != 3)";
|
||||
@@ -518,7 +522,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
int move = siemensConveyorDeviceDriver.getMove();
|
||||
int mode = siemensConveyorDeviceDriver.getMode();
|
||||
if (move == 1 && mode == 2) {
|
||||
if(to_command1 != 4){
|
||||
if (to_command1 != 4) {
|
||||
this.writing("to_command1", "4");
|
||||
}
|
||||
if (type == 1) {
|
||||
@@ -531,9 +535,10 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
if (this.getNow_steps_type1() == 4 || this.getNow_steps_type3() == 8) {
|
||||
feedMessage = "前工位未放货原因-->";
|
||||
if (mode != 2) {
|
||||
feedMessage += "前工位放货位工作模式不为待机(mode != 2),";
|
||||
} else if (move == 0) {
|
||||
feedMessage += "前工位放货位无货(move == 0)";
|
||||
feedMessage += "前工位放货位工作模式不为待机状态(mode != 2),";
|
||||
}
|
||||
if (move == 0) {
|
||||
feedMessage += "前工位放货位不应该为无货状态(move == 0)";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -548,10 +553,10 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
feedMessage += "前工位动作信号不为放货中(action1 != 3),";
|
||||
}
|
||||
if (move1 == 0) {
|
||||
feedMessage += "前工位光电信号为空(move1 == 0),";
|
||||
feedMessage += "前工位光电信号不应为无货状态(move1 == 0),";
|
||||
}
|
||||
if (task1 == 0) {
|
||||
feedMessage += "前工位没有任务(task1 == 0),";
|
||||
feedMessage += "前工位没有任务号(task1 == 0),";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -564,7 +569,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
if (inst1 != null) {
|
||||
if (StrUtil.equals(inst1.getInstruction_status(), "1")) {
|
||||
this.finish_instruction(inst1);
|
||||
if(to_command1 != 5){
|
||||
if (to_command1 != 5) {
|
||||
this.writing("to_command1", "5");
|
||||
}
|
||||
this.setNow_steps_type1(6);
|
||||
@@ -578,13 +583,13 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
feedMessage += "行架工作模式不为运行中(mode != 3),";
|
||||
}
|
||||
if (action1 != 4) {
|
||||
feedMessage += "前工位未放货完成(action1 != 4),";
|
||||
feedMessage += "前工位动作信号未放货完成(action1 != 4),";
|
||||
}
|
||||
if (move1 != 0) {
|
||||
feedMessage += "前工位光电信号为有货(move1 != 0),";
|
||||
feedMessage += "前工位光电信号为不应为有货状态(move1 != 0),";
|
||||
}
|
||||
if (task1 == 0) {
|
||||
feedMessage += "前工位没有任务(task1 == 0),";
|
||||
feedMessage += "前工位没有任务号(task1 == 0),";
|
||||
}
|
||||
if (type != 1) {
|
||||
feedMessage += "不为前工位单任务(type != 1)";
|
||||
@@ -600,7 +605,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
if (inst1 != null) {
|
||||
if (StrUtil.equals(inst1.getInstruction_status(), "1")) {
|
||||
this.finish_instruction(inst1);
|
||||
if(to_command1 != 5){
|
||||
if (to_command1 != 5) {
|
||||
this.writing("to_command1", "5");
|
||||
}
|
||||
this.setNow_steps_type3(10);
|
||||
@@ -614,16 +619,16 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
feedMessage += "行架工作模式不为运行中(mode != 3),";
|
||||
}
|
||||
if (action1 != 4) {
|
||||
feedMessage += "前工位未放货完成(action1 != 4),";
|
||||
feedMessage += "前工位动作信号未放货完成(action1 != 4),";
|
||||
}
|
||||
if (move1 != 0) {
|
||||
feedMessage += "前工位光电信号为有货(move1 != 0),";
|
||||
feedMessage += "前工位光电信号为不应为有货状态(move1 != 0),";
|
||||
}
|
||||
if (task1 == 0) {
|
||||
feedMessage += "前工位没有任务(task1 == 0),";
|
||||
}
|
||||
if (task2 == 0) {
|
||||
feedMessage += "后工位没有任务(task2 == 0),";
|
||||
feedMessage += "后工位没有任务号(task2 == 0),";
|
||||
}
|
||||
if (type != 3) {
|
||||
feedMessage += "不是双任务(type != 3)";
|
||||
@@ -688,10 +693,10 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
remark = remark + "行架工作模式不为待机(mode != 2),";
|
||||
}
|
||||
if (move1 != 0) {
|
||||
remark = remark + "前工位有货(move1 != 0),";
|
||||
remark = remark + "前工位光电信号不应该为有货状态(move1 != 0),";
|
||||
}
|
||||
if (move2 != 0) {
|
||||
remark = remark + "后工位有货(move2 != 0),";
|
||||
remark = remark + "后工位光电信号不应该为有货状态(move2 != 0),";
|
||||
}
|
||||
if (action1 != 0) {
|
||||
remark = remark + "前工位动作信号不为0(action1 != 0),";
|
||||
@@ -700,10 +705,10 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
remark = remark + "后工位动作信号不为0(action2 != 0),";
|
||||
}
|
||||
if (task1 != 0) {
|
||||
remark = remark + "前工位存在任务(task1 != 0),";
|
||||
remark = remark + "前工位存在任务号(task1 != 0),";
|
||||
}
|
||||
if (task2 != 0) {
|
||||
remark = remark + "后工位存在任务(task2 != 0),";
|
||||
remark = remark + "后工位存在任务号(task2 != 0),";
|
||||
}
|
||||
this.setNotCreateTaskMessage(remark);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<included>
|
||||
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
|
||||
<property name="LOG_HOME" value="${logPath}"/>
|
||||
<!-- 按照每天生成日志文件 -->
|
||||
<appender name="FILE19" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!--日志文件输出的文件名-->
|
||||
<FileNamePattern>${LOG_HOME}/AgvNdcTwoDeviceDriver/%d{yyyy-MM-dd}.%i.log</FileNamePattern>
|
||||
<!--日志文件保留天数-->
|
||||
<maxHistory>15</maxHistory>
|
||||
<!--单个日志最大容量 至少10MB才能看得出来-->
|
||||
<maxFileSize>200MB</maxFileSize>
|
||||
<!--所有日志最多占多大容量-->
|
||||
<totalSizeCap>2GB</totalSizeCap>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||
<charset>${log.charset}</charset>
|
||||
</encoder>
|
||||
|
||||
</appender>
|
||||
|
||||
<!-- <logger name="org.nl.start.Init" level="info" additivity="false">
|
||||
<appender-ref ref="FILE3"/>
|
||||
</logger>-->
|
||||
|
||||
<!-- 打印sql -->
|
||||
<logger name="org.nl.acs.device_driver.basedriver.agv.ndctwo.AgvNdcTwoDeviceDriver" level="info" additivity="false">
|
||||
<appender-ref ref="FILE19"/>
|
||||
</logger>
|
||||
</included>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<included>
|
||||
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
|
||||
<property name="LOG_HOME" value="${logPath}"/>
|
||||
<!-- 按照每天生成日志文件 -->
|
||||
<appender name="FILE18" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!--日志文件输出的文件名-->
|
||||
<FileNamePattern>${LOG_HOME}/二楼2NDC系统/%d{yyyy-MM-dd}.%i.log</FileNamePattern>
|
||||
<!--日志文件保留天数-->
|
||||
<maxHistory>15</maxHistory>
|
||||
<!--单个日志最大容量 至少10MB才能看得出来-->
|
||||
<maxFileSize>200MB</maxFileSize>
|
||||
<!--所有日志最多占多大容量-->
|
||||
<totalSizeCap>2GB</totalSizeCap>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||
<charset>${log.charset}</charset>
|
||||
</encoder>
|
||||
|
||||
</appender>
|
||||
|
||||
<!-- <logger name="org.nl.start.Init" level="info" additivity="false">
|
||||
<appender-ref ref="FILE3"/>
|
||||
</logger>-->
|
||||
|
||||
<!-- 打印sql -->
|
||||
<logger name="org.nl.acs.auto.run.TwoNDC2SocketConnectionAutoRun" level="info" additivity="false">
|
||||
<appender-ref ref="FILE18"/>
|
||||
</logger>
|
||||
</included>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<included>
|
||||
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
|
||||
<property name="LOG_HOME" value="${logPath}"/>
|
||||
<!-- 按照每天生成日志文件 -->
|
||||
<appender name="FILE17" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!--日志文件输出的文件名-->
|
||||
<FileNamePattern>${LOG_HOME}/二楼1NDC系统/%d{yyyy-MM-dd}.%i.log</FileNamePattern>
|
||||
<!--日志文件保留天数-->
|
||||
<maxHistory>15</maxHistory>
|
||||
<!--单个日志最大容量 至少10MB才能看得出来-->
|
||||
<maxFileSize>200MB</maxFileSize>
|
||||
<!--所有日志最多占多大容量-->
|
||||
<totalSizeCap>2GB</totalSizeCap>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||
<charset>${log.charset}</charset>
|
||||
</encoder>
|
||||
|
||||
</appender>
|
||||
|
||||
<!-- <logger name="org.nl.start.Init" level="info" additivity="false">
|
||||
<appender-ref ref="FILE3"/>
|
||||
</logger>-->
|
||||
|
||||
<!-- 打印sql -->
|
||||
<logger name="org.nl.acs.auto.run.TwoNDCSocketConnectionAutoRun" level="info" additivity="false">
|
||||
<appender-ref ref="FILE17"/>
|
||||
</logger>
|
||||
</included>
|
||||
@@ -39,6 +39,9 @@ https://juejin.cn/post/6844903775631572999
|
||||
<include resource="log/AcsToWms.xml"/>
|
||||
<include resource="log/WmsToAcs.xml"/>
|
||||
<include resource="log/OpcUtil.xml"/>
|
||||
<include resource="log/TwoNDCSocketConnectionAutoRun.xml"/>
|
||||
<include resource="log/TwoNdcOneDeviceDriver.xml"/>
|
||||
<include resource="log/TwoNDC2SocketConnectionAutoRun.xml"/>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
<template>
|
||||
<!--agv双工位-->
|
||||
<!--agv单工位-->
|
||||
<div>
|
||||
<el-card class="box-card" shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<span class="role-span">设备协议:</span>
|
||||
<span class="role-span">指令相关:</span>
|
||||
</div>
|
||||
|
||||
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="small" label-width="78px">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="扫码器ip:" label-width="150px" prop="x">
|
||||
<el-input v-model.trim="form.ip_address" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-form ref="form" :inline="true" :model="form" size="small" label-width="95px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="ip地址" prop="ip_address">
|
||||
<el-input
|
||||
v-model="form.ip_address"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="box-card" shadow="never">
|
||||
@@ -28,20 +30,19 @@
|
||||
</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {
|
||||
queryDriverConfig,
|
||||
updateConfig
|
||||
} from '@/api/acs/device/driverConfig'
|
||||
|
||||
import crud from '@/mixins/crud'
|
||||
import deviceCrud from '@/api/acs/device/device'
|
||||
|
||||
export default {
|
||||
name: 'StandardScanner',
|
||||
name: 'StandardConveyorControl',
|
||||
mixins: [crud],
|
||||
props: {
|
||||
parentForm: {
|
||||
@@ -52,9 +53,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
scannerIP: ''
|
||||
},
|
||||
rules: {
|
||||
ip_address: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -72,19 +71,7 @@ export default {
|
||||
this.form = data.form
|
||||
}
|
||||
}
|
||||
|
||||
// 给表单赋值,并且属性不能为空
|
||||
if (data.parentForm) {
|
||||
const arr = Object.keys(data.parentForm)
|
||||
// 不为空
|
||||
if (arr.length > 0) {
|
||||
this.opc_code = data.parentForm.opc_code
|
||||
this.plc_code = data.parentForm.plc_code
|
||||
}
|
||||
}
|
||||
})
|
||||
deviceCrud.selectDeviceList().then(data => {
|
||||
this.deviceList = data
|
||||
this.sliceItem()
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -95,6 +82,7 @@ export default {
|
||||
this.configLoading = true
|
||||
// 根据驱动类型判断是否为路由设备
|
||||
const parentForm = this.parentForm
|
||||
parentForm.is_route = true
|
||||
updateConfig(parentForm, this.form, this.data1, this.data2).then(res => {
|
||||
this.notify('保存成功', 'success')
|
||||
this.configLoading = false
|
||||
|
||||
@@ -522,7 +522,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
result.put("status", HttpStatus.OK.value());
|
||||
result.put("message", "反馈成功!");
|
||||
|
||||
<<<<<<< HEAD
|
||||
RLock lock = redissonClient.getLock("acs_to_deviceApply_wms:" + type);
|
||||
=======
|
||||
RLock lock = redissonClient.getLock("AcsToWmsServiceImpl_deviceApply:" + type);
|
||||
>>>>>>> 977110a29f1889255889822be9a0ba275ad2fde6
|
||||
boolean tryLock = lock.tryLock(5, TimeUnit.SECONDS);
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user