Browse Source

驱动更新

master
周俊杰 1 year ago
parent
commit
5fee172f7d
  1. 41
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java
  2. 14
      acs/nladmin-system/src/main/resources/log/AgvNdcOneDeviceDriver.xml

41
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java

@ -171,10 +171,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
//(需要WCS反馈) //(需要WCS反馈)
} else if (phase == 0x03) { } else if (phase == 0x03) {
log.info("==================AGV请求取货=================="); log.info("==================AGV请求取货==================");
if (ObjectUtil.isEmpty(device)) {
log.info("未找到 address = " + agvaddr + " 的设备");
return;
}
if (ObjectUtil.isEmpty(inst)) { if (ObjectUtil.isEmpty(inst)) {
log.info("未找到指令:" + ikey); log.info("未找到指令:" + ikey);
logServer.deviceExecuteLog(device_code, "", "", "未找到指令 [" + ikey + "]"); logServer.deviceExecuteLog(device_code, "", "", "未找到指令 [" + ikey + "]");
@ -283,19 +280,11 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
//标准版-压制对接位 //标准版-压制对接位
if(device.getDeviceDriver() instanceof ConveyorPressStationDeviceDriver){ if(device.getDeviceDriver() instanceof ConveyorPressStationDeviceDriver){
conveyorPressStationDeviceDriver = (ConveyorPressStationDeviceDriver) device.getDeviceDriver(); conveyorPressStationDeviceDriver = (ConveyorPressStationDeviceDriver) device.getDeviceDriver();
TaskDto task=taskService.findByCode(inst.getTask_code());
String direction=task.getDirection();
Integer direction1=Integer.parseInt(direction);
//困料位写入方向
conveyorPressStationDeviceDriver.writing(2,direction1);
conveyorPressStationDeviceDriver.writing(2);
if (conveyorPressStationDeviceDriver.getMode() != 0 if (conveyorPressStationDeviceDriver.getMode() != 0
&& conveyorPressStationDeviceDriver.getMove() != 0 && conveyorPressStationDeviceDriver.getMove() != 0
&& (conveyorPressStationDeviceDriver.getIo_action() == 3 || conveyorPressStationDeviceDriver.getIo_action() == 1) && (conveyorPressStationDeviceDriver.getIo_action() == 3 || conveyorPressStationDeviceDriver.getIo_action() == 1)
&& (conveyorPressStationDeviceDriver.getAction() == 3 || conveyorPressStationDeviceDriver.getAction() == 1)) { && (conveyorPressStationDeviceDriver.getAction() == 3 || conveyorPressStationDeviceDriver.getAction() == 1)) {
inst.setExecute_status("1");
instructionService.update(inst);
data = AgvService.sendAgvOneModeInst(phase, index, 0); data = AgvService.sendAgvOneModeInst(phase, index, 0);
conveyorPressStationDeviceDriver.setMessage(""); conveyorPressStationDeviceDriver.setMessage("");
flag = true; flag = true;
@ -422,10 +411,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
//(需要WCS反馈) //(需要WCS反馈)
} else if (phase == 0x05) { } else if (phase == 0x05) {
log.info("================AGV取货完成请求离开================"); log.info("================AGV取货完成请求离开================");
if (ObjectUtil.isEmpty(device)) {
log.info("未找到 address = " + ikey + " 的设备");
return;
}
if (ObjectUtil.isEmpty(inst)) { if (ObjectUtil.isEmpty(inst)) {
log.info("未找到指令:" + ikey); log.info("未找到指令:" + ikey);
logServer.deviceExecuteLog(device_code, "", "", "未找到指令 [" + ikey + "]"); logServer.deviceExecuteLog(device_code, "", "", "未找到指令 [" + ikey + "]");
@ -672,10 +657,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
//(需要WCS反馈) //(需要WCS反馈)
} else if (phase == 0x07) { } else if (phase == 0x07) {
log.info("==================AGV请求放货=================="); log.info("==================AGV请求放货==================");
if (ObjectUtil.isEmpty(device)) {
log.info("未找到 address = " + ikey + " 的设备");
return;
}
if (ObjectUtil.isEmpty(inst)) { if (ObjectUtil.isEmpty(inst)) {
log.info("未找到指令:" + ikey); log.info("未找到指令:" + ikey);
logServer.deviceExecuteLog(device_code, "", "", "未找到指令 [" + ikey + "]"); logServer.deviceExecuteLog(device_code, "", "", "未找到指令 [" + ikey + "]");
@ -915,10 +896,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
//(需要WCS反馈) //(需要WCS反馈)
} else if (phase == 0x09) { } else if (phase == 0x09) {
log.info("================AGV放货完成请求离开================"); log.info("================AGV放货完成请求离开================");
if (ObjectUtil.isEmpty(device)) {
log.info("未找到 address = " + ikey + " 的设备");
return;
}
if (ObjectUtil.isEmpty(inst)) { if (ObjectUtil.isEmpty(inst)) {
log.info("未找到指令:" + ikey); log.info("未找到指令:" + ikey);
logServer.deviceExecuteLog("未找到指令号对应的指令:", "", "", String.valueOf(ikey)); logServer.deviceExecuteLog("未找到指令号对应的指令:", "", "", String.valueOf(ikey));
@ -1022,6 +999,20 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
inst.setExecute_status("6"); inst.setExecute_status("6");
instructionService.update(inst); instructionService.update(inst);
conveyorPressStationDeviceDriver.writing(3); conveyorPressStationDeviceDriver.writing(3);
TaskDto task=taskService.findByCode(inst.getTask_code());
if(ObjectUtil.isNotEmpty(task)){
String direction=task.getDirection();
if(ObjectUtil.isNotEmpty(direction)){
Integer direction1=Integer.parseInt(direction);
//困料位写入方向
conveyorPressStationDeviceDriver.writing(2,direction1);
}else{
log.info("未输入方向");
}
}else{
log.info("任务号为空");
}
data = AgvService.sendAgvOneModeInst(phase, index, 0); data = AgvService.sendAgvOneModeInst(phase, index, 0);
conveyorPressStationDeviceDriver.setMessage(""); conveyorPressStationDeviceDriver.setMessage("");

14
acs/nladmin-system/src/main/resources/log/AgvNdcOneDeviceDriver.xml

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane xmlns="http://javafx.com/javafx"
xmlns:fx="http://javafx.com/fxml"
fx:controller="$CONTROLLER_NAME$"
prefHeight="400.0" prefWidth="600.0">
</AnchorPane>
Loading…
Cancel
Save