From 9fc0a2feb9ac4fead86b4fb1adb58fb8266c02fb Mon Sep 17 00:00:00 2001 From: psh Date: Thu, 4 Apr 2024 12:16:13 +0800 Subject: [PATCH] fix --- .../acs/agv/server/impl/NDCAgvServiceImpl.java | 6 ++---- .../agv/ndcone/AgvNdcOneDeviceDriver.java | 11 ----------- .../basedriver/ssx_site/ItemProtocol.java | 16 ++++++++++++---- .../basedriver/ssx_site/SsxSiteDeviceDriver.java | 8 ++++---- 4 files changed, 18 insertions(+), 23 deletions(-) diff --git a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/impl/NDCAgvServiceImpl.java b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/impl/NDCAgvServiceImpl.java index 8635e66..757bffa 100644 --- a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/impl/NDCAgvServiceImpl.java +++ b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/impl/NDCAgvServiceImpl.java @@ -148,14 +148,12 @@ public class NDCAgvServiceImpl implements NDCAgvService { (byte) 0X00, (byte) 0X12, (byte) 0X00, (byte) 0X01, (byte) 0X00, (byte) 0X6D, - (byte) 0X00, (byte) 0X0E, + (byte) 0X00, (byte) 0X0A, (byte) indexhigh, (byte) indexlow, (byte) 0X01, (byte) 0X14, (byte) phasehigh, (byte) phaselow, (byte) startPointHigh, (byte) startPointLow, - (byte) nextPointHigh, (byte) nextPointLow, - (byte) startHighHigh, (byte) startHighLow, - (byte) nextHighHigh, (byte) nextHighLow + (byte) nextPointHigh, (byte) nextPointLow }; diff --git a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java index 408a4af..3817311 100644 --- a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java +++ b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java @@ -174,17 +174,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic logServer.deviceExecuteLog(this.device_code, "", "", "未找到关联编号对应的指令" + ikey); return; } - StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver; - if(device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver){ - standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver(); - if(standardInspectSiteDeviceDriver.getAction()==1){ - data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0); - }else{ - log.info("当前涂板线未允许取货"); - return; - } - } - data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0); //到达取货等待点 //(需要WCS反馈) diff --git a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/ssx_site/ItemProtocol.java b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/ssx_site/ItemProtocol.java index 4871953..11c8c44 100644 --- a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/ssx_site/ItemProtocol.java +++ b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/ssx_site/ItemProtocol.java @@ -56,12 +56,12 @@ public class ItemProtocol { public int getWeight() { return this.getOpcIntegerValue(item_weight); } - public int getSubTray() { - return this.getOpcIntegerValue(item_sub_tray); + public String getSubTray() { + return this.getOpcStringValue(item_sub_tray); } - public int getMotherTray() { - return this.getOpcIntegerValue(item_mother_tray); + public String getMotherTray() { + return this.getOpcStringValue(item_mother_tray); } public int getToCommand() { @@ -97,6 +97,14 @@ public class ItemProtocol { } + public String getOpcStringValue(String protocol) { + String value = this.driver.getStringValue(protocol); + if (value != null) { + return value; + } + return ""; + } + public static List getReadableItemDtos() { ArrayList list = new ArrayList(); list.add(new ItemDto(item_heartbeat, "心跳", "DB600.B0")); diff --git a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/ssx_site/SsxSiteDeviceDriver.java b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/ssx_site/SsxSiteDeviceDriver.java index e10dc46..5dbe641 100644 --- a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/ssx_site/SsxSiteDeviceDriver.java +++ b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/ssx_site/SsxSiteDeviceDriver.java @@ -79,10 +79,10 @@ public class SsxSiteDeviceDriver extends AbstractOpcDeviceDriver implements Devi int last_io_action = 0; double weight = 0; double last_weight = 0; - int sub_tray = 0; - int last_sub_tray =0; - int mother_tray = 0; - int last_mother_tray =0; + String sub_tray = null; + String last_sub_tray = null; + String mother_tray = null; + String last_mother_tray =null; boolean hasVehicle = false;