rev 修改ndc协程改成驱动

This commit is contained in:
USER-20220102CG\noblelift
2023-08-17 16:07:02 +08:00
parent 82445e14d5
commit d4edbbd8e2
3 changed files with 155 additions and 896 deletions

View File

@@ -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;

View File

@@ -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);