Browse Source

rev 修改ndc协程改成驱动

master
汪菘 1 year ago
parent
commit
d4edbbd8e2
  1. 14
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java
  2. 2
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDeviceDriver.java
  3. 993
      acs/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java

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

@ -11,9 +11,13 @@ import org.nl.acs.agv.server.NDCAgvService;
import org.nl.acs.device.service.DeviceService;
import org.nl.acs.device_driver.DeviceDriver;
import org.nl.acs.device_driver.basedriver.agv.utils.OneAgvPhase;
import org.nl.acs.device_driver.basedriver.standard_inspect_site.StandardInspectSiteDeviceDriver;
import org.nl.acs.device_driver.basedriver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver;
import org.nl.acs.device_driver.basedriver.standard_storage.StandardStorageDeviceDriver;
import org.nl.acs.device_driver.driver.AbstractDeviceDriver;
import org.nl.acs.device_driver.lnsh.lnsh_palletizing_manipulator_site.LnshPalletizingManipulatorSiteDeviceDriver;
import org.nl.acs.device_driver.lnsh.lnsh_station.LnshStationDeviceDriver;
import org.nl.acs.device_driver.standard_autodoor.StandardAutodoorDeviceDriver;
import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl;
import org.nl.acs.instruction.service.InstructionService;
@ -129,6 +133,11 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
//货架
StandardStorageDeviceDriver standardStorageDeviceDriver;
//工位模板
LnshStationDeviceDriver lnshStationDeviceDriver;
//码垛机械手工位
LnshPalletizingManipulatorSiteDeviceDriver lnshPalletizingManipulatorSiteDeviceDriver;
//分配 车id
@ -183,7 +192,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
standardOrdinarySiteDeviceDriver.setInst(inst);
}
if (device.getDeviceDriver() instanceof StandardStorageDeviceDriver) {
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
}
@ -351,6 +359,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
if (ikey == 0) {
this.setErrorInfo(ikey, "0", "正常");
} else {
// 故障
}
if (error != last_error) {
}
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
@ -370,6 +381,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
} else if (phase == 0x74) {
//三色灯状态
status = ikey;
}
if (!ObjectUtil.isEmpty(data)) {
phase = 0;

2
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDeviceDriver.java

@ -485,7 +485,7 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
JSONObject jo = new JSONObject();
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", getModeName(this.getDevice().getExtraValue().get(mode).toString()));
jo.put("mode", mode);
jo.put("move", move);
jo.put("action", action);
jo.put("io_action", io_action);

993
acs/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java

File diff suppressed because it is too large
Loading…
Cancel
Save