|
|
@ -199,6 +199,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
return; |
|
|
|
} |
|
|
|
// "========================================================================请求取货================================================================================="
|
|
|
|
agv_status = 1; |
|
|
|
//到达桁架1请求取货
|
|
|
|
if (device.getDeviceDriver() instanceof Hj1DeviceDriver) { |
|
|
|
hj1DeviceDriver = (Hj1DeviceDriver) device.getDeviceDriver(); |
|
|
@ -209,7 +210,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
if (hj1DeviceDriver.getMode() != 0) { |
|
|
|
if (hj1DeviceDriver.getAction() == 2) { |
|
|
|
log.info("设备" + device_code + "的Action信号已变更为2允许进入,当前信号值为:Mode:" + hj1DeviceDriver.getMode() + ",Move:" + hj1DeviceDriver.getMove() + ",Action:" + hj1DeviceDriver.getAction() + ",agv开始进入取货。"); |
|
|
|
agv_status = 1; |
|
|
|
flag = true; |
|
|
|
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
} else { |
|
|
@ -236,7 +236,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
if (hj2DeviceDriver.getMode() != 0) { |
|
|
|
if (hj2DeviceDriver.getAction() == 2) { |
|
|
|
log.info("设备" + device_code + "的Action信号已变更为2允许进入,当前信号值为:Mode:" + hj2DeviceDriver.getMode() + ",Move:" + hj2DeviceDriver.getMove() + ",Action:" + hj2DeviceDriver.getAction() + ",agv开始进入取货。"); |
|
|
|
agv_status = 1; |
|
|
|
flag = true; |
|
|
|
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
} else { |
|
|
@ -335,6 +334,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
return; |
|
|
|
} |
|
|
|
// "========================================================================取货完成================================================================================="
|
|
|
|
//反馈车辆动作
|
|
|
|
agv_status = 2; |
|
|
|
//到达桁架1取货完成
|
|
|
|
if (device.getDeviceDriver() instanceof Hj1DeviceDriver) { |
|
|
|
hj1DeviceDriver = (Hj1DeviceDriver) device.getDeviceDriver(); |
|
|
@ -343,8 +344,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
hj1DeviceDriver.writing(3); |
|
|
|
if (hj1DeviceDriver.getMode() == 3) { |
|
|
|
flag = true; |
|
|
|
//反馈车辆动作
|
|
|
|
agv_status = 0; |
|
|
|
log.info("设备" + device_code + "的Mode信号已变更为3,当前信号值为:Mode:" + hj1DeviceDriver.getMode() + ",Move:" + hj1DeviceDriver.getMove() + ",Action:" + hj1DeviceDriver.getAction() + ",开始写入0清除mode信号。"); |
|
|
|
hj1DeviceDriver.writing(0); |
|
|
|
data = actionComplete(index, inst, device_code, hj1DeviceDriver.getTo_command(), Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("取货完成")), "取货完成"); |
|
|
@ -371,8 +370,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
hj2DeviceDriver.writing(3); |
|
|
|
if (hj2DeviceDriver.getMode() == 3) { |
|
|
|
flag = true; |
|
|
|
//反馈车辆动作
|
|
|
|
agv_status = 0; |
|
|
|
log.info("设备" + device_code + "的Mode信号已变更为3,当前信号值为:Mode:" + hj2DeviceDriver.getMode() + ",Move:" + hj2DeviceDriver.getMove() + ",Action:" + hj2DeviceDriver.getAction() + ",开始写入0清除mode信号。"); |
|
|
|
hj2DeviceDriver.writing(0); |
|
|
|
data = actionComplete(index, inst, device_code, hj2DeviceDriver.getTo_command(), Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("取货完成")), "取货完成"); |
|
|
@ -398,8 +395,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
log.info("agv进入" + device_code + ",取货完成,开始写入信号3进行安全交互,当前信号值为:Mode:" + ssxDeviceDriver.getMode() + ",Move:" + ssxDeviceDriver.getMove() + ",Action:" + ssxDeviceDriver.getAction()); |
|
|
|
ssxDeviceDriver.writing(3); |
|
|
|
if (ssxDeviceDriver.getMode() == 3) { |
|
|
|
//反馈车辆动作
|
|
|
|
agv_status = 2; |
|
|
|
flag = true; |
|
|
|
log.info("设备" + device_code + "的Mode信号已变更为3,当前信号值为:Mode:" + ssxDeviceDriver.getMode() + ",Move:" + ssxDeviceDriver.getMove() + ",Action:" + ssxDeviceDriver.getAction() + ",开始写入0清除mode信号。"); |
|
|
|
ssxDeviceDriver.writing(0); |
|
|
@ -463,6 +458,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
return; |
|
|
|
} |
|
|
|
// "========================================================================请求放货================================================================================="
|
|
|
|
agv_status = 3; |
|
|
|
//到达桁架1请求放货
|
|
|
|
if (device.getDeviceDriver() instanceof Hj1DeviceDriver) { |
|
|
|
hj1DeviceDriver = (Hj1DeviceDriver) device.getDeviceDriver(); |
|
|
@ -473,7 +469,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
if (hj1DeviceDriver.getMode() != 0 && hj1DeviceDriver.getMove() == 0) { |
|
|
|
if (hj1DeviceDriver.getAction() == 3) { |
|
|
|
log.info("设备" + device_code + "的Action信号已变更为3允许进入,当前信号值为:Mode:" + hj1DeviceDriver.getMode() + ",Move:" + hj1DeviceDriver.getMove() + ",Action:" + hj1DeviceDriver.getAction() + ",agv开始进入放货。"); |
|
|
|
agv_status = 2; |
|
|
|
flag = true; |
|
|
|
data = getData(data, index, inst, task); |
|
|
|
} else { |
|
|
@ -509,7 +504,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
if (hj2DeviceDriver.getMode() != 0 && hj2DeviceDriver.getMove() == 0) { |
|
|
|
if (hj2DeviceDriver.getAction() == 3) { |
|
|
|
log.info("设备" + device_code + "的Action信号已变更为3允许进入,当前信号值为:Mode:" + hj2DeviceDriver.getMode() + ",Move:" + hj2DeviceDriver.getMove() + ",Action:" + hj2DeviceDriver.getAction() + ",agv开始进入放货。"); |
|
|
|
agv_status = 2; |
|
|
|
flag = true; |
|
|
|
data = getData(data, index, inst, task); |
|
|
|
} else { |
|
|
@ -605,6 +599,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
} |
|
|
|
transportOrder = ""; |
|
|
|
// "========================================================================放货完成================================================================================="
|
|
|
|
agv_status = 4; |
|
|
|
//到达桁架1放货完成
|
|
|
|
if (device.getDeviceDriver() instanceof Hj1DeviceDriver) { |
|
|
|
hj1DeviceDriver = (Hj1DeviceDriver) device.getDeviceDriver(); |
|
|
@ -613,7 +608,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
if (hj1DeviceDriver.getMode() == 4) { |
|
|
|
log.info("设备" + device_code + "的Mode信号已变更为4,当前信号值为:Mode:" + hj1DeviceDriver.getMode() + ",Move:" + hj1DeviceDriver.getMove() + ",Action:" + hj1DeviceDriver.getAction() + ",开始写入0清除mode信号。"); |
|
|
|
hj1DeviceDriver.writing(0); |
|
|
|
agv_status = 0; |
|
|
|
flag = true; |
|
|
|
data = actionComplete(index, inst, device_code, hj1DeviceDriver.getTo_command(), Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("放货完成")), "放货完成"); |
|
|
|
log.info("设备" + device_code + "已完成信号0写入,当前信号值为:" + "Mode:" + hj1DeviceDriver.getMode() + ",Move:" + hj1DeviceDriver.getMove() + ",Action:" + hj1DeviceDriver.getAction() + ",agv开始离开。"); |
|
|
@ -632,7 +626,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
if (hj2DeviceDriver.getMode() == 4) { |
|
|
|
log.info("设备" + device_code + "的Mode信号已变更为4,当前信号值为:Mode:" + hj2DeviceDriver.getMode() + ",Move:" + hj2DeviceDriver.getMove() + ",Action:" + hj2DeviceDriver.getAction() + ",开始写入0清除mode信号。"); |
|
|
|
hj2DeviceDriver.writing(0); |
|
|
|
agv_status = 0; |
|
|
|
flag = true; |
|
|
|
data = actionComplete(index, inst, device_code, hj2DeviceDriver.getTo_command(), Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("放货完成")), "放货完成"); |
|
|
|
log.info("设备" + device_code + "已完成信号0写入,当前信号值为:" + "Mode:" + hj2DeviceDriver.getMode() + ",Move:" + hj2DeviceDriver.getMove() + ",Action:" + hj2DeviceDriver.getAction() + ",agv开始离开。"); |
|
|
@ -651,7 +644,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
if (ssxDeviceDriver.getMode() == 4) { |
|
|
|
log.info("设备" + device_code + "的Mode信号已变更为4,当前信号值为:Mode:" + ssxDeviceDriver.getMode() + ",Move:" + ssxDeviceDriver.getMove() + ",Action:" + ssxDeviceDriver.getAction() + ",开始写入0清除mode信号。"); |
|
|
|
ssxDeviceDriver.writing(0); |
|
|
|
agv_status = 0; |
|
|
|
flag = true; |
|
|
|
data = actionComplete(index, inst, device_code, ssxDeviceDriver.getTo_command(), Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("放货完成")), "放货完成"); |
|
|
|
log.info("设备" + device_code + "已完成信号0写入,当前信号值为:" + "Mode:" + ssxDeviceDriver.getMode() + ",Move:" + ssxDeviceDriver.getMove() + ",Action:" + ssxDeviceDriver.getAction() + ",agv开始离开。"); |
|
|
|