From 30bc589867e02144192871d56eefe9421d038ce5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E4=BF=8A=E6=9D=B0?= <9463626+zhou-junjiezjj@user.noreply.gitee.com> Date: Wed, 19 Jun 2024 15:03:48 +0800 Subject: [PATCH] =?UTF-8?q?fix=20s7=E5=8D=8F=E8=AE=AE=E9=A9=B1=E5=8A=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../device/device_driver/DriverTypeEnum.java | 4 +- .../ItemProtocol.java | 4 +- .../ItemProtocol.java | 6 +- .../standard_inspect_site/ItemProtocol.java | 4 +- .../ConveyorBarcodeDeviceDriver.java | 21 +- .../conveyor_press_station/ItemProtocol.java | 6 +- .../lnsh_fold_disc_site/ItemProtocol.java | 10 +- .../LnshFoldDiscSiteDeviceDriver.java | 2 - .../lnsh/lnsh_jcy/ItemProtocol.java | 131 ++ .../lnsh/lnsh_jcy/LnshJcyDefination.java | 58 + .../lnsh/lnsh_jcy/LnshJcyDeviceDriver.java | 640 ++++++++ .../LnshMixingMillDeviceDriver.java | 3 +- .../ItemProtocol.java | 20 +- .../lnsh/lnsh_package_site/ItemProtocol.java | 6 +- .../LnshPackageSiteDefination.java | 2 +- .../ItemProtocol.java | 62 +- .../ItemProtocol.java | 1326 ++++++++--------- ...alletizingManipulatorSiteDeviceDriver.java | 266 ++-- .../lnsh/lnsh_press/ItemProtocol.java | 70 +- .../lnsh_press/LnshPressDeviceDriver.java | 10 +- .../lnsh/lnsh_rgv/ItemProtocol.java | 8 +- .../lnsh/lnsh_rgv/LnshRGVDefination.java | 2 +- .../lnsh/lnsh_rgv/LnshRGVDeviceDriver.java | 52 +- .../lnsh/lnsh_station/ItemProtocol.java | 30 +- .../lnsh/package_site/ItemProtocol.java | 18 +- .../wms/service/impl/WmsToAcsServiceImpl.java | 24 +- .../service/impl/StageServiceImpl.java | 8 +- .../auto/run/NDCSocketConnectionAutoRun.java | 3 +- 28 files changed, 1807 insertions(+), 989 deletions(-) create mode 100644 acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_jcy/ItemProtocol.java create mode 100644 acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_jcy/LnshJcyDefination.java create mode 100644 acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_jcy/LnshJcyDeviceDriver.java diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device/device_driver/DriverTypeEnum.java b/acs/nladmin-system/src/main/java/org/nl/acs/device/device_driver/DriverTypeEnum.java index 92f0bbb..039496a 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device/device_driver/DriverTypeEnum.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device/device_driver/DriverTypeEnum.java @@ -87,7 +87,9 @@ public enum DriverTypeEnum { CONVEYOR_PRESS_STATION(54, "conveyor_press_station", "标准版-压制对接位", "station"), - PACKAGE_SITE(55, "package_site", "包装线工位", "station"); + PACKAGE_SITE(55, "package_site", "包装线工位", "station"), + + LNSH_JCY(57, "lnsh_jcy", "标准-进出窑", "station"); //驱动索引 private int index; //驱动编码 diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control/ItemProtocol.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control/ItemProtocol.java index 1fc7f8a..a38f111 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control/ItemProtocol.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control/ItemProtocol.java @@ -17,7 +17,7 @@ public class ItemProtocol { public static String item_mode = "mode"; public static String item_move = "move"; public static String item_action = "action"; - public static String item_ioaction = "ioaction"; + public static String item_io_action = "io_action"; public static String item_height = "height"; public static String item_error = "error"; public static String item_direction = "direction"; @@ -102,7 +102,7 @@ public class ItemProtocol { list.add(new ItemDto(item_mode, "工作模式", "DB600.B1", Boolean.valueOf(true))); list.add(new ItemDto(item_move, "光电开关信号", "DB600.B2")); list.add(new ItemDto(item_action, "取放信号", "DB600.B3")); - list.add(new ItemDto(item_ioaction, "进出类型", "DB600.B4")); + list.add(new ItemDto(item_io_action, "进出类型", "DB600.B4")); list.add(new ItemDto(item_height, "高度类型", "DB600.B5")); list.add(new ItemDto(item_error, "报警信号", "DB600.B6")); list.add(new ItemDto(item_direction, "电机方向", "DB600.B7")); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_plcscanner/ItemProtocol.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_plcscanner/ItemProtocol.java index 1a7bfad..8571df6 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_plcscanner/ItemProtocol.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_plcscanner/ItemProtocol.java @@ -17,7 +17,7 @@ public class ItemProtocol { public static String item_mode = "mode"; public static String item_move = "move"; public static String item_action = "action"; - public static String item_ioaction = "ioaction"; + public static String item_io_action = "io_action"; public static String item_height = "height"; public static String item_error = "error"; public static String item_direction = "direction"; @@ -57,7 +57,7 @@ public class ItemProtocol { } public int getIoAction() { - return this.getOpcIntegerValue(item_ioaction); + return this.getOpcIntegerValue(item_io_action); } public int getHeight() { @@ -141,7 +141,7 @@ public class ItemProtocol { list.add(new ItemDto(item_mode, "工作模式", "DB600.B1", Boolean.valueOf(true))); list.add(new ItemDto(item_move, "光电开关信号", "DB600.B2")); list.add(new ItemDto(item_action, "取放信号", "DB600.B3")); - list.add(new ItemDto(item_ioaction, "进出类型", "DB600.B4")); + list.add(new ItemDto(item_io_action, "进出类型", "DB600.B4")); list.add(new ItemDto(item_height, "高度类型", "DB600.B5")); list.add(new ItemDto(item_error, "报警信号", "DB600.B6")); list.add(new ItemDto(item_direction, "电机方向", "DB600.B7")); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_inspect_site/ItemProtocol.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_inspect_site/ItemProtocol.java index 88f825b..7bb555f 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_inspect_site/ItemProtocol.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_inspect_site/ItemProtocol.java @@ -16,7 +16,7 @@ public class ItemProtocol { public static String item_heartbeat = "heartbeat"; public static String item_mode = "mode"; public static String item_move = "move"; - public static String item_ioaction = "ioaction"; + public static String item_io_action = "io_action"; public static String item_error = "error"; public static String item_task = "task"; public static String item_to_command = "to_command"; @@ -43,7 +43,7 @@ public class ItemProtocol { } public int getIoaction() { - return this.getOpcIntegerValue(item_ioaction); + return this.getOpcIntegerValue(item_io_action); } public int getError() { diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/converor_barcode/ConveyorBarcodeDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/converor_barcode/ConveyorBarcodeDeviceDriver.java index 4324131..9bfd9b8 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/converor_barcode/ConveyorBarcodeDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/converor_barcode/ConveyorBarcodeDeviceDriver.java @@ -150,7 +150,7 @@ public class ConveyorBarcodeDeviceDriver extends AbstractOpcDeviceDriver impleme logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode)); logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + " -> " + mode); } - if (move != last_move) { + if (move != last_move && mode>0) { logServer.deviceItemValue(this.device_code, "move", String.valueOf(move)); logServer.deviceExecuteLog(this.device_code, "", "", "信号move:" + last_move + " -> " + move); if ("true".equals(this.device.getExtraValue().get("sendDeviceStatus"))) { @@ -217,6 +217,16 @@ public class ConveyorBarcodeDeviceDriver extends AbstractOpcDeviceDriver impleme } catch (Exception var17) { return; + }finally { + last_mode = mode; + last_error = error; + last_move = move; + last_task = task; + last_action = action; + last_ioaction = io_action; + last_weight = weight; + last_material = material; + last_barcode = barcode; } //急停 @@ -260,15 +270,6 @@ public class ConveyorBarcodeDeviceDriver extends AbstractOpcDeviceDriver impleme Object ignore_pickup_check = this.getExtraValue().get("ignore_pickup_check"); } - last_mode = mode; - last_error = error; - last_move = move; - last_task = task; - last_action = action; - last_ioaction = io_action; - last_weight = weight; - last_material = material; - last_barcode = barcode; } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/conveyor_press_station/ItemProtocol.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/conveyor_press_station/ItemProtocol.java index a97ec75..a333922 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/conveyor_press_station/ItemProtocol.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/conveyor_press_station/ItemProtocol.java @@ -18,7 +18,7 @@ public class ItemProtocol { public static String item_mode = "mode"; public static String item_move = "move"; public static String item_action = "action"; - public static String item_ioaction = "ioaction"; + public static String item_io_action = "io_action"; public static String item_error = "error"; public static String item_task = "task"; public static String item_weight = "weight"; @@ -56,7 +56,7 @@ public class ItemProtocol { } public int getIoAction() { - return this.getOpcIntegerValue(item_ioaction); + return this.getOpcIntegerValue(item_io_action); } public int getError() { @@ -131,7 +131,7 @@ public class ItemProtocol { list.add(new ItemDto(item_mode, "工作模式", "DB51.B1", Boolean.valueOf(true))); list.add(new ItemDto(item_move, "光电开关信号", "DB51.B2")); list.add(new ItemDto(item_action, "取放信号", "DB51.B3")); - list.add(new ItemDto(item_ioaction, "进出信号", "DB51.B4")); + list.add(new ItemDto(item_io_action, "进出信号", "DB51.B4")); list.add(new ItemDto(item_error, "报警信号", "DB51.B5")); list.add(new ItemDto(item_task, "任务号", "DB51.D6")); list.add(new ItemDto(item_weight, "重量", "DB51.D10")); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_fold_disc_site/ItemProtocol.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_fold_disc_site/ItemProtocol.java index c0d28ee..cde539c 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_fold_disc_site/ItemProtocol.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_fold_disc_site/ItemProtocol.java @@ -16,7 +16,7 @@ public class ItemProtocol { public static String item_mode = "mode"; public static String item_status = "status"; public static String item_open_time = "open_time"; - public static String item_close_time = "close_time"; + public static String item_error="error"; public static String item_standby_time = "standby_time"; public static String item_production_time = "production_time"; public static String item_error_time = "error_time"; @@ -27,7 +27,6 @@ public class ItemProtocol { public static String item_move = "move"; public static String item_action = "action"; public static String item_ioaction = "ioaction"; - public static String item_error = "error"; public static String item_task = "task"; public static String item_weight = "weight"; public static String item_material = "material"; @@ -53,6 +52,7 @@ public class ItemProtocol { return this.getOpcIntegerValue(item_move); } + public int getAction() { return this.getOpcIntegerValue(item_action); } @@ -89,9 +89,7 @@ public class ItemProtocol { return this.getOpcStringValue(item_open_time); } - public int getClose_time() { - return this.getOpcIntegerValue(item_close_time); - } + public int getStandby_time() { return this.getOpcIntegerValue(item_standby_time); @@ -156,7 +154,7 @@ public class ItemProtocol { list.add(new ItemDto(item_mode, "工作模式", "DB120.B1", Boolean.valueOf(true))); list.add(new ItemDto(item_status, "设备状态", "DB120.B2")); list.add(new ItemDto(item_open_time, "开机时间", "DB120.STRING4.50")); - list.add(new ItemDto(item_close_time, "关机时间", "DB120.D56")); + list.add(new ItemDto(item_error, "故障", "DB120.58")); list.add(new ItemDto(item_standby_time, "待机时间", "DB120.D60")); list.add(new ItemDto(item_production_time, "生产时间", "DB120.D64")); list.add(new ItemDto(item_error_time, "故障时间", "DB120.D68")); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_fold_disc_site/LnshFoldDiscSiteDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_fold_disc_site/LnshFoldDiscSiteDeviceDriver.java index 4bdfb05..038a805 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_fold_disc_site/LnshFoldDiscSiteDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_fold_disc_site/LnshFoldDiscSiteDeviceDriver.java @@ -118,12 +118,10 @@ public class LnshFoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implem String message = null; try { device_code = this.getDeviceCode(); - heartbeat = this.itemProtocol.getHeartbeat(); mode = this.itemProtocol.getMode(); status = this.itemProtocol.getStatus(); open_time = this.itemProtocol.getOpen_time(); - close_time = this.itemProtocol.getClose_time(); standby_time = this.itemProtocol.getStandby_time(); production_time = this.itemProtocol.getProduction_time(); error_time = this.itemProtocol.getError_time(); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_jcy/ItemProtocol.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_jcy/ItemProtocol.java new file mode 100644 index 0000000..7e7bed8 --- /dev/null +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_jcy/ItemProtocol.java @@ -0,0 +1,131 @@ +package org.nl.acs.device_driver.lnsh.lnsh_jcy; + +import cn.hutool.core.util.StrUtil; +import lombok.Getter; +import lombok.Setter; +import lombok.extern.slf4j.Slf4j; +import org.nl.acs.device.device_driver.standard_inspect.ItemDto; + + +import java.util.ArrayList; +import java.util.List; + +@Slf4j +@Getter +@Setter +public class ItemProtocol { + + public static String item_heartbeat = "heartbeat"; + public static String item_mode = "mode"; + public static String item_move = "move"; + public static String item_action = "action"; + public static String item_io_action = "io_action"; + public static String item_error = "error"; + public static String item_task = "task"; + public static String item_barcode = "barcode"; + public static String item_to_command = "to_command"; + public static String item_to_target = "to_target"; + public static String item_to_task = "to_task"; + + + Boolean isonline; + + private LnshJcyDeviceDriver driver; + + public ItemProtocol(LnshJcyDeviceDriver driver) { + this.driver = driver; + } + + public int getHeartbeat() { + return this.getOpcIntegerValue(item_heartbeat); + } + + public int getMode() { + return this.getOpcIntegerValue(item_mode); + } + + public int getMove() { + return this.getOpcIntegerValue(item_move); + } + + public int getAction() { + return this.getOpcIntegerValue(item_action); + } + + public int getIoAction() { + return this.getOpcIntegerValue(item_io_action); + } + + public int getError() { + return this.getOpcIntegerValue(item_error); + } + + public int getTask() { + return this.getOpcIntegerValue(item_task); + } + + public int getBarcode() { + return this.getOpcIntegerValue(item_barcode); + } + + public int getToCommand() { + return this.getOpcIntegerValue(item_to_command); + } + + public int getToTarget() { + return this.getOpcIntegerValue(item_to_target); + } + + public int getToTask() { + return this.getOpcIntegerValue(item_to_task); + } + + //是否有货 + public int hasGoods(int move) { + return move; + } + + + public int getOpcIntegerValue(String protocol) { + Integer value = this.driver.getIntegeregerValue(protocol); + if (value == null) { +// log.error(this.getDriver().getDeviceCode() + ":protocol " + protocol + " 信号同步异常!"); + setIsonline(false); + } else { + setIsonline(true); + return value; + } + return 0; + } + public String getOpcStringValue(String protocol) { + String value = this.driver.getStringValue(protocol); + if (StrUtil.isBlank(value)) { +// log.error("读取错误!"); + } else { + return value; + } + return "0"; + } + + public static List getReadableItemDtos() { + ArrayList list = new ArrayList(); + list.add(new ItemDto(item_heartbeat, "心跳", "DB81.B10")); + list.add(new ItemDto(item_mode, "工作模式", "DB81.B1", Boolean.valueOf(true))); + list.add(new ItemDto(item_move, "光电开关信号", "DB81.B2")); + list.add(new ItemDto(item_action, "取放信号", "DB81.B3")); + list.add(new ItemDto(item_io_action, "进出信号", "DB81.B4")); + list.add(new ItemDto(item_error, "报警信号", "DB81.B5")); + list.add(new ItemDto(item_task, "任务号", "DB81.D6")); + list.add(new ItemDto(item_barcode, "条码", "DB81.W66")); + return list; + } + + public static List getWriteableItemDtos() { + ArrayList list = new ArrayList(); + list.add(new ItemDto(item_to_command, "作业命令", "DB71.W0", Boolean.valueOf(true))); + list.add(new ItemDto(item_to_target, "目标站", "DB71.W2")); + list.add(new ItemDto(item_to_task, "任务号", "DB71.D4")); + return list; + } + +} diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_jcy/LnshJcyDefination.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_jcy/LnshJcyDefination.java new file mode 100644 index 0000000..069eb5b --- /dev/null +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_jcy/LnshJcyDefination.java @@ -0,0 +1,58 @@ +package org.nl.acs.device_driver.lnsh.lnsh_jcy; + +import org.nl.acs.device.device_driver.standard_inspect.ItemDto; +import org.nl.acs.device_driver.DeviceDriver; +import org.nl.acs.device_driver.defination.OpcDeviceDriverDefination; +import org.nl.acs.opc.Device; +import org.nl.acs.opc.DeviceType; +import org.springframework.stereotype.Service; + +import java.util.LinkedList; +import java.util.List; + +@Service +public class LnshJcyDefination implements OpcDeviceDriverDefination { + @Override + public String getDriverCode() { + return "lnsh_jcy"; + } + + @Override + public String getDriverName() { + return "标准-进出窑"; + } + + @Override + public String getDriverDescription() { + return "标准-进出窑"; + } + + @Override + public DeviceDriver getDriverInstance(Device device) { + return (new LnshJcyDeviceDriver()).setDevice(device).setDriverDefination(this); + + } + + @Override + public Class getDeviceDriverType() { + return LnshJcyDeviceDriver.class; + } + + @Override + public List getFitDeviceTypes() { + List types = new LinkedList(); + types.add(DeviceType.station); + return types; + } + + @Override + public List getReadableItemDtos() { + return ItemProtocol.getReadableItemDtos(); + } + + @Override + public List getWriteableItemDtos() { + return ItemProtocol.getWriteableItemDtos(); + } + +} diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_jcy/LnshJcyDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_jcy/LnshJcyDeviceDriver.java new file mode 100644 index 0000000..6239b17 --- /dev/null +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_jcy/LnshJcyDeviceDriver.java @@ -0,0 +1,640 @@ +package org.nl.acs.device_driver.lnsh.lnsh_jcy; + +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import lombok.Getter; +import lombok.RequiredArgsConstructor; +import lombok.Setter; +import lombok.extern.slf4j.Slf4j; +import org.nl.acs.device.device_driver.standard_inspect.ReadUtil; +import org.nl.acs.device.service.DeviceService; +import org.nl.acs.device_driver.DeviceDriver; +import org.nl.acs.device_driver.RequestMethodEnum; +import org.nl.acs.device_driver.RouteableDeviceDriver; +import org.nl.acs.device_driver.StandardRequestMethod; +import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver; +import org.nl.acs.device_driver.driver.ExecutableDeviceDriver; +import org.nl.acs.ext.wms.data.AcsToWmsData.applySignalStaus.ApplySignalStatusRequest; +import org.nl.acs.ext.wms.data.AcsToWmsData.applySignalStaus.ApplySignalStatusResponse; +import org.nl.acs.ext.wms.data.AcsToWmsData.applyTask.ApplyTaskRequest; +import org.nl.acs.ext.wms.data.AcsToWmsData.applyTask.ApplyTaskResponse; +import org.nl.acs.ext.wms.service.AcsToWmsService; +import org.nl.acs.instruction.service.InstructionService; +import org.nl.acs.instruction.service.dto.Instruction; +import org.nl.acs.log.service.DeviceExecuteLogService; +import org.nl.acs.monitor.DeviceStageMonitor; +import org.nl.acs.opc.Device; +import org.nl.acs.opc.DeviceAppService; +import org.nl.acs.route.service.RouteLineService; +import org.nl.acs.task.service.TaskService; +import org.nl.modules.lucene.service.LuceneExecuteLogService; +import org.nl.modules.lucene.service.dto.LuceneLogDto; +import org.nl.modules.wql.util.SpringContextHolder; +import org.openscada.opc.lib.da.Server; + +import java.lang.reflect.Method; +import java.util.*; + +@Slf4j +@Getter +@Setter +@RequiredArgsConstructor +public class LnshJcyDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor, StandardRequestMethod { + protected ItemProtocol itemProtocol = new ItemProtocol(this); + + LuceneExecuteLogService lucene = SpringContextHolder.getBean("luceneExecuteLogServiceImpl"); + + InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl"); + + DeviceService deviceservice = SpringContextHolder.getBean("deviceServiceImpl"); + + RouteLineService routelineserver = SpringContextHolder.getBean("routeLineServiceImpl"); + + TaskService taskserver = SpringContextHolder.getBean("taskServiceImpl"); + + DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl"); + + DeviceAppService deviceAppService = SpringContextHolder.getBean("deviceAppServiceImpl"); + + AcsToWmsService acsToWmsService = SpringContextHolder.getBean("acsToWmsServiceImpl"); + + String device_code; + int mode = 0; + int error = 0; + int move = 0; + int action; + int io_action; + int task = 0; + int last_mode = 0; + int last_error = 0; + int last_move = 0; + int last_task = 0; + int last_action = 0; + int last_ioaction = 0; + Boolean isonline = true; + int hasGoods = 0; + Boolean iserror = false; + + protected int instruction_num = 0; + protected int instruction_num_truth = 0; + Integer heartbeat_tag; + private Date instruction_require_time = new Date(); + private Date instruction_finished_time = new Date(); + + private int instruction_require_time_out = 3000; + boolean requireSucess = false; + + private int instruction_finished_time_out; + + int heartbeat; + int last_heartbeat; + private Date checkHeartbeattime = new Date(); + private Date last_checkHeartbeattime = new Date(); + + + int branchProtocol = 0; + //当前指令 + Instruction inst = null; + //上次指令 + Instruction last_inst = null; + + //触摸屏手动触发任务 + private Boolean is_has_task = false; + + //暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域 + int flag; + + String message; + int weight = 0; + int last_weight = 0; + String material; + String last_material; + int barcode; + int last_barcode; + + @Override + public Device getDevice() { + return this.device; + } + + + @Override + public void execute() { + message = null; + try { + device_code = this.getDeviceCode(); + mode = this.itemProtocol.getMode(); + error = this.itemProtocol.getError(); + move = this.itemProtocol.getMove(); + task = this.itemProtocol.getTask(); + hasGoods = this.itemProtocol.getMove(); + io_action = this.itemProtocol.getIoAction(); + action = this.itemProtocol.getAction(); + barcode = this.itemProtocol.getBarcode(); + + if (mode != last_mode) { + if(mode==2){ + Map map = new LinkedHashMap<>(); + map.put("to_command",0); + this.writing(map); + } + this.setRequireSucess(false); + logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + " -> " + mode); + lucene.deviceItemValue(this.device_code, "mode", String.valueOf(mode)); + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "信号mode:" + last_mode + " -> " + mode)); + } + if (move != last_move) { + logServer.deviceItemValue(this.device_code, "move", String.valueOf(move)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号move:" + last_move + " -> " + move); + lucene.deviceItemValue(this.device_code, "move", String.valueOf(move)); + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "信号mode:" + last_move + " -> " + move)); + if ("true".equals(this.device.getExtraValue().get("sendDeviceStatus"))) { + ApplySignalStatusRequest request = new ApplySignalStatusRequest(); + request.setDevice_code(this.getDevice_code()); + request.setRequest_method_code(RequestMethodEnum.real_time_set_point.getCode()); + request.setRequest_method_name(RequestMethodEnum.real_time_set_point.getName()); + request.setMove(String.valueOf(move)); + ApplySignalStatusResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)), ApplySignalStatusResponse.class); + message = RequestMethodEnum.getName("real_time_set_point") + "real_time_set_point 接口请求LMS..."; + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request))); + if (resp.getCode() == 200) { + message = RequestMethodEnum.getName("real_time_set_point") + "real_time_set_point 接口请求成功" + resp.getMessage(); + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "返回参数:" + JSON.toJSONString(request))); + } else { + message = RequestMethodEnum.getName("real_time_set_point") + "real_time_set_point 接口请求失败" + resp.getMessage();; + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "返回参数:" + JSON.toJSONString(request))); + } + } + } + if (error != last_error) { + logServer.deviceItemValue(this.device_code, "error", String.valueOf(error)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号error:" + last_error + " -> " + error); + lucene.deviceItemValue(this.device_code, "error", String.valueOf(error)); + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "信号error:" + last_error + " -> " + error)); + } + if (task != last_task) { + logServer.deviceItemValue(this.device_code, "task", String.valueOf(task)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号task:" + last_task + " -> " + task); + lucene.deviceItemValue(this.device_code, "task", String.valueOf(task)); + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "信号task:" + last_task + " -> " + task)); + } + if (action != last_action) { + logServer.deviceItemValue(this.device_code, "action", String.valueOf(action)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号action:" + last_action + " -> " + action); + lucene.deviceItemValue(this.device_code, "action", String.valueOf(action)); + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "信号action:" + last_action + " -> " + action)); + if ("true".equals(this.device.getExtraValue().get("sendDeviceStatus"))) { + ApplySignalStatusRequest request = new ApplySignalStatusRequest(); + request.setDevice_code(this.getDevice_code()); + request.setRequest_method_code(RequestMethodEnum.real_time_set_point.getCode()); + request.setRequest_method_name(RequestMethodEnum.real_time_set_point.getName()); + request.setAction(String.valueOf(action)); + ApplySignalStatusResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)), ApplySignalStatusResponse.class); + message = RequestMethodEnum.getName("real_time_set_point") + "real_time_set_point 接口请求LMS..."; + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request))); + + if (resp.getCode() == 200) { + message = RequestMethodEnum.getName("real_time_set_point") + "real_time_set_point 接口请求成功" + resp.getMessage();; + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "返回参数:" + JSON.toJSONString(request))); + } else { + message = RequestMethodEnum.getName("real_time_set_point") + "real_time_set_point 接口请求失败" + resp.getMessage();; + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "返回参数:" + JSON.toJSONString(request))); + } + } + } + if (io_action != last_ioaction) { + logServer.deviceItemValue(this.device_code, "io_action", String.valueOf(io_action)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号io_action: " + last_ioaction + " -> " + io_action); + lucene.deviceItemValue(this.device_code, "io_action", String.valueOf(io_action)); + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "信号action:" + last_action + " -> " + action)); + } + if (weight != last_weight) { + logServer.deviceItemValue(this.device_code, "weight", String.valueOf(weight)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号weight: " + last_weight + " -> " + weight); + lucene.deviceItemValue(this.device_code, "weight", String.valueOf(weight)); + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "信号weight: " + last_weight + " -> " + weight)); + } + if (!StrUtil.equals(material, last_material)) { + logServer.deviceItemValue(this.device_code, "material", material); + logServer.deviceExecuteLog(this.device_code, "", "", "信号material:" + last_material + " -> " + material); + lucene.deviceItemValue(this.device_code, "material", String.valueOf(material)); + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "信号material:" + last_material + " -> " + material)); + } + if (barcode != last_barcode) { + logServer.deviceItemValue(this.device_code, "barcode", String.valueOf(barcode)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号barcode:" + last_barcode + " -> " + barcode); + lucene.deviceItemValue(this.device_code, "barcode", String.valueOf(barcode)); + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "信号barcode:" + last_barcode + " -> " + barcode)); + } + + } catch (Exception var17) { + return; + } + + //急停 + if (this.isStop()) { + + //未联机 + } else if (mode == 0) { + this.setIsonline(false); + this.setIserror(true); + message = "未联机"; + //有报警 + } else if (error != 0) { + this.setIsonline(false); + this.setIserror(true); + message = "有报警"; + //无报警 + } else { + this.setIsonline(true); + this.setIserror(false); + message = ""; + Instruction instruction = null; + List toInstructions; + + + if (mode > 2 && !requireSucess) { + if (ObjectUtil.isNotEmpty(this.device.getExtraValue().get(String.valueOf(mode)))) { + String modethod = this.device.getExtraValue().get(String.valueOf(mode)).toString(); + try { + applyRequest(modethod); + } catch (Exception e) { + message = "错误:" + e.getMessage(); + this.setIserror(true); + } + } else { + message = "无效模式请求,驱动未配置此请求方法"; + } + } else { + message = "无请求"; + } + } + + last_mode = mode; + last_error = error; + last_move = move; + last_task = task; + last_action = action; + last_ioaction = io_action; + last_weight = weight; + last_material = material; + last_barcode = barcode; + } + + + + + public boolean exe_error() { + if (this.error == 0) { + return true; + } else { + log.debug("设备报警"); + return false; + } + } + + public boolean exe_business() { + return true; + } + + protected void executing(Instruction instruction) { + this.executing(1, instruction, ""); + } + + public void executing(int command, Instruction instruction, String appendMessage) { + String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() + + "." + org.nl.acs.device_driver.lnsh.lnsh_station.ItemProtocol.item_to_command; + String to_target = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() + + "." + org.nl.acs.device_driver.lnsh.lnsh_station.ItemProtocol.item_to_target; + String to_task = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() + + "." + org.nl.acs.device_driver.lnsh.lnsh_station.ItemProtocol.item_to_task; + if (appendMessage == null) { + appendMessage = ""; + } + if (instruction != null) { + instruction_num = Integer.parseInt(instruction.getInstruction_code()); + } + String opcservcerid = this.getDevice().getOpc_server_id(); + Server server = ReadUtil.getServer(opcservcerid); + Map itemMap = new HashMap(); + itemMap.put(to_command, 1); + itemMap.put(to_task, instruction_num); + ReadUtil.write(itemMap, server); + server.disconnect(); + + } + + public void executing(Server server, Map itemMap) { + ReadUtil.write(itemMap, server); + server.disconnect(); + } + + public void writing(int type, int command) { + String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() + + "." + org.nl.acs.device_driver.lnsh.lnsh_station.ItemProtocol.item_to_command; + String to_target = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() + + "." + org.nl.acs.device_driver.lnsh.lnsh_station.ItemProtocol.item_to_target; + String to_task = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() + + "." + org.nl.acs.device_driver.lnsh.lnsh_station.ItemProtocol.item_to_task; + String opcservcerid = this.getDevice().getOpc_server_id(); + Server server = ReadUtil.getServer(opcservcerid); + Map itemMap = new HashMap(); + if (type == 1) { + itemMap.put(to_command, command); + logServer.deviceExecuteLog(this.device_code, "", "", "to_command 写入 " + command); + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "to_command 写入 " + command)); + } else if (type == 2) { + itemMap.put(to_target, command); + logServer.deviceExecuteLog(this.device_code, "", "", "to_target 写入 " + command); + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "to_target 写入 " + command)); + } else if (type == 3) { + itemMap.put(to_task, command); + logServer.deviceExecuteLog(this.device_code, "", "", "to_task 写入 " + command); + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "to_task 写入 " + command)); + } + ReadUtil.write(itemMap, server); + server.disconnect(); + + } + /** + * 多个信号一起下发电气 + * + * @param map + */ + + public void writing(Map map) { + LuceneExecuteLogService lucene = SpringContextHolder.getBean(LuceneExecuteLogService.class); + DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl"); + Map itemMap = new LinkedHashMap<>(); + map.forEach((key, value) -> { + if (ObjectUtil.isNotEmpty(value)) { + itemMap.put(getToParam() + key, value); + } + }); + if (ObjectUtil.isNotEmpty(itemMap)) { + try { + this.checkcontrol(itemMap); + } catch (Exception e) { + e.printStackTrace(); + try{ + this.checkcontrol(itemMap); + } catch (Exception e1){ + e1.printStackTrace(); + } + } + logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap); + lucene.deviceExecuteLog(new LuceneLogDto(this.getDeviceCode(), "下发多个电气信号:" + itemMap)); + } + } + /** + * 抽取统一下发电气信号前缀 + * + * @return + */ + public String getToParam() { + return this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() + "."; + } + + public void writing(String param, String value) { + + String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() + + "." + param; + String opcservcerid = this.getDevice().getOpc_server_id(); + Server server = ReadUtil.getServer(opcservcerid); + Map itemMap = new HashMap(); + if (value instanceof String) { + itemMap.put(to_param, value); + } else { + itemMap.put(to_param, value); + } + ReadUtil.write(itemMap, server); + server.disconnect(); + logServer.deviceExecuteLog(this.device_code, "", "", param + " 写入 " + value); + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + param + " 写入 " + value)); + } + + public void writing(int command) { + String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() + + "." + ItemProtocol.item_to_command; + String opcservcerid = this.getDevice().getOpc_server_id(); + Server server = ReadUtil.getServer(opcservcerid); + Map itemMap = new HashMap(); + itemMap.put(to_command, command); + ReadUtil.write(itemMap, server); + ReadUtil.write(itemMap, server); + server.disconnect(); + logServer.deviceExecuteLog(this.device_code, "", "", "to_command 写入 " + command); + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "to_command 写入 " + command)); + } + + public synchronized void OpenOrClose(String type) { + + //进入区域 + if ("1".equals(type)) { + writing(5); + } else { + //离开区域 + writing(6); + } + } + + public String toString() { + return ""; + } + + + @Override + public JSONObject getDeviceStatusName() throws Exception { + String move; + String action; + String io_action; + boolean hasGoods; + + if (this.move == 0) { + move = "无货"; + hasGoods = false; + } else { + move = "有货"; + hasGoods = true; + } + + switch (this.action) { + case 1: + action = "允许取货"; + break; + case 2: + action = "允许放货"; + break; + case 3: + action = "允许取放"; + break; + default: + action = "禁止取放"; + } + + switch (this.io_action) { + case 1: + io_action = "允许进入"; + break; + case 2: + io_action = "允许离开"; + break; + case 3: + io_action = "允许进入离开"; + break; + default: + io_action = "禁止进入离开"; + } + + String error; + switch (this.error) { + case 1: + error = "急停中"; + break; + case 2: + error = "光幕报警"; + break; + case 3: + error = "本体报警"; + break; + case 4: + error = "未排产报警"; + break; + case 5: + error = "扫码故障"; + break; + default: + error = String.valueOf(this.error); + } + + JSONObject jo = new JSONObject(); + jo.put("device_name", this.getDevice().getDevice_name()); + jo.put("mode", mode); + Object requestNo = this.getExtraValue().get(String.valueOf(this.mode)); + if(ObjectUtil.isNotEmpty(requestNo)){ + jo.put("modeName", this.getModeName(String.valueOf(requestNo))); + } else { + jo.put("modeName", "无效的请求,驱动中未配置"); + } + jo.put("move", move); + jo.put("action", action); + jo.put("io_action", io_action); + jo.put("error", error); + jo.put("task", task); + jo.put("weight", weight); + jo.put("barcode", barcode); + jo.put("isError", iserror); + jo.put("isOnline", isonline); + jo.put("hasGoods", hasGoods); + jo.put("message", message); + jo.put("hasGoods",hasGoods); + return jo; + } + + @Override + public void setDeviceStatus(JSONObject data) { + + } + + + /** + * 请求 + * + * @param + */ + public synchronized boolean applyRequest(String modethod) throws Exception { + Object obj1 = this; + Date date = new Date(); + if (date.getTime() - this.instruction_require_time.getTime() < (long) this.instruction_require_time_out) { + log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out); + return false; + } else { + this.instruction_require_time = date; + Object obj = this.getClass().getDeclaredConstructor().newInstance(); + Method method1 = this.getClass().getMethod(modethod, null); + method1.invoke(this, null); + return true; + } + } + + /** + * 扫码成功申请 + * + * @param + */ + public synchronized boolean barcode_success_apply() { + if(move > 0) { + ApplyTaskRequest request = new ApplyTaskRequest(); + request.setDevice_code(this.getDevice_code()); + request.setRequest_method_code(Thread.currentThread().getStackTrace()[1].getMethodName()); + request.setRequest_method_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName())); + request.setWeight(String.valueOf(weight)); + request.setVehicle_code(String.valueOf(barcode)); + ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class); + message = RequestMethodEnum.getName("barcode_success_apply") + "barcode_success_apply 接口请求LMS..."; + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request))); + + if (resp.getCode() == 200) { + Map map = new LinkedHashMap<>(); + map.put("to_command",200); + this.writing(map); + this.setRequireSucess(true); + message = RequestMethodEnum.getName("barcode_success_apply") + "barcode_success_apply 接口请求成功" + resp.getMessage(); + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "返回参数:" + JSON.toJSONString(resp))); + } else { + Map map = new LinkedHashMap<>(); + map.put("to_command",400); + this.writing(map); + message = RequestMethodEnum.getName("barcode_success_apply") + "barcode_success_apply 接口请求失败" + resp.getMessage(); + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "返回参数:" + JSON.toJSONString(resp))); + } + return true; + } else { + message = RequestMethodEnum.getName("barcode_success_apply") + "barcode_success_apply 设备无货未请求LMS..."; + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message)); + return false; + } + } + + /** + * 获取组盘信息 + * + * @param + */ + public synchronized boolean get_vehicle_info() { + if(move > 0) { + ApplyTaskRequest request = new ApplyTaskRequest(); + request.setDevice_code(this.getDevice_code()); + request.setRequest_method_code(Thread.currentThread().getStackTrace()[1].getMethodName()); + request.setRequest_method_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName())); + request.setWeight(String.valueOf(weight)); + request.setVehicle_code(String.valueOf(barcode)); + ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class); + message = RequestMethodEnum.getName("get_vehicle_info") + "get_vehicle_info 接口请求LMS..."; + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request))); + + if (resp.getCode() == 200) { + Map map = new LinkedHashMap<>(); + map.put("to_command",200); + this.writing(map); + this.setRequireSucess(true); + } else { + Map map = new LinkedHashMap<>(); + map.put("to_command",400); + this.writing(map); + message = RequestMethodEnum.getName("get_vehicle_info") + "get_vehicle_info 接口请求失败" + resp.getMessage();; + } + return true; + } else { + message = RequestMethodEnum.getName("get_vehicle_info") + "get_vehicle_info 设备无货未请求LMS..."; + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message)); + return false; + } + + } + + +} diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_mixing_mill/LnshMixingMillDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_mixing_mill/LnshMixingMillDeviceDriver.java index 25d8e5a..b600239 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_mixing_mill/LnshMixingMillDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_mixing_mill/LnshMixingMillDeviceDriver.java @@ -173,7 +173,8 @@ public class LnshMixingMillDeviceDriver extends AbstractOpcDeviceDriver implemen this.setIserror(true); message = "有报警"; //无报警 - } else if (mode == 6) { + } + else if (mode == 6) { message = "泥料号输入不正确"; } else { diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_package_pallet_manipulator/ItemProtocol.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_package_pallet_manipulator/ItemProtocol.java index 0959df1..12e7c19 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_package_pallet_manipulator/ItemProtocol.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_package_pallet_manipulator/ItemProtocol.java @@ -27,7 +27,7 @@ public class ItemProtocol { public static String item_production_time = "production_time"; public static String item_error_time = "error_time"; public static String item_order_No = "order_No"; - public static String item_formula = "formula"; +// public static String item_formula = "formula"; public static String item_product_code = "product_code"; public static String item_AlongSide = "AlongSide"; public static String item_BshortSide = "BshortSide"; @@ -50,7 +50,7 @@ public class ItemProtocol { public static String item_to_on_vehicle_qty = "to_on_vehicle_qty"; public static String item_to_vehicle_type = "to_vehicle_type"; public static String item_to_tray_qty = "to_tray_qty"; - public static String item_to_formula = "to_formula"; +// public static String item_to_formula = "to_formula"; private LnshPackagePalletManipulatorDeviceDriver driver; public ItemProtocol(LnshPackagePalletManipulatorDeviceDriver driver) { @@ -62,9 +62,9 @@ public class ItemProtocol { } - public String getFormula() { - return this.getOpcStringValue(item_formula); - } +// public String getFormula() { +// return this.getOpcStringValue(item_formula); +// } public int getToTrayQty() { return this.getOpcIntegerValue(item_to_tray_qty); } @@ -101,9 +101,9 @@ public class ItemProtocol { return this.getOpcIntegerValue(item_qty); } - public int getToFormula() { - return this.getOpcIntegerValue(item_to_formula); - } +// public int getToFormula() { +// return this.getOpcIntegerValue(item_to_formula); +// } public int getOrder_qty() { return this.getOpcIntegerValue(item_order_qty); @@ -243,7 +243,7 @@ public class ItemProtocol { list.add(new ItemDto(item_order_No, "工单号", "DB80.STRING128.50")); list.add(new ItemDto(item_grab_station, "当前抓取工位", "DB80.B130")); list.add(new ItemDto(item_place_station, "当前放置工位", "DB80.B132")); - list.add(new ItemDto(item_formula, "配方代号", "DB80.STRING182.50")); +// list.add(new ItemDto(item_formula, "配方代号", "DB80.STRING182.50")); // list.add(new ItemDto(item_product_code, "产品编号", "DB1.W184")); // list.add(new ItemDto(item_AlongSide, "A长边", "DB1.W186")); // list.add(new ItemDto(item_BshortSide, "B短边", "DB1.W188")); @@ -267,7 +267,7 @@ public class ItemProtocol { list.add(new ItemDto(item_to_BshortSide, "B短边", "DB81.W66")); list.add(new ItemDto(item_to_Htrapezoidal, "H梯形高", "DB81.W68")); list.add(new ItemDto(item_to_Wthickness, "W厚度", "DB81.W70")); - list.add(new ItemDto(item_to_formula, "配方代号", "DB81.STRING124.50")); +// list.add(new ItemDto(item_to_formula, "配方代号", "DB81.STRING124.50")); return list; } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_package_site/ItemProtocol.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_package_site/ItemProtocol.java index fdfbbb3..aa847b5 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_package_site/ItemProtocol.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_package_site/ItemProtocol.java @@ -16,7 +16,7 @@ public class ItemProtocol { public static String item_mode = "mode"; public static String item_move = "move"; public static String item_action = "action"; - public static String item_ioaction = "ioaction"; + public static String item_io_action = "io_action"; public static String item_error = "error"; public static String item_vehicle_code = "vehicle_code"; public static String item_vehicle_type = "vehicle_type"; @@ -78,7 +78,7 @@ public class ItemProtocol { } public int getIoaction() { - return this.getOpcIntegerValue(item_ioaction); + return this.getOpcIntegerValue(item_io_action); } public int getError() { @@ -139,7 +139,7 @@ public class ItemProtocol { list.add(new ItemDto(item_mode, "工作模式", "DB51.B1", Boolean.valueOf(true))); list.add(new ItemDto(item_move, "光电开关信号", "DB51.B2")); list.add(new ItemDto(item_action, "取放信号", "DB51.B3")); - list.add(new ItemDto(item_ioaction, "进出信号", "DB51.B4")); + list.add(new ItemDto(item_io_action, "进出信号", "DB51.B4")); list.add(new ItemDto(item_error, "报警信号", "DB51.B5")); list.add(new ItemDto(item_task, "任务号", "DB51.D6")); list.add(new ItemDto(item_is_weight, "重量", "DB51.D10")); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_package_site/LnshPackageSiteDefination.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_package_site/LnshPackageSiteDefination.java index edac139..a703e48 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_package_site/LnshPackageSiteDefination.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_package_site/LnshPackageSiteDefination.java @@ -61,7 +61,7 @@ public class LnshPackageSiteDefination implements OpcDeviceDriverDefination { list.add(new ItemDto(ItemProtocol.item_mode, "工作模式", "DB51.B1", Boolean.TRUE)); list.add(new ItemDto(ItemProtocol.item_move, "光电开关信号", "DB51.B2")); list.add(new ItemDto(ItemProtocol.item_action, "取放信号", "DB51.B3")); - list.add(new ItemDto(ItemProtocol.item_ioaction, "进出信号", "DB51.B4")); + list.add(new ItemDto(ItemProtocol.item_io_action, "进出信号", "DB51.B4")); list.add(new ItemDto(ItemProtocol.item_error, "报警信号", "DB51.B5")); list.add(new ItemDto(ItemProtocol.item_task, "任务号", "DB51.B6")); list.add(new ItemDto(ItemProtocol.item_is_weight, "重量", "DB51.B10")); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/ItemProtocol.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/ItemProtocol.java index b3b9901..2ad66b4 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/ItemProtocol.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/ItemProtocol.java @@ -215,42 +215,42 @@ public class ItemProtocol { public static List getReadableItemDtos() { ArrayList list = new ArrayList(); - list.add(new ItemDto(item_heartbeat, "心跳", "DB112.B0")); - list.add(new ItemDto(item_mode, "工作模式", "DB112.B1", Boolean.valueOf(true))); - list.add(new ItemDto(item_status, "设备状态", "DB112.B2")); - list.add(new ItemDto(item_status, "设备动作", "DB112.B3")); - list.add(new ItemDto(item_error, "故障代码", "DB112.B4")); - list.add(new ItemDto(item_open_time, "开机时间", "DB112.STRING6.50")); - list.add(new ItemDto(item_standby_time, "待机时间", "DB112.D58")); - list.add(new ItemDto(item_production_time, "生产时间", "DB112.D62")); - list.add(new ItemDto(item_error_time, "故障时间", "DB112.D66")); - list.add(new ItemDto(item_get_station, "当前抓取工位", "DB112.B70")); - list.add(new ItemDto(item_put_station, "当前放置工位", "DB112.B71")); - list.add(new ItemDto(item_is_qualified, "是否合格", "DB112.B72")); - list.add(new ItemDto(item_laser_marking_code, "激光标刻码", "DB112.STRING74.50")); - list.add(new ItemDto(item_grinding_number, "碾次", "DB112.STRING126.50")); - list.add(new ItemDto(item_height1, "高度1", "DB112.REAL178")); - list.add(new ItemDto(item_height2, "高度2", "DB112.REAL182")); - list.add(new ItemDto(item_height3, "高度3", "DB112.REAL186")); - list.add(new ItemDto(item_height4, "高度4", "DB112.REAL190")); - list.add(new ItemDto(item_width1, "宽度1", "DB112.REAL194")); - list.add(new ItemDto(item_width2, "宽度2", "DB112.REAL198")); - list.add(new ItemDto(item_len, "长度", "DB112.REAL202")); - list.add(new ItemDto(item_volume, "体积", "DB112.REAL206")); - list.add(new ItemDto(item_flatness, "平面度", "DB112.REAL210")); - list.add(new ItemDto(item_unqualified_qty, "缺陷个数", "DB112.REAL214")); - list.add(new ItemDto(item_weight, "重量", "DB112.REAL218")); - list.add(new ItemDto(item_error_cause, "故障原因", "DB112.B223")); + list.add(new ItemDto(item_heartbeat, "心跳", "DB401.B0")); + list.add(new ItemDto(item_mode, "工作模式", "DB401.B1", Boolean.valueOf(true))); + list.add(new ItemDto(item_status, "设备状态", "DB401.B2")); + list.add(new ItemDto(item_status, "设备动作", "DB401.B3")); + list.add(new ItemDto(item_error, "故障代码", "DB401.B4")); + list.add(new ItemDto(item_open_time, "开机时间", "DB401.STRING6.50")); + list.add(new ItemDto(item_standby_time, "待机时间", "DB401.D58")); + list.add(new ItemDto(item_production_time, "生产时间", "DB401.D62")); + list.add(new ItemDto(item_error_time, "故障时间", "DB401.D66")); + list.add(new ItemDto(item_get_station, "当前抓取工位", "DB401.B70")); + list.add(new ItemDto(item_put_station, "当前放置工位", "DB401.B71")); + list.add(new ItemDto(item_is_qualified, "是否合格", "DB401.B72")); + list.add(new ItemDto(item_laser_marking_code, "激光标刻码", "DB401.STRING74.50")); + list.add(new ItemDto(item_grinding_number, "碾次", "DB401.STRING126.50")); + list.add(new ItemDto(item_height1, "高度1", "DB401.REAL178")); + list.add(new ItemDto(item_height2, "高度2", "DB401.REAL182")); + list.add(new ItemDto(item_height3, "高度3", "DB401.REAL186")); + list.add(new ItemDto(item_height4, "高度4", "DB401.REAL190")); + list.add(new ItemDto(item_width1, "宽度1", "DB401.REAL194")); + list.add(new ItemDto(item_width2, "宽度2", "DB401.REAL198")); + list.add(new ItemDto(item_len, "长度", "DB401.REAL202")); + list.add(new ItemDto(item_volume, "体积", "DB401.REAL206")); + list.add(new ItemDto(item_flatness, "平面度", "DB401.REAL210")); + list.add(new ItemDto(item_unqualified_qty, "缺陷个数", "DB401.REAL214")); + list.add(new ItemDto(item_weight, "重量", "DB401.REAL218")); + list.add(new ItemDto(item_error_cause, "故障原因", "DB401.B223")); return list; } public static List getWriteableItemDtos() { ArrayList list = new ArrayList(); - list.add(new ItemDto(item_to_command, "反馈", "DB113.W0", Boolean.TRUE)); - list.add(new ItemDto(item_to_error, "error", "DB113.W2")); - list.add(new ItemDto(item_to_order_No, "工单号", "DB113.STRING4.50")); - list.add(new ItemDto(item_to_weight, "生产重量", "DB113.D56")); - list.add(new ItemDto(item_to_material_code, "下发物料编号", "DB113.STRING60.50")); + list.add(new ItemDto(item_to_command, "反馈", "DB401.W224", Boolean.TRUE)); + list.add(new ItemDto(item_to_error, "error", "DB401.W226")); + list.add(new ItemDto(item_to_order_No, "工单号", "DB401.STRING228.50")); + list.add(new ItemDto(item_to_weight, "生产重量", "DB401.D280")); + list.add(new ItemDto(item_to_material_code, "下发物料编号", "DB401.STRING284.50")); return list; } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator_site/ItemProtocol.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator_site/ItemProtocol.java index cbb053c..179dbbc 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator_site/ItemProtocol.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator_site/ItemProtocol.java @@ -18,7 +18,7 @@ public class ItemProtocol { public static String item_mode = "mode"; public static String item_move = "move"; public static String item_action = "action"; - public static String item_ioaction = "ioaction"; + public static String item_io_action = "io_action"; public static String item_error = "error"; public static String item_task = "task"; public static String item_weight = "weight"; @@ -26,119 +26,119 @@ public class ItemProtocol { public static String item_barcode = "barcode"; public static String item_unqualified_qty = "unqualified_qty"; public static String item_encoder_qty = "encoder_qty"; - public static String item_product_code = "product_code"; - public static String item_AlongSide = "AlongSide"; - public static String item_BshortSide = "BshortSide"; - public static String item_Htrapezoidal = "Htrapezoidal"; - public static String item_Wthickness = "Wthickness"; - public static String item_tray_qty = "tray_qty"; - public static String item_tray_high = "tray_high"; - public static String item_crib_category = "crib_category"; - public static String item_palletX1_line = "palletX1_line"; - public static String item_palletY1_row = "palletY1_row"; - public static String item_palletA1_angle = "palletA1_angle"; - public static String item_palletX2_line = "palletX2_line"; - public static String item_palletY2_row = "palletY2_row"; - public static String item_palletA2_angle = "palletA2_angle"; - public static String item_palletX3_line = "palletX3_line"; - public static String item_palletY3_row = "palletY3_row"; - public static String item_palletA3_angle = "palletA3_angle"; - public static String item_pressCribX1_line = "pressCribX1_line"; - public static String item_pressCribY1_row = "pressCribY1_row"; - public static String item_pressCribA1_angle = "pressCribA1_angle"; - public static String item_pressCribX2_line = "pressCribX2_line"; - public static String item_pressCribY2_row = "pressCribY2_row"; - public static String item_pressCribA2_angle = "pressCribA2_angle"; - public static String item_pressCribX3_line = "pressCribX3_line"; - public static String item_pressCribY3_row = "pressCribY3_row"; - public static String item_pressCribA3_angle = "pressCribA3_angle"; - public static String item_Zoffset = "Zoffset"; - public static String item_pallet_layerQty = "pallet_layerQty"; - public static String item_pressCrib_layerQty = "pressCrib_layerQty"; - public static String item_codeLayerX1_interval = "codeLayerX1_interval"; - public static String item_codeLayerY1_interval = "codeLayerY1_interval"; - public static String item_codeLayerX2_interval = "codeLayerX2_interval"; - public static String item_codeLayerY2_interval = "codeLayerY2_interval"; - public static String item_codeLayerX3_interval = "codeLayerX3_interval"; - public static String item_codeLayerY3_interval = "codeLayerY3_interval"; - public static String item_codeLayerX1_offset = "codeLayerX1_offset"; - public static String item_codeLayerY1_offset = "codeLayerY1_offset"; - public static String item_codeLayerX2_offset = "codeLayerX2_offset"; - public static String item_codeLayerY2_offset = "codeLayerY2_offset"; - public static String item_codeLayerX3_offset = "codeLayerX3_offset"; - public static String item_codeLayerY3_offset = "codeLayerY3_offset"; - public static String item_pressLayerX1_interval = "pressLayerX1_interval"; - public static String item_pressLayerY1_interval = "pressLayerY1_interval"; - public static String item_pressLayerX2_interval = "pressLayerX2_interval"; - public static String item_pressLayerY2_interval = "pressLayerY2_interval"; - public static String item_pressLayerX3_interval = "pressLayerX3_interval"; - public static String item_pressLayerY3_interval = "pressLayerY3_interval"; - public static String item_pressLayerX1_offset = "pressLayerX1_offset"; - public static String item_pressLayerY1_offset = "pressLayerY1_offset"; - public static String item_pressLayerX2_offset = "pressLayerX2_offset"; - public static String item_pressLayerY2_offset = "pressLayerY2_offset"; - public static String item_pressLayerX3_offset = "pressLayerX3_offset"; - public static String item_pressLayerY3_offset = "pressLayerY3_offset"; - public static String item_tool_coordinate = "tool_coordinate"; +// public static String item_product_code = "product_code"; +// public static String item_AlongSide = "AlongSide"; +// public static String item_BshortSide = "BshortSide"; +// public static String item_Htrapezoidal = "Htrapezoidal"; +// public static String item_Wthickness = "Wthickness"; +// public static String item_tray_qty = "tray_qty"; +// public static String item_tray_high = "tray_high"; +// public static String item_crib_category = "crib_category"; +// public static String item_palletX1_line = "palletX1_line"; +// public static String item_palletY1_row = "palletY1_row"; +// public static String item_palletA1_angle = "palletA1_angle"; +// public static String item_palletX2_line = "palletX2_line"; +// public static String item_palletY2_row = "palletY2_row"; +// public static String item_palletA2_angle = "palletA2_angle"; +// public static String item_palletX3_line = "palletX3_line"; +// public static String item_palletY3_row = "palletY3_row"; +// public static String item_palletA3_angle = "palletA3_angle"; +// public static String item_pressCribX1_line = "pressCribX1_line"; +// public static String item_pressCribY1_row = "pressCribY1_row"; +// public static String item_pressCribA1_angle = "pressCribA1_angle"; +// public static String item_pressCribX2_line = "pressCribX2_line"; +// public static String item_pressCribY2_row = "pressCribY2_row"; +// public static String item_pressCribA2_angle = "pressCribA2_angle"; +// public static String item_pressCribX3_line = "pressCribX3_line"; +// public static String item_pressCribY3_row = "pressCribY3_row"; +// public static String item_pressCribA3_angle = "pressCribA3_angle"; +// public static String item_Zoffset = "Zoffset"; +// public static String item_pallet_layerQty = "pallet_layerQty"; +// public static String item_pressCrib_layerQty = "pressCrib_layerQty"; +// public static String item_codeLayerX1_interval = "codeLayerX1_interval"; +// public static String item_codeLayerY1_interval = "codeLayerY1_interval"; +// public static String item_codeLayerX2_interval = "codeLayerX2_interval"; +// public static String item_codeLayerY2_interval = "codeLayerY2_interval"; +// public static String item_codeLayerX3_interval = "codeLayerX3_interval"; +// public static String item_codeLayerY3_interval = "codeLayerY3_interval"; +// public static String item_codeLayerX1_offset = "codeLayerX1_offset"; +// public static String item_codeLayerY1_offset = "codeLayerY1_offset"; +// public static String item_codeLayerX2_offset = "codeLayerX2_offset"; +// public static String item_codeLayerY2_offset = "codeLayerY2_offset"; +// public static String item_codeLayerX3_offset = "codeLayerX3_offset"; +// public static String item_codeLayerY3_offset = "codeLayerY3_offset"; +// public static String item_pressLayerX1_interval = "pressLayerX1_interval"; +// public static String item_pressLayerY1_interval = "pressLayerY1_interval"; +// public static String item_pressLayerX2_interval = "pressLayerX2_interval"; +// public static String item_pressLayerY2_interval = "pressLayerY2_interval"; +// public static String item_pressLayerX3_interval = "pressLayerX3_interval"; +// public static String item_pressLayerY3_interval = "pressLayerY3_interval"; +// public static String item_pressLayerX1_offset = "pressLayerX1_offset"; +// public static String item_pressLayerY1_offset = "pressLayerY1_offset"; +// public static String item_pressLayerX2_offset = "pressLayerX2_offset"; +// public static String item_pressLayerY2_offset = "pressLayerY2_offset"; +// public static String item_pressLayerX3_offset = "pressLayerX3_offset"; +// public static String item_pressLayerY3_offset = "pressLayerY3_offset"; +// public static String item_tool_coordinate = "tool_coordinate"; public static String item_to_command = "to_command"; public static String item_to_target = "to_target"; public static String item_to_task = "to_task"; - public static String item_to_product_code = "to_product_code"; - public static String item_to_AlongSide = "to_AlongSide"; - public static String item_to_BshortSide = "to_BshortSide"; - public static String item_to_Htrapezoidal = "to_Htrapezoidal"; - public static String item_to_Wthickness = "to_Wthickness"; - public static String item_to_tray_qty = "to_tray_qty"; - public static String item_to_tray_high = "to_tray_high"; - public static String item_to_crib_category = "to_crib_category"; - public static String item_to_palletX1_line = "to_palletX1_line"; - public static String item_to_palletY1_row = "to_palletY1_row"; - public static String item_to_palletA1_angle = "to_palletA1_angle"; - public static String item_to_palletX2_line = "to_palletX2_line"; - public static String item_to_palletY2_row = "to_palletY2_row"; - public static String item_to_palletA2_angle = "to_palletA2_angle"; - public static String item_to_palletX3_line = "to_palletX3_line"; - public static String item_to_palletY3_row = "to_palletY3_row"; - public static String item_to_palletA3_angle = "to_palletA3_angle"; - public static String item_to_pressCribX1_line = "to_pressCribX1_line"; - public static String item_to_pressCribY1_row = "to_pressCribY1_row"; - public static String item_to_pressCribA1_angle = "to_pressCribA1_angle"; - public static String item_to_pressCribX2_line = "to_pressCribX2_line"; - public static String item_to_pressCribY2_row = "to_pressCribY2_row"; - public static String item_to_pressCribA2_angle = "to_pressCribA2_angle"; - public static String item_to_pressCribX3_line = "to_pressCribX3_line"; - public static String item_to_pressCribY3_row = "to_pressCribY3_row"; - public static String item_to_pressCribA3_angle = "to_pressCribA3_angle"; - public static String item_to_Zoffset = "to_Zoffset"; - public static String item_to_pallet_layerQty = "to_pallet_layerQty"; - public static String item_to_pressCrib_layerQty = "to_pressCrib_layerQty"; - public static String item_to_codeLayerX1_interval = "to_codeLayerX1_interval"; - public static String item_to_codeLayerY1_interval = "to_codeLayerY1_interval"; - public static String item_to_codeLayerX2_interval = "to_codeLayerX2_interval"; - public static String item_to_codeLayerY2_interval = "to_codeLayerY2_interval"; - public static String item_to_codeLayerX3_interval = "to_codeLayerX3_interval"; - public static String item_to_codeLayerY3_interval = "to_codeLayerY3_interval"; - public static String item_to_codeLayerX1_offset = "to_codeLayerX1_offset"; - public static String item_to_codeLayerY1_offset = "to_codeLayerY1_offset"; - public static String item_to_codeLayerX2_offset = "to_codeLayerX2_offset"; - public static String item_to_codeLayerY2_offset = "to_codeLayerY2_offset"; - public static String item_to_codeLayerX3_offset = "to_codeLayerX3_offset"; - public static String item_to_codeLayerY3_offset = "to_codeLayerY3_offset"; - public static String item_to_pressLayerX1_interval = "to_pressLayerX1_interval"; - public static String item_to_pressLayerY1_interval = "to_pressLayerY1_interval"; - public static String item_to_pressLayerX2_interval = "to_pressLayerX2_interval"; - public static String item_to_pressLayerY2_interval = "to_pressLayerY2_interval"; - public static String item_to_pressLayerX3_interval = "to_pressLayerX3_interval"; - public static String item_to_pressLayerY3_interval = "to_pressLayerY3_interval"; - public static String item_to_pressLayerX1_offset = "to_pressLayerX1_offset"; - public static String item_to_pressLayerY1_offset = "to_pressLayerY1_offset"; - public static String item_to_pressLayerX2_offset = "to_pressLayerX2_offset"; - public static String item_to_pressLayerY2_offset = "to_pressLayerY2_offset"; - public static String item_to_pressLayerX3_offset = "to_pressLayerX3_offset"; - public static String item_to_pressLayerY3_offset = "to_pressLayerY3_offset"; - public static String item_to_tool_coordinate = "to_tool_coordinate"; +// public static String item_to_product_code = "to_product_code"; +// public static String item_to_AlongSide = "to_AlongSide"; +// public static String item_to_BshortSide = "to_BshortSide"; +// public static String item_to_Htrapezoidal = "to_Htrapezoidal"; +// public static String item_to_Wthickness = "to_Wthickness"; +// public static String item_to_tray_qty = "to_tray_qty"; +// public static String item_to_tray_high = "to_tray_high"; +// public static String item_to_crib_category = "to_crib_category"; +// public static String item_to_palletX1_line = "to_palletX1_line"; +// public static String item_to_palletY1_row = "to_palletY1_row"; +// public static String item_to_palletA1_angle = "to_palletA1_angle"; +// public static String item_to_palletX2_line = "to_palletX2_line"; +// public static String item_to_palletY2_row = "to_palletY2_row"; +// public static String item_to_palletA2_angle = "to_palletA2_angle"; +// public static String item_to_palletX3_line = "to_palletX3_line"; +// public static String item_to_palletY3_row = "to_palletY3_row"; +// public static String item_to_palletA3_angle = "to_palletA3_angle"; +// public static String item_to_pressCribX1_line = "to_pressCribX1_line"; +// public static String item_to_pressCribY1_row = "to_pressCribY1_row"; +// public static String item_to_pressCribA1_angle = "to_pressCribA1_angle"; +// public static String item_to_pressCribX2_line = "to_pressCribX2_line"; +// public static String item_to_pressCribY2_row = "to_pressCribY2_row"; +// public static String item_to_pressCribA2_angle = "to_pressCribA2_angle"; +// public static String item_to_pressCribX3_line = "to_pressCribX3_line"; +// public static String item_to_pressCribY3_row = "to_pressCribY3_row"; +// public static String item_to_pressCribA3_angle = "to_pressCribA3_angle"; +// public static String item_to_Zoffset = "to_Zoffset"; +// public static String item_to_pallet_layerQty = "to_pallet_layerQty"; +// public static String item_to_pressCrib_layerQty = "to_pressCrib_layerQty"; +// public static String item_to_codeLayerX1_interval = "to_codeLayerX1_interval"; +// public static String item_to_codeLayerY1_interval = "to_codeLayerY1_interval"; +// public static String item_to_codeLayerX2_interval = "to_codeLayerX2_interval"; +// public static String item_to_codeLayerY2_interval = "to_codeLayerY2_interval"; +// public static String item_to_codeLayerX3_interval = "to_codeLayerX3_interval"; +// public static String item_to_codeLayerY3_interval = "to_codeLayerY3_interval"; +// public static String item_to_codeLayerX1_offset = "to_codeLayerX1_offset"; +// public static String item_to_codeLayerY1_offset = "to_codeLayerY1_offset"; +// public static String item_to_codeLayerX2_offset = "to_codeLayerX2_offset"; +// public static String item_to_codeLayerY2_offset = "to_codeLayerY2_offset"; +// public static String item_to_codeLayerX3_offset = "to_codeLayerX3_offset"; +// public static String item_to_codeLayerY3_offset = "to_codeLayerY3_offset"; +// public static String item_to_pressLayerX1_interval = "to_pressLayerX1_interval"; +// public static String item_to_pressLayerY1_interval = "to_pressLayerY1_interval"; +// public static String item_to_pressLayerX2_interval = "to_pressLayerX2_interval"; +// public static String item_to_pressLayerY2_interval = "to_pressLayerY2_interval"; +// public static String item_to_pressLayerX3_interval = "to_pressLayerX3_interval"; +// public static String item_to_pressLayerY3_interval = "to_pressLayerY3_interval"; +// public static String item_to_pressLayerX1_offset = "to_pressLayerX1_offset"; +// public static String item_to_pressLayerY1_offset = "to_pressLayerY1_offset"; +// public static String item_to_pressLayerX2_offset = "to_pressLayerX2_offset"; +// public static String item_to_pressLayerY2_offset = "to_pressLayerY2_offset"; +// public static String item_to_pressLayerX3_offset = "to_pressLayerX3_offset"; +// public static String item_to_pressLayerY3_offset = "to_pressLayerY3_offset"; +// public static String item_to_tool_coordinate = "to_tool_coordinate"; Boolean isonline; @@ -166,7 +166,7 @@ public class ItemProtocol { } public int getIoAction() { - return this.getOpcIntegerValue(item_ioaction); + return this.getOpcIntegerValue(item_io_action); } public int getError() { @@ -189,221 +189,221 @@ public class ItemProtocol { return this.getOpcIntegerValue(item_barcode); } - public int getProduct_code() { - return this.getOpcIntegerValue(item_product_code); - } - - public int getAlongSide() { - return this.getOpcIntegerValue(item_AlongSide); - } - - public int getBshortSide() { - return this.getOpcIntegerValue(item_BshortSide); - } - - public int getHtrapezoidal() { - return this.getOpcIntegerValue(item_Htrapezoidal); - } - - public int getWthickness() { - return this.getOpcIntegerValue(item_Wthickness); - } - - public int getTray_qty() { - return this.getOpcIntegerValue(item_tray_qty); - } - - public int getTray_high() { - return this.getOpcIntegerValue(item_tray_high); - } - - public int getCrib_category() { - return this.getOpcIntegerValue(item_crib_category); - } - - public int getPalletX1_line() { - return this.getOpcIntegerValue(item_palletX1_line); - } - - public int getPalletY1_row() { - return this.getOpcIntegerValue(item_palletY1_row); - } - - public int getPalletA1_angle() { - return this.getOpcIntegerValue(item_palletA1_angle); - } - - public int getPalletX2_line() { - return this.getOpcIntegerValue(item_palletX2_line); - } - - public int getPalletY2_row() { - return this.getOpcIntegerValue(item_palletY2_row); - } - - public int getPalletA2_angle() { - return this.getOpcIntegerValue(item_palletA2_angle); - } - - public int getPalletX3_line() { - return this.getOpcIntegerValue(item_palletX3_line); - } - - public int getPalletY3_row() { - return this.getOpcIntegerValue(item_palletY3_row); - } - - public int getPalletA3_angle() { - return this.getOpcIntegerValue(item_palletA3_angle); - } - - public int getPressCribX1_line() { - return this.getOpcIntegerValue(item_pressCribX1_line); - } - - public int getPressCribY1_row() { - return this.getOpcIntegerValue(item_pressCribY1_row); - } - - public int getPressCribA1_angle() { - return this.getOpcIntegerValue(item_pressCribA1_angle); - } - - public int getPressCribX2_line() { - return this.getOpcIntegerValue(item_pressCribX2_line); - } - - public int getPressCribY2_row() { - return this.getOpcIntegerValue(item_pressCribY2_row); - } - - public int getPressCribA2_angle() { - return this.getOpcIntegerValue(item_pressCribA2_angle); - } - - public int getPressCribX3_line() { - return this.getOpcIntegerValue(item_pressCribX3_line); - } - - public int getPressCribY3_row() { - return this.getOpcIntegerValue(item_pressCribY3_row); - } - - public int getPressCribA3_angle() { - return this.getOpcIntegerValue(item_pressCribA3_angle); - } - - public int getZoffset() { - return this.getOpcIntegerValue(item_Zoffset); - } - - public int getPallet_layerQty() { - return this.getOpcIntegerValue(item_pallet_layerQty); - } - - public int getPressCrib_layerQty() { - return this.getOpcIntegerValue(item_pressCrib_layerQty); - } - - public int getCodeLayerX1_interval() { - return this.getOpcIntegerValue(item_codeLayerX1_interval); - } - - public int getCodeLayerY1_interval() { - return this.getOpcIntegerValue(item_codeLayerY1_interval); - } - - public int getCodeLayerX2_interval() { - return this.getOpcIntegerValue(item_codeLayerX2_interval); - } - - public int getCodeLayerY2_interval() { - return this.getOpcIntegerValue(item_codeLayerY2_interval); - } - - public int getCodeLayerX3_interval() { - return this.getOpcIntegerValue(item_codeLayerX3_interval); - } - - public int getcodeLayerY3_interval() { - return this.getOpcIntegerValue(item_codeLayerY3_interval); - } - - public int getCodeLayerX1_offset() { - return this.getOpcIntegerValue(item_codeLayerX1_offset); - } - - public int getCodeLayerY1_offset() { - return this.getOpcIntegerValue(item_codeLayerY1_offset); - } - - public int getCodeLayerX2_offset() { - return this.getOpcIntegerValue(item_codeLayerX2_offset); - } - - public int getCodeLayerY2_offset() { - return this.getOpcIntegerValue(item_codeLayerY2_offset); - } - - public int getCodeLayerX3_offset() { - return this.getOpcIntegerValue(item_codeLayerX3_offset); - } - - public int getCodeLayerY3_offset() { - return this.getOpcIntegerValue(item_codeLayerY3_offset); - } - - public int getPressLayerX1_interval() { - return this.getOpcIntegerValue(item_pressLayerX1_interval); - } - - public int getPressLayerY1_interval() { - return this.getOpcIntegerValue(item_pressLayerY1_interval); - } - - public int getPressLayerX2_interval() { - return this.getOpcIntegerValue(item_pressLayerX2_interval); - } - - public int getPressLayerY2_interval() { - return this.getOpcIntegerValue(item_pressLayerY2_interval); - } - - public int getPressLayerX3_interval() { - return this.getOpcIntegerValue(item_pressLayerX3_interval); - } - - public int getPressLayerY3_interval() { - return this.getOpcIntegerValue(item_pressLayerY3_interval); - } - - public int getPressLayerX1_offset() { - return this.getOpcIntegerValue(item_pressLayerX1_offset); - } - - public int getPressLayerY1_offset() { - return this.getOpcIntegerValue(item_pressLayerY1_offset); - } - - public int getPressLayerX2_offset() { - return this.getOpcIntegerValue(item_pressLayerX2_offset); - } - - public int getPressLayerY2_offset() { - return this.getOpcIntegerValue(item_pressLayerY2_offset); - } - - public int getPressLayerX3_offset() { - return this.getOpcIntegerValue(item_pressLayerX3_offset); - } - - public int getPressLayerY3_offset() { - return this.getOpcIntegerValue(item_pressLayerY3_offset); - } - - public int getTool_coordinate() { - return this.getOpcIntegerValue(item_tool_coordinate); - } +// public int getProduct_code() { +// return this.getOpcIntegerValue(item_product_code); +// } +// +// public int getAlongSide() { +// return this.getOpcIntegerValue(item_AlongSide); +// } +// +// public int getBshortSide() { +// return this.getOpcIntegerValue(item_BshortSide); +// } +// +// public int getHtrapezoidal() { +// return this.getOpcIntegerValue(item_Htrapezoidal); +// } +// +// public int getWthickness() { +// return this.getOpcIntegerValue(item_Wthickness); +// } +// +// public int getTray_qty() { +// return this.getOpcIntegerValue(item_tray_qty); +// } +// +// public int getTray_high() { +// return this.getOpcIntegerValue(item_tray_high); +// } +// +// public int getCrib_category() { +// return this.getOpcIntegerValue(item_crib_category); +// } +// +// public int getPalletX1_line() { +// return this.getOpcIntegerValue(item_palletX1_line); +// } +// +// public int getPalletY1_row() { +// return this.getOpcIntegerValue(item_palletY1_row); +// } +// +// public int getPalletA1_angle() { +// return this.getOpcIntegerValue(item_palletA1_angle); +// } +// +// public int getPalletX2_line() { +// return this.getOpcIntegerValue(item_palletX2_line); +// } +// +// public int getPalletY2_row() { +// return this.getOpcIntegerValue(item_palletY2_row); +// } +// +// public int getPalletA2_angle() { +// return this.getOpcIntegerValue(item_palletA2_angle); +// } +// +// public int getPalletX3_line() { +// return this.getOpcIntegerValue(item_palletX3_line); +// } +// +// public int getPalletY3_row() { +// return this.getOpcIntegerValue(item_palletY3_row); +// } +// +// public int getPalletA3_angle() { +// return this.getOpcIntegerValue(item_palletA3_angle); +// } +// +// public int getPressCribX1_line() { +// return this.getOpcIntegerValue(item_pressCribX1_line); +// } +// +// public int getPressCribY1_row() { +// return this.getOpcIntegerValue(item_pressCribY1_row); +// } +// +// public int getPressCribA1_angle() { +// return this.getOpcIntegerValue(item_pressCribA1_angle); +// } +// +// public int getPressCribX2_line() { +// return this.getOpcIntegerValue(item_pressCribX2_line); +// } +// +// public int getPressCribY2_row() { +// return this.getOpcIntegerValue(item_pressCribY2_row); +// } +// +// public int getPressCribA2_angle() { +// return this.getOpcIntegerValue(item_pressCribA2_angle); +// } +// +// public int getPressCribX3_line() { +// return this.getOpcIntegerValue(item_pressCribX3_line); +// } +// +// public int getPressCribY3_row() { +// return this.getOpcIntegerValue(item_pressCribY3_row); +// } +// +// public int getPressCribA3_angle() { +// return this.getOpcIntegerValue(item_pressCribA3_angle); +// } +// +// public int getZoffset() { +// return this.getOpcIntegerValue(item_Zoffset); +// } +// +// public int getPallet_layerQty() { +// return this.getOpcIntegerValue(item_pallet_layerQty); +// } +// +// public int getPressCrib_layerQty() { +// return this.getOpcIntegerValue(item_pressCrib_layerQty); +// } +// +// public int getCodeLayerX1_interval() { +// return this.getOpcIntegerValue(item_codeLayerX1_interval); +// } +// +// public int getCodeLayerY1_interval() { +// return this.getOpcIntegerValue(item_codeLayerY1_interval); +// } +// +// public int getCodeLayerX2_interval() { +// return this.getOpcIntegerValue(item_codeLayerX2_interval); +// } +// +// public int getCodeLayerY2_interval() { +// return this.getOpcIntegerValue(item_codeLayerY2_interval); +// } +// +// public int getCodeLayerX3_interval() { +// return this.getOpcIntegerValue(item_codeLayerX3_interval); +// } +// +// public int getcodeLayerY3_interval() { +// return this.getOpcIntegerValue(item_codeLayerY3_interval); +// } +// +// public int getCodeLayerX1_offset() { +// return this.getOpcIntegerValue(item_codeLayerX1_offset); +// } +// +// public int getCodeLayerY1_offset() { +// return this.getOpcIntegerValue(item_codeLayerY1_offset); +// } +// +// public int getCodeLayerX2_offset() { +// return this.getOpcIntegerValue(item_codeLayerX2_offset); +// } +// +// public int getCodeLayerY2_offset() { +// return this.getOpcIntegerValue(item_codeLayerY2_offset); +// } +// +// public int getCodeLayerX3_offset() { +// return this.getOpcIntegerValue(item_codeLayerX3_offset); +// } +// +// public int getCodeLayerY3_offset() { +// return this.getOpcIntegerValue(item_codeLayerY3_offset); +// } +// +// public int getPressLayerX1_interval() { +// return this.getOpcIntegerValue(item_pressLayerX1_interval); +// } +// +// public int getPressLayerY1_interval() { +// return this.getOpcIntegerValue(item_pressLayerY1_interval); +// } +// +// public int getPressLayerX2_interval() { +// return this.getOpcIntegerValue(item_pressLayerX2_interval); +// } +// +// public int getPressLayerY2_interval() { +// return this.getOpcIntegerValue(item_pressLayerY2_interval); +// } +// +// public int getPressLayerX3_interval() { +// return this.getOpcIntegerValue(item_pressLayerX3_interval); +// } +// +// public int getPressLayerY3_interval() { +// return this.getOpcIntegerValue(item_pressLayerY3_interval); +// } +// +// public int getPressLayerX1_offset() { +// return this.getOpcIntegerValue(item_pressLayerX1_offset); +// } +// +// public int getPressLayerY1_offset() { +// return this.getOpcIntegerValue(item_pressLayerY1_offset); +// } +// +// public int getPressLayerX2_offset() { +// return this.getOpcIntegerValue(item_pressLayerX2_offset); +// } +// +// public int getPressLayerY2_offset() { +// return this.getOpcIntegerValue(item_pressLayerY2_offset); +// } +// +// public int getPressLayerX3_offset() { +// return this.getOpcIntegerValue(item_pressLayerX3_offset); +// } +// +// public int getPressLayerY3_offset() { +// return this.getOpcIntegerValue(item_pressLayerY3_offset); +// } +// +// public int getTool_coordinate() { +// return this.getOpcIntegerValue(item_tool_coordinate); +// } public int getEncoder_qty() { return this.getOpcIntegerValue(item_encoder_qty); @@ -425,221 +425,221 @@ public class ItemProtocol { return this.getOpcIntegerValue(item_to_task); } - public int getTo_Product_code() { - return this.getOpcIntegerValue(item_to_product_code); - } - - public int getToAlongSide() { - return this.getOpcIntegerValue(item_to_AlongSide); - } - - public int getToBshortSide() { - return this.getOpcIntegerValue(item_to_BshortSide); - } - - public int getToHtrapezoidal() { - return this.getOpcIntegerValue(item_to_Htrapezoidal); - } - - public int getToWthickness() { - return this.getOpcIntegerValue(item_to_Wthickness); - } - - public int getToTray_qty() { - return this.getOpcIntegerValue(item_to_tray_qty); - } - - public int getToTray_high() { - return this.getOpcIntegerValue(item_to_tray_high); - } - - public int getToCrib_category() { - return this.getOpcIntegerValue(item_to_crib_category); - } - - public int getToPalletX1_line() { - return this.getOpcIntegerValue(item_to_palletX1_line); - } - - public int getToPalletY1_row() { - return this.getOpcIntegerValue(item_to_palletY1_row); - } - - public int getToPalletA1_angle() { - return this.getOpcIntegerValue(item_to_palletA1_angle); - } - - public int getToPalletX2_line() { - return this.getOpcIntegerValue(item_to_palletX2_line); - } - - public int getToPalletY2_row() { - return this.getOpcIntegerValue(item_to_palletY2_row); - } - - public int getToPalletA2_angle() { - return this.getOpcIntegerValue(item_to_palletA2_angle); - } - - public int getToPalletX3_line() { - return this.getOpcIntegerValue(item_to_palletX3_line); - } - - public int getToPalletY3_row() { - return this.getOpcIntegerValue(item_to_palletY3_row); - } - - public int getToPalletA3_angle() { - return this.getOpcIntegerValue(item_to_palletA3_angle); - } - - public int getToPressCribX1_line() { - return this.getOpcIntegerValue(item_to_pressCribX1_line); - } - - public int getToPressCribY1_row() { - return this.getOpcIntegerValue(item_to_pressCribY1_row); - } - - public int getToPressCribA1_angle() { - return this.getOpcIntegerValue(item_to_pressCribA1_angle); - } - - public int getToPressCribX2_line() { - return this.getOpcIntegerValue(item_to_pressCribX2_line); - } - - public int getToPressCribY2_row() { - return this.getOpcIntegerValue(item_to_pressCribY2_row); - } - - public int getToPressCribA2_angle() { - return this.getOpcIntegerValue(item_to_pressCribA2_angle); - } - - public int getToPressCribX3_line() { - return this.getOpcIntegerValue(item_to_pressCribX3_line); - } - - public int getToPressCribY3_row() { - return this.getOpcIntegerValue(item_to_pressCribY3_row); - } - - public int getToPressCribA3_angle() { - return this.getOpcIntegerValue(item_to_pressCribA3_angle); - } - - public int getToZoffset() { - return this.getOpcIntegerValue(item_to_Zoffset); - } - - public int getToPallet_layerQty() { - return this.getOpcIntegerValue(item_to_pallet_layerQty); - } - - public int getToPressCrib_layerQty() { - return this.getOpcIntegerValue(item_to_pressCrib_layerQty); - } - - public int getToCodeLayerX1_interval() { - return this.getOpcIntegerValue(item_to_codeLayerX1_interval); - } - - public int getToCodeLayerY1_interval() { - return this.getOpcIntegerValue(item_to_codeLayerY1_interval); - } - - public int getToCodeLayerX2_interval() { - return this.getOpcIntegerValue(item_to_codeLayerX2_interval); - } - - public int getToCodeLayerY2_interval() { - return this.getOpcIntegerValue(item_to_codeLayerY2_interval); - } - - public int getToCodeLayerX3_interval() { - return this.getOpcIntegerValue(item_to_codeLayerX3_interval); - } - - public int getTocodeLayerY3_interval() { - return this.getOpcIntegerValue(item_to_codeLayerY3_interval); - } - - public int getToCodeLayerX1_offset() { - return this.getOpcIntegerValue(item_to_codeLayerX1_offset); - } - - public int getToCodeLayerY1_offset() { - return this.getOpcIntegerValue(item_to_codeLayerY1_offset); - } - - public int getToCodeLayerX2_offset() { - return this.getOpcIntegerValue(item_to_codeLayerX2_offset); - } - - public int getToCodeLayerY2_offset() { - return this.getOpcIntegerValue(item_to_codeLayerY2_offset); - } - - public int getToCodeLayerX3_offset() { - return this.getOpcIntegerValue(item_to_codeLayerX3_offset); - } - - public int getToCodeLayerY3_offset() { - return this.getOpcIntegerValue(item_to_codeLayerY3_offset); - } - - public int getToPressLayerX1_interval() { - return this.getOpcIntegerValue(item_to_pressLayerX1_interval); - } - - public int getToPressLayerY1_interval() { - return this.getOpcIntegerValue(item_to_pressLayerY1_interval); - } - - public int getToPressLayerX2_interval() { - return this.getOpcIntegerValue(item_to_pressLayerX2_interval); - } - - public int getToPressLayerY2_interval() { - return this.getOpcIntegerValue(item_to_pressLayerY2_interval); - } - - public int getToPressLayerX3_interval() { - return this.getOpcIntegerValue(item_to_pressLayerX3_interval); - } - - public int getToPressLayerY3_interval() { - return this.getOpcIntegerValue(item_to_pressLayerY3_interval); - } - - public int getToPressLayerX1_offset() { - return this.getOpcIntegerValue(item_to_pressLayerX1_offset); - } - - public int getToPressLayerY1_offset() { - return this.getOpcIntegerValue(item_to_pressLayerY1_offset); - } - - public int getToPressLayerX2_offset() { - return this.getOpcIntegerValue(item_to_pressLayerX2_offset); - } - - public int getToPressLayerY2_offset() { - return this.getOpcIntegerValue(item_to_pressLayerY2_offset); - } - - public int getToPressLayerX3_offset() { - return this.getOpcIntegerValue(item_to_pressLayerX3_offset); - } - - public int getToPressLayerY3_offset() { - return this.getOpcIntegerValue(item_to_pressLayerY3_offset); - } - - public int getToTool_coordinate() { - return this.getOpcIntegerValue(item_to_tool_coordinate); - } +// public int getTo_Product_code() { +// return this.getOpcIntegerValue(item_to_product_code); +// } +// +// public int getToAlongSide() { +// return this.getOpcIntegerValue(item_to_AlongSide); +// } +// +// public int getToBshortSide() { +// return this.getOpcIntegerValue(item_to_BshortSide); +// } +// +// public int getToHtrapezoidal() { +// return this.getOpcIntegerValue(item_to_Htrapezoidal); +// } +// +// public int getToWthickness() { +// return this.getOpcIntegerValue(item_to_Wthickness); +// } +// +// public int getToTray_qty() { +// return this.getOpcIntegerValue(item_to_tray_qty); +// } +// +// public int getToTray_high() { +// return this.getOpcIntegerValue(item_to_tray_high); +// } +// +// public int getToCrib_category() { +// return this.getOpcIntegerValue(item_to_crib_category); +// } +// +// public int getToPalletX1_line() { +// return this.getOpcIntegerValue(item_to_palletX1_line); +// } +// +// public int getToPalletY1_row() { +// return this.getOpcIntegerValue(item_to_palletY1_row); +// } +// +// public int getToPalletA1_angle() { +// return this.getOpcIntegerValue(item_to_palletA1_angle); +// } +// +// public int getToPalletX2_line() { +// return this.getOpcIntegerValue(item_to_palletX2_line); +// } +// +// public int getToPalletY2_row() { +// return this.getOpcIntegerValue(item_to_palletY2_row); +// } +// +// public int getToPalletA2_angle() { +// return this.getOpcIntegerValue(item_to_palletA2_angle); +// } +// +// public int getToPalletX3_line() { +// return this.getOpcIntegerValue(item_to_palletX3_line); +// } +// +// public int getToPalletY3_row() { +// return this.getOpcIntegerValue(item_to_palletY3_row); +// } +// +// public int getToPalletA3_angle() { +// return this.getOpcIntegerValue(item_to_palletA3_angle); +// } +// +// public int getToPressCribX1_line() { +// return this.getOpcIntegerValue(item_to_pressCribX1_line); +// } +// +// public int getToPressCribY1_row() { +// return this.getOpcIntegerValue(item_to_pressCribY1_row); +// } +// +// public int getToPressCribA1_angle() { +// return this.getOpcIntegerValue(item_to_pressCribA1_angle); +// } +// +// public int getToPressCribX2_line() { +// return this.getOpcIntegerValue(item_to_pressCribX2_line); +// } +// +// public int getToPressCribY2_row() { +// return this.getOpcIntegerValue(item_to_pressCribY2_row); +// } +// +// public int getToPressCribA2_angle() { +// return this.getOpcIntegerValue(item_to_pressCribA2_angle); +// } +// +// public int getToPressCribX3_line() { +// return this.getOpcIntegerValue(item_to_pressCribX3_line); +// } +// +// public int getToPressCribY3_row() { +// return this.getOpcIntegerValue(item_to_pressCribY3_row); +// } +// +// public int getToPressCribA3_angle() { +// return this.getOpcIntegerValue(item_to_pressCribA3_angle); +// } +// +// public int getToZoffset() { +// return this.getOpcIntegerValue(item_to_Zoffset); +// } +// +// public int getToPallet_layerQty() { +// return this.getOpcIntegerValue(item_to_pallet_layerQty); +// } +// +// public int getToPressCrib_layerQty() { +// return this.getOpcIntegerValue(item_to_pressCrib_layerQty); +// } +// +// public int getToCodeLayerX1_interval() { +// return this.getOpcIntegerValue(item_to_codeLayerX1_interval); +// } +// +// public int getToCodeLayerY1_interval() { +// return this.getOpcIntegerValue(item_to_codeLayerY1_interval); +// } +// +// public int getToCodeLayerX2_interval() { +// return this.getOpcIntegerValue(item_to_codeLayerX2_interval); +// } +// +// public int getToCodeLayerY2_interval() { +// return this.getOpcIntegerValue(item_to_codeLayerY2_interval); +// } +// +// public int getToCodeLayerX3_interval() { +// return this.getOpcIntegerValue(item_to_codeLayerX3_interval); +// } +// +// public int getTocodeLayerY3_interval() { +// return this.getOpcIntegerValue(item_to_codeLayerY3_interval); +// } +// +// public int getToCodeLayerX1_offset() { +// return this.getOpcIntegerValue(item_to_codeLayerX1_offset); +// } +// +// public int getToCodeLayerY1_offset() { +// return this.getOpcIntegerValue(item_to_codeLayerY1_offset); +// } +// +// public int getToCodeLayerX2_offset() { +// return this.getOpcIntegerValue(item_to_codeLayerX2_offset); +// } +// +// public int getToCodeLayerY2_offset() { +// return this.getOpcIntegerValue(item_to_codeLayerY2_offset); +// } +// +// public int getToCodeLayerX3_offset() { +// return this.getOpcIntegerValue(item_to_codeLayerX3_offset); +// } +// +// public int getToCodeLayerY3_offset() { +// return this.getOpcIntegerValue(item_to_codeLayerY3_offset); +// } +// +// public int getToPressLayerX1_interval() { +// return this.getOpcIntegerValue(item_to_pressLayerX1_interval); +// } +// +// public int getToPressLayerY1_interval() { +// return this.getOpcIntegerValue(item_to_pressLayerY1_interval); +// } +// +// public int getToPressLayerX2_interval() { +// return this.getOpcIntegerValue(item_to_pressLayerX2_interval); +// } +// +// public int getToPressLayerY2_interval() { +// return this.getOpcIntegerValue(item_to_pressLayerY2_interval); +// } +// +// public int getToPressLayerX3_interval() { +// return this.getOpcIntegerValue(item_to_pressLayerX3_interval); +// } +// +// public int getToPressLayerY3_interval() { +// return this.getOpcIntegerValue(item_to_pressLayerY3_interval); +// } +// +// public int getToPressLayerX1_offset() { +// return this.getOpcIntegerValue(item_to_pressLayerX1_offset); +// } +// +// public int getToPressLayerY1_offset() { +// return this.getOpcIntegerValue(item_to_pressLayerY1_offset); +// } +// +// public int getToPressLayerX2_offset() { +// return this.getOpcIntegerValue(item_to_pressLayerX2_offset); +// } +// +// public int getToPressLayerY2_offset() { +// return this.getOpcIntegerValue(item_to_pressLayerY2_offset); +// } +// +// public int getToPressLayerX3_offset() { +// return this.getOpcIntegerValue(item_to_pressLayerX3_offset); +// } +// +// public int getToPressLayerY3_offset() { +// return this.getOpcIntegerValue(item_to_pressLayerY3_offset); +// } +// +// public int getToTool_coordinate() { +// return this.getOpcIntegerValue(item_to_tool_coordinate); +// } //是否有货 public int hasGoods(int move) { @@ -669,134 +669,134 @@ public class ItemProtocol { public static List getReadableItemDtos() { ArrayList list = new ArrayList(); - list.add(new ItemDto(item_heartbeat, "心跳", "DB112.B0")); - list.add(new ItemDto(item_mode, "工作模式", "DB112.B1", Boolean.valueOf(true))); - list.add(new ItemDto(item_move, "光电开关信号", "DB112.B2")); - list.add(new ItemDto(item_action, "取放信号", "DB112.B3")); - list.add(new ItemDto(item_ioaction, "进出信号", "DB112.B4")); - list.add(new ItemDto(item_error, "报警信号", "DB112.B5")); - list.add(new ItemDto(item_task, "任务号", "DB112.D6")); - list.add(new ItemDto(item_weight, "重量", "DB112.D10")); - list.add(new ItemDto(item_material, "物料", "DB112.STRING14.50")); - list.add(new ItemDto(item_barcode, "条码", "DB112.W66")); - list.add(new ItemDto(item_encoder_qty, "码盘位当前码盘数量", "DB112.W68")); - list.add(new ItemDto(item_unqualified_qty, "不合格数量", "DB112.W70")); - list.add(new ItemDto(item_product_code, "产品编号", "DB112.B72")); - list.add(new ItemDto(item_AlongSide, "A长边", "DB112.W74")); - list.add(new ItemDto(item_BshortSide, "B短边", "DB112.W76")); - list.add(new ItemDto(item_Htrapezoidal, "H梯形高", "DB112.W78")); - list.add(new ItemDto(item_Wthickness, "W厚度", "DB112.W80")); - list.add(new ItemDto(item_tray_qty, "当前垛盘数", "DB112.W82")); - list.add(new ItemDto(item_tray_high, "垛盘高度", "DB112.W84")); - list.add(new ItemDto(item_crib_category, "垛型类别", "DB112.W86")); - list.add(new ItemDto(item_palletX1_line, "码垛X1行", "DB112.W88")); - list.add(new ItemDto(item_palletY1_row, "码垛Y1列", "DB112.W90")); - list.add(new ItemDto(item_palletA1_angle, "码垛A1角度", "DB112.W92")); - list.add(new ItemDto(item_palletX2_line, "码垛X2行", "DB112.W94")); - list.add(new ItemDto(item_palletY2_row, "码垛Y2列", "DB112.W96")); - list.add(new ItemDto(item_palletA2_angle, "码垛A2角度", "DB112.W98")); - list.add(new ItemDto(item_palletX3_line, "码垛X3行", "DB112.W100")); - list.add(new ItemDto(item_palletY3_row, "码垛Y3列", "DB112.W102")); - list.add(new ItemDto(item_palletA3_angle, "码垛A3角度", "DB112.W104")); - list.add(new ItemDto(item_pressCribX1_line, "压垛X1行", "DB112.W106")); - list.add(new ItemDto(item_pressCribY1_row, "压垛Y1列", "DB112.W108")); - list.add(new ItemDto(item_pressCribA1_angle, "压垛A1角度", "DB112.W110")); - list.add(new ItemDto(item_pressCribX2_line, "压垛X2行", "DB112.W112")); - list.add(new ItemDto(item_pressCribY2_row, "压垛Y2列", "DB112.W114")); - list.add(new ItemDto(item_pressCribA2_angle, "压垛A2角度", "DB112.W116")); - list.add(new ItemDto(item_pressCribX3_line, "压垛X3行", "DB112.W118")); - list.add(new ItemDto(item_pressCribY3_row, "压垛Y3列", "DB112.W120")); - list.add(new ItemDto(item_pressCribA3_angle, "压垛A3角度", "DB112.W122")); - list.add(new ItemDto(item_Zoffset, "Z轴偏移", "DB112.W124")); - list.add(new ItemDto(item_pallet_layerQty, "码垛层数", "DB112.W126")); - list.add(new ItemDto(item_pressCrib_layerQty, "压垛层数", "DB112.W128")); - list.add(new ItemDto(item_codeLayerX1_interval, "码层X1间隔", "DB112.W130")); - list.add(new ItemDto(item_codeLayerY1_interval, "码层Y1间隔", "DB112.W132")); - list.add(new ItemDto(item_codeLayerX2_interval, "码层X2间隔", "DB112.W134")); - list.add(new ItemDto(item_codeLayerY2_interval, "码层Y2间隔", "DB112.W136")); - list.add(new ItemDto(item_codeLayerX3_interval, "码层X3间隔", "DB112.W138")); - list.add(new ItemDto(item_codeLayerY3_interval, "码层Y3间隔", "DB112.W140")); - list.add(new ItemDto(item_codeLayerX1_offset, "码层X1偏移", "DB112.W142")); - list.add(new ItemDto(item_codeLayerY1_offset, "码层Y1偏移", "DB112.W144")); - list.add(new ItemDto(item_codeLayerX2_offset, "码层X2偏移", "DB112.W146")); - list.add(new ItemDto(item_codeLayerY2_offset, "码层Y2偏移", "DB112.W148")); - list.add(new ItemDto(item_codeLayerX3_offset, "码层X3偏移", "DB112.W150")); - list.add(new ItemDto(item_codeLayerY3_offset, "码层Y3偏移", "DB112.W152")); - list.add(new ItemDto(item_pressLayerX1_interval, "压层X1间隔", "DB112.W154")); - list.add(new ItemDto(item_pressLayerY1_interval, "压层Y1间隔", "DB112.W156")); - list.add(new ItemDto(item_pressLayerX2_interval, "压层X2间隔", "DB112.W158")); - list.add(new ItemDto(item_pressLayerY2_interval, "压层Y2间隔", "DB112.W160")); - list.add(new ItemDto(item_pressLayerX3_interval, "压层X3间隔", "DB112.W162")); - list.add(new ItemDto(item_pressLayerY3_interval, "压层Y3间隔", "DB112.W164")); - list.add(new ItemDto(item_pressLayerX1_offset, "压层X1偏移", "DB112.W166")); - list.add(new ItemDto(item_pressLayerY1_offset, "压层Y1偏移", "DB112.W168")); - list.add(new ItemDto(item_pressLayerX2_offset, "压层X2偏移", "DB112.W170")); - list.add(new ItemDto(item_pressLayerY2_offset, "压层Y2偏移", "DB112.W172")); - list.add(new ItemDto(item_pressLayerX3_offset, "压层X3偏移", "DB112.W174")); - list.add(new ItemDto(item_pressLayerY3_offset, "压层Y3偏移", "DB112.W176")); - list.add(new ItemDto(item_tool_coordinate, "工具坐标", "DB112.W178")); + list.add(new ItemDto(item_heartbeat, "心跳", "DB404.B0")); + list.add(new ItemDto(item_mode, "工作模式", "DB404.B1", Boolean.valueOf(true))); + list.add(new ItemDto(item_move, "光电开关信号", "DB404.B2")); + list.add(new ItemDto(item_action, "取放信号", "DB404.B3")); + list.add(new ItemDto(item_io_action, "进出信号", "DB404.B4")); + list.add(new ItemDto(item_error, "报警信号", "DB404.B5")); + list.add(new ItemDto(item_task, "任务号", "DB404.D6")); + list.add(new ItemDto(item_weight, "重量", "DB404.D10")); + list.add(new ItemDto(item_material, "物料", "DB404.STRING14.50")); + list.add(new ItemDto(item_barcode, "条码", "DB404.W66")); + list.add(new ItemDto(item_encoder_qty, "码盘位当前码盘数量", "DB404.W68")); + list.add(new ItemDto(item_unqualified_qty, "不合格数量", "DB404.W70")); +// list.add(new ItemDto(item_product_code, "产品编号", "DB112.B72")); +// list.add(new ItemDto(item_AlongSide, "A长边", "DB112.W74")); +// list.add(new ItemDto(item_BshortSide, "B短边", "DB112.W76")); +// list.add(new ItemDto(item_Htrapezoidal, "H梯形高", "DB112.W78")); +// list.add(new ItemDto(item_Wthickness, "W厚度", "DB112.W80")); +// list.add(new ItemDto(item_tray_qty, "当前垛盘数", "DB112.W82")); +// list.add(new ItemDto(item_tray_high, "垛盘高度", "DB112.W84")); +// list.add(new ItemDto(item_crib_category, "垛型类别", "DB112.W86")); +// list.add(new ItemDto(item_palletX1_line, "码垛X1行", "DB112.W88")); +// list.add(new ItemDto(item_palletY1_row, "码垛Y1列", "DB112.W90")); +// list.add(new ItemDto(item_palletA1_angle, "码垛A1角度", "DB112.W92")); +// list.add(new ItemDto(item_palletX2_line, "码垛X2行", "DB112.W94")); +// list.add(new ItemDto(item_palletY2_row, "码垛Y2列", "DB112.W96")); +// list.add(new ItemDto(item_palletA2_angle, "码垛A2角度", "DB112.W98")); +// list.add(new ItemDto(item_palletX3_line, "码垛X3行", "DB112.W100")); +// list.add(new ItemDto(item_palletY3_row, "码垛Y3列", "DB112.W102")); +// list.add(new ItemDto(item_palletA3_angle, "码垛A3角度", "DB112.W104")); +// list.add(new ItemDto(item_pressCribX1_line, "压垛X1行", "DB112.W106")); +// list.add(new ItemDto(item_pressCribY1_row, "压垛Y1列", "DB112.W108")); +// list.add(new ItemDto(item_pressCribA1_angle, "压垛A1角度", "DB112.W110")); +// list.add(new ItemDto(item_pressCribX2_line, "压垛X2行", "DB112.W112")); +// list.add(new ItemDto(item_pressCribY2_row, "压垛Y2列", "DB112.W114")); +// list.add(new ItemDto(item_pressCribA2_angle, "压垛A2角度", "DB112.W116")); +// list.add(new ItemDto(item_pressCribX3_line, "压垛X3行", "DB112.W118")); +// list.add(new ItemDto(item_pressCribY3_row, "压垛Y3列", "DB112.W120")); +// list.add(new ItemDto(item_pressCribA3_angle, "压垛A3角度", "DB112.W122")); +// list.add(new ItemDto(item_Zoffset, "Z轴偏移", "DB112.W124")); +// list.add(new ItemDto(item_pallet_layerQty, "码垛层数", "DB112.W126")); +// list.add(new ItemDto(item_pressCrib_layerQty, "压垛层数", "DB112.W128")); +// list.add(new ItemDto(item_codeLayerX1_interval, "码层X1间隔", "DB112.W130")); +// list.add(new ItemDto(item_codeLayerY1_interval, "码层Y1间隔", "DB112.W132")); +// list.add(new ItemDto(item_codeLayerX2_interval, "码层X2间隔", "DB112.W134")); +// list.add(new ItemDto(item_codeLayerY2_interval, "码层Y2间隔", "DB112.W136")); +// list.add(new ItemDto(item_codeLayerX3_interval, "码层X3间隔", "DB112.W138")); +// list.add(new ItemDto(item_codeLayerY3_interval, "码层Y3间隔", "DB112.W140")); +// list.add(new ItemDto(item_codeLayerX1_offset, "码层X1偏移", "DB112.W142")); +// list.add(new ItemDto(item_codeLayerY1_offset, "码层Y1偏移", "DB112.W144")); +// list.add(new ItemDto(item_codeLayerX2_offset, "码层X2偏移", "DB112.W146")); +// list.add(new ItemDto(item_codeLayerY2_offset, "码层Y2偏移", "DB112.W148")); +// list.add(new ItemDto(item_codeLayerX3_offset, "码层X3偏移", "DB112.W150")); +// list.add(new ItemDto(item_codeLayerY3_offset, "码层Y3偏移", "DB112.W152")); +// list.add(new ItemDto(item_pressLayerX1_interval, "压层X1间隔", "DB112.W154")); +// list.add(new ItemDto(item_pressLayerY1_interval, "压层Y1间隔", "DB112.W156")); +// list.add(new ItemDto(item_pressLayerX2_interval, "压层X2间隔", "DB112.W158")); +// list.add(new ItemDto(item_pressLayerY2_interval, "压层Y2间隔", "DB112.W160")); +// list.add(new ItemDto(item_pressLayerX3_interval, "压层X3间隔", "DB112.W162")); +// list.add(new ItemDto(item_pressLayerY3_interval, "压层Y3间隔", "DB112.W164")); +// list.add(new ItemDto(item_pressLayerX1_offset, "压层X1偏移", "DB112.W166")); +// list.add(new ItemDto(item_pressLayerY1_offset, "压层Y1偏移", "DB112.W168")); +// list.add(new ItemDto(item_pressLayerX2_offset, "压层X2偏移", "DB112.W170")); +// list.add(new ItemDto(item_pressLayerY2_offset, "压层Y2偏移", "DB112.W172")); +// list.add(new ItemDto(item_pressLayerX3_offset, "压层X3偏移", "DB112.W174")); +// list.add(new ItemDto(item_pressLayerY3_offset, "压层Y3偏移", "DB112.W176")); +// list.add(new ItemDto(item_tool_coordinate, "工具坐标", "DB112.W178")); return list; } public static List getWriteableItemDtos() { ArrayList list = new ArrayList(); - list.add(new ItemDto(item_to_command, "作业命令", "DB113.W0", Boolean.valueOf(true))); - list.add(new ItemDto(item_to_target, "目标站", "DB113.W2")); - list.add(new ItemDto(item_to_task, "任务号", "DB113.D4")); - list.add(new ItemDto(item_to_product_code, "产品编号", "DB113.B8")); - list.add(new ItemDto(item_to_AlongSide, "A长边", "DB113.W10")); - list.add(new ItemDto(item_to_BshortSide, "B短边", "DB113.W12")); - list.add(new ItemDto(item_to_Htrapezoidal, "H梯形高", "DB113.W14")); - list.add(new ItemDto(item_to_Wthickness, "W厚度", "DB113.W16")); - list.add(new ItemDto(item_to_tray_qty, "当前垛盘数", "DB113.W18")); - list.add(new ItemDto(item_to_tray_high, "垛盘高度", "DB113.W20")); - list.add(new ItemDto(item_to_crib_category, "垛型类别", "DB113.W22")); - list.add(new ItemDto(item_to_palletX1_line, "码垛X1行", "DB113.W24")); - list.add(new ItemDto(item_to_palletY1_row, "码垛Y1列", "DB113.W26")); - list.add(new ItemDto(item_to_palletA1_angle, "码垛A1角度", "DB113.W28")); - list.add(new ItemDto(item_to_palletX2_line, "码垛X2行", "DB113.W30")); - list.add(new ItemDto(item_to_palletY2_row, "码垛Y2列", "DB113.W32")); - list.add(new ItemDto(item_to_palletA2_angle, "码垛A2角度", "DB113.W34")); - list.add(new ItemDto(item_to_palletX3_line, "码垛X3行", "DB113.W36")); - list.add(new ItemDto(item_to_palletY3_row, "码垛Y3列", "DB113.W38")); - list.add(new ItemDto(item_to_palletA3_angle, "码垛A3角度", "DB113.W40")); - list.add(new ItemDto(item_to_pressCribX1_line, "压垛X1行", "DB113.W42")); - list.add(new ItemDto(item_to_pressCribY1_row, "压垛Y1列", "DB113.W44")); - list.add(new ItemDto(item_to_pressCribA1_angle, "压垛A1角度", "DB113.W46")); - list.add(new ItemDto(item_to_pressCribX2_line, "压垛X2行", "DB113.W48")); - list.add(new ItemDto(item_to_pressCribY2_row, "压垛Y2列", "DB113.W50")); - list.add(new ItemDto(item_to_pressCribA2_angle, "压垛A2角度", "DB113.W52")); - list.add(new ItemDto(item_to_pressCribX3_line, "压垛X3行", "DB113.W54")); - list.add(new ItemDto(item_to_pressCribY3_row, "压垛Y3列", "DB113.W56")); - list.add(new ItemDto(item_to_pressCribA3_angle, "压垛A3角度", "DB113.W58")); - list.add(new ItemDto(item_to_Zoffset, "Z轴偏移", "DB113.W60")); - list.add(new ItemDto(item_to_pallet_layerQty, "码垛层数", "DB113.W62")); - list.add(new ItemDto(item_to_pressCrib_layerQty, "压垛层数", "DB113.W64")); - list.add(new ItemDto(item_to_codeLayerX1_interval, "码层X1间隔", "DB113.W66")); - list.add(new ItemDto(item_to_codeLayerY1_interval, "码层Y1间隔", "DB113.W68")); - list.add(new ItemDto(item_to_codeLayerX2_interval, "码层X2间隔", "DB113.W70")); - list.add(new ItemDto(item_to_codeLayerY2_interval, "码层Y2间隔", "DB113.W72")); - list.add(new ItemDto(item_to_codeLayerX3_interval, "码层X3间隔", "DB113.W74")); - list.add(new ItemDto(item_to_codeLayerY3_interval, "码层Y3间隔", "DB113.W76")); - list.add(new ItemDto(item_to_codeLayerX1_offset, "码层X1偏移", "DB113.W78")); - list.add(new ItemDto(item_to_codeLayerY1_offset, "码层Y1偏移", "DB113.W80")); - list.add(new ItemDto(item_to_codeLayerX2_offset, "码层X2偏移", "DB113.W82")); - list.add(new ItemDto(item_to_codeLayerY2_offset, "码层Y2偏移", "DB113.W84")); - list.add(new ItemDto(item_to_codeLayerX3_offset, "码层X3偏移", "DB113.W86")); - list.add(new ItemDto(item_to_codeLayerY3_offset, "码层Y3偏移", "DB113.W88")); - list.add(new ItemDto(item_to_pressLayerX1_interval, "压层X1间隔", "DB113.W90")); - list.add(new ItemDto(item_to_pressLayerY1_interval, "压层Y1间隔", "DB113.W92")); - list.add(new ItemDto(item_to_pressLayerX2_interval, "压层X2间隔", "DB113.W94")); - list.add(new ItemDto(item_to_pressLayerY2_interval, "压层Y2间隔", "DB113.W96")); - list.add(new ItemDto(item_to_pressLayerX3_interval, "压层X3间隔", "DB113.W98")); - list.add(new ItemDto(item_to_pressLayerY3_interval, "压层Y3间隔", "DB113.W100")); - list.add(new ItemDto(item_to_pressLayerX1_offset, "压层X1偏移", "DB113.W102")); - list.add(new ItemDto(item_to_pressLayerY1_offset, "压层Y1偏移", "DB113.W104")); - list.add(new ItemDto(item_to_pressLayerX2_offset, "压层X2偏移", "DB113.W106")); - list.add(new ItemDto(item_to_pressLayerY2_offset, "压层Y2偏移", "DB113.W108")); - list.add(new ItemDto(item_to_pressLayerX3_offset, "压层X3偏移", "DB113.W110")); - list.add(new ItemDto(item_to_pressLayerY3_offset, "压层Y3偏移", "DB113.W112")); - list.add(new ItemDto(item_to_tool_coordinate, "工具坐标", "DB113.W114")); + list.add(new ItemDto(item_to_command, "作业命令", "DB404.W180", Boolean.valueOf(true))); + list.add(new ItemDto(item_to_target, "目标站", "DB404.W182")); + list.add(new ItemDto(item_to_task, "任务号", "DB404.D184")); +// list.add(new ItemDto(item_to_product_code, "产品编号", "DB113.B8")); +// list.add(new ItemDto(item_to_AlongSide, "A长边", "DB113.W10")); +// list.add(new ItemDto(item_to_BshortSide, "B短边", "DB113.W12")); +// list.add(new ItemDto(item_to_Htrapezoidal, "H梯形高", "DB113.W14")); +// list.add(new ItemDto(item_to_Wthickness, "W厚度", "DB113.W16")); +// list.add(new ItemDto(item_to_tray_qty, "当前垛盘数", "DB113.W18")); +// list.add(new ItemDto(item_to_tray_high, "垛盘高度", "DB113.W20")); +// list.add(new ItemDto(item_to_crib_category, "垛型类别", "DB113.W22")); +// list.add(new ItemDto(item_to_palletX1_line, "码垛X1行", "DB113.W24")); +// list.add(new ItemDto(item_to_palletY1_row, "码垛Y1列", "DB113.W26")); +// list.add(new ItemDto(item_to_palletA1_angle, "码垛A1角度", "DB113.W28")); +// list.add(new ItemDto(item_to_palletX2_line, "码垛X2行", "DB113.W30")); +// list.add(new ItemDto(item_to_palletY2_row, "码垛Y2列", "DB113.W32")); +// list.add(new ItemDto(item_to_palletA2_angle, "码垛A2角度", "DB113.W34")); +// list.add(new ItemDto(item_to_palletX3_line, "码垛X3行", "DB113.W36")); +// list.add(new ItemDto(item_to_palletY3_row, "码垛Y3列", "DB113.W38")); +// list.add(new ItemDto(item_to_palletA3_angle, "码垛A3角度", "DB113.W40")); +// list.add(new ItemDto(item_to_pressCribX1_line, "压垛X1行", "DB113.W42")); +// list.add(new ItemDto(item_to_pressCribY1_row, "压垛Y1列", "DB113.W44")); +// list.add(new ItemDto(item_to_pressCribA1_angle, "压垛A1角度", "DB113.W46")); +// list.add(new ItemDto(item_to_pressCribX2_line, "压垛X2行", "DB113.W48")); +// list.add(new ItemDto(item_to_pressCribY2_row, "压垛Y2列", "DB113.W50")); +// list.add(new ItemDto(item_to_pressCribA2_angle, "压垛A2角度", "DB113.W52")); +// list.add(new ItemDto(item_to_pressCribX3_line, "压垛X3行", "DB113.W54")); +// list.add(new ItemDto(item_to_pressCribY3_row, "压垛Y3列", "DB113.W56")); +// list.add(new ItemDto(item_to_pressCribA3_angle, "压垛A3角度", "DB113.W58")); +// list.add(new ItemDto(item_to_Zoffset, "Z轴偏移", "DB113.W60")); +// list.add(new ItemDto(item_to_pallet_layerQty, "码垛层数", "DB113.W62")); +// list.add(new ItemDto(item_to_pressCrib_layerQty, "压垛层数", "DB113.W64")); +// list.add(new ItemDto(item_to_codeLayerX1_interval, "码层X1间隔", "DB113.W66")); +// list.add(new ItemDto(item_to_codeLayerY1_interval, "码层Y1间隔", "DB113.W68")); +// list.add(new ItemDto(item_to_codeLayerX2_interval, "码层X2间隔", "DB113.W70")); +// list.add(new ItemDto(item_to_codeLayerY2_interval, "码层Y2间隔", "DB113.W72")); +// list.add(new ItemDto(item_to_codeLayerX3_interval, "码层X3间隔", "DB113.W74")); +// list.add(new ItemDto(item_to_codeLayerY3_interval, "码层Y3间隔", "DB113.W76")); +// list.add(new ItemDto(item_to_codeLayerX1_offset, "码层X1偏移", "DB113.W78")); +// list.add(new ItemDto(item_to_codeLayerY1_offset, "码层Y1偏移", "DB113.W80")); +// list.add(new ItemDto(item_to_codeLayerX2_offset, "码层X2偏移", "DB113.W82")); +// list.add(new ItemDto(item_to_codeLayerY2_offset, "码层Y2偏移", "DB113.W84")); +// list.add(new ItemDto(item_to_codeLayerX3_offset, "码层X3偏移", "DB113.W86")); +// list.add(new ItemDto(item_to_codeLayerY3_offset, "码层Y3偏移", "DB113.W88")); +// list.add(new ItemDto(item_to_pressLayerX1_interval, "压层X1间隔", "DB113.W90")); +// list.add(new ItemDto(item_to_pressLayerY1_interval, "压层Y1间隔", "DB113.W92")); +// list.add(new ItemDto(item_to_pressLayerX2_interval, "压层X2间隔", "DB113.W94")); +// list.add(new ItemDto(item_to_pressLayerY2_interval, "压层Y2间隔", "DB113.W96")); +// list.add(new ItemDto(item_to_pressLayerX3_interval, "压层X3间隔", "DB113.W98")); +// list.add(new ItemDto(item_to_pressLayerY3_interval, "压层Y3间隔", "DB113.W100")); +// list.add(new ItemDto(item_to_pressLayerX1_offset, "压层X1偏移", "DB113.W102")); +// list.add(new ItemDto(item_to_pressLayerY1_offset, "压层Y1偏移", "DB113.W104")); +// list.add(new ItemDto(item_to_pressLayerX2_offset, "压层X2偏移", "DB113.W106")); +// list.add(new ItemDto(item_to_pressLayerY2_offset, "压层Y2偏移", "DB113.W108")); +// list.add(new ItemDto(item_to_pressLayerX3_offset, "压层X3偏移", "DB113.W110")); +// list.add(new ItemDto(item_to_pressLayerY3_offset, "压层Y3偏移", "DB113.W112")); +// list.add(new ItemDto(item_to_tool_coordinate, "工具坐标", "DB113.W114")); return list; } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator_site/LnshPalletizingManipulatorSiteDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator_site/LnshPalletizingManipulatorSiteDeviceDriver.java index 8351328..8f4fec4 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator_site/LnshPalletizingManipulatorSiteDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator_site/LnshPalletizingManipulatorSiteDeviceDriver.java @@ -263,68 +263,68 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic weight = this.itemProtocol.getWeight(); material = this.itemProtocol.getMaterial(); barcode = this.itemProtocol.getBarcode(); - AlongSide = this.itemProtocol.getAlongSide(); - BshortSide = this.itemProtocol.getBshortSide(); - Htrapezoidal = this.itemProtocol.getHtrapezoidal(); - Wthickness = this.itemProtocol.getWthickness(); +// AlongSide = this.itemProtocol.getAlongSide(); +// BshortSide = this.itemProtocol.getBshortSide(); +// Htrapezoidal = this.itemProtocol.getHtrapezoidal(); +// Wthickness = this.itemProtocol.getWthickness(); encoder_qty = this.itemProtocol.getEncoder_qty(); unqualified_qty = this.itemProtocol.getUnqualified_qty(); - product_code = this.itemProtocol.getProduct_code(); - AlongSide = this.itemProtocol.getAlongSide(); - BshortSide = this.itemProtocol.getBshortSide(); - Htrapezoidal = this.itemProtocol.getHtrapezoidal(); - Wthickness = this.itemProtocol.getWthickness(); - tray_qty = this.itemProtocol.getTray_qty(); - tray_high = this.itemProtocol.getTray_high(); - crib_category = this.itemProtocol.getCrib_category(); - palletX1_line = this.itemProtocol.getPalletX1_line(); - palletY1_row = this.itemProtocol.getPalletY1_row(); - palletA1_angle = this.itemProtocol.getPalletA1_angle(); - palletX2_line = this.itemProtocol.getPalletX2_line(); - palletY2_row = this.itemProtocol.getPalletY2_row(); - palletA2_angle = this.itemProtocol.getPalletA2_angle(); - palletX3_line = this.itemProtocol.getPalletX3_line(); - palletY3_row = this.itemProtocol.getPalletY3_row(); - palletA3_angle = this.itemProtocol.getPalletA3_angle(); - pressCribX1_line = this.itemProtocol.getPressCribX1_line(); - pressCribY1_row = this.itemProtocol.getPressCribY1_row(); - pressCribA1_angle = this.itemProtocol.getPressCribA1_angle(); - pressCribX2_line = this.itemProtocol.getPressCribX2_line(); - pressCribY2_row = this.itemProtocol.getPressCribY2_row(); - pressCribA2_angle = this.itemProtocol.getPressCribA2_angle(); - pressCribX3_line = this.itemProtocol.getPressCribX3_line(); - pressCribY3_row = this.itemProtocol.getPressCribY3_row(); - pressCribA3_angle = this.itemProtocol.getPressCribA3_angle(); - Zoffset = this.itemProtocol.getZoffset(); - pallet_layerQty = this.itemProtocol.getPallet_layerQty(); - pressCrib_layerQty = this.itemProtocol.getPressCrib_layerQty(); - codeLayerX1_interval = this.itemProtocol.getCodeLayerX1_interval(); - codeLayerY1_interval = this.itemProtocol.getCodeLayerY1_interval(); - codeLayerX2_interval = this.itemProtocol.getCodeLayerX2_interval(); - codeLayerY2_interval = this.itemProtocol.getCodeLayerY2_interval(); - codeLayerX3_interval = this.itemProtocol.getCodeLayerX3_interval(); - codeLayerY3_interval = this.itemProtocol.getcodeLayerY3_interval(); - codeLayerX1_offset = this.itemProtocol.getCodeLayerX1_offset(); - codeLayerY1_offset = this.itemProtocol.getCodeLayerY1_offset(); - codeLayerX2_offset = this.itemProtocol.getCodeLayerX2_offset(); - codeLayerY2_offset = this.itemProtocol.getCodeLayerY2_offset(); - codeLayerX3_offset = this.itemProtocol.getCodeLayerX3_offset(); - codeLayerY3_offset = this.itemProtocol.getCodeLayerY3_offset(); - pressLayerX1_interval = this.itemProtocol.getPressLayerX1_interval(); - pressLayerY1_interval = this.itemProtocol.getPressLayerY1_interval(); - pressLayerX2_interval = this.itemProtocol.getPressLayerX2_interval(); - pressLayerY2_interval = this.itemProtocol.getPressLayerY2_interval(); - pressLayerX3_interval = this.itemProtocol.getPressLayerX3_interval(); - pressLayerY3_interval = this.itemProtocol.getPressLayerY3_interval(); - pressLayerX1_offset = this.itemProtocol.getPressLayerX1_offset(); - pressLayerY1_offset = this.itemProtocol.getPressLayerY1_offset(); - pressLayerX2_offset = this.itemProtocol.getPressLayerX2_offset(); - pressLayerY2_offset = this.itemProtocol.getPressLayerY2_offset(); - pressLayerX3_offset = this.itemProtocol.getPressLayerX3_offset(); - pressLayerY3_offset = this.itemProtocol.getPressLayerY3_offset(); - tool_coordinate = this.itemProtocol.getTool_coordinate(); - tool_coordinate = this.itemProtocol.getTool_coordinate(); +// product_code = this.itemProtocol.getProduct_code(); +// AlongSide = this.itemProtocol.getAlongSide(); +// BshortSide = this.itemProtocol.getBshortSide(); +// Htrapezoidal = this.itemProtocol.getHtrapezoidal(); +// Wthickness = this.itemProtocol.getWthickness(); +// tray_qty = this.itemProtocol.getTray_qty(); +// tray_high = this.itemProtocol.getTray_high(); +// crib_category = this.itemProtocol.getCrib_category(); +// palletX1_line = this.itemProtocol.getPalletX1_line(); +// palletY1_row = this.itemProtocol.getPalletY1_row(); +// palletA1_angle = this.itemProtocol.getPalletA1_angle(); +// palletX2_line = this.itemProtocol.getPalletX2_line(); +// palletY2_row = this.itemProtocol.getPalletY2_row(); +// palletA2_angle = this.itemProtocol.getPalletA2_angle(); +// palletX3_line = this.itemProtocol.getPalletX3_line(); +// palletY3_row = this.itemProtocol.getPalletY3_row(); +// palletA3_angle = this.itemProtocol.getPalletA3_angle(); +// pressCribX1_line = this.itemProtocol.getPressCribX1_line(); +// pressCribY1_row = this.itemProtocol.getPressCribY1_row(); +// pressCribA1_angle = this.itemProtocol.getPressCribA1_angle(); +// pressCribX2_line = this.itemProtocol.getPressCribX2_line(); +// pressCribY2_row = this.itemProtocol.getPressCribY2_row(); +// pressCribA2_angle = this.itemProtocol.getPressCribA2_angle(); +// pressCribX3_line = this.itemProtocol.getPressCribX3_line(); +// pressCribY3_row = this.itemProtocol.getPressCribY3_row(); +// pressCribA3_angle = this.itemProtocol.getPressCribA3_angle(); +// Zoffset = this.itemProtocol.getZoffset(); +// pallet_layerQty = this.itemProtocol.getPallet_layerQty(); +// pressCrib_layerQty = this.itemProtocol.getPressCrib_layerQty(); +// codeLayerX1_interval = this.itemProtocol.getCodeLayerX1_interval(); +// codeLayerY1_interval = this.itemProtocol.getCodeLayerY1_interval(); +// codeLayerX2_interval = this.itemProtocol.getCodeLayerX2_interval(); +// codeLayerY2_interval = this.itemProtocol.getCodeLayerY2_interval(); +// codeLayerX3_interval = this.itemProtocol.getCodeLayerX3_interval(); +// codeLayerY3_interval = this.itemProtocol.getcodeLayerY3_interval(); +// codeLayerX1_offset = this.itemProtocol.getCodeLayerX1_offset(); +// codeLayerY1_offset = this.itemProtocol.getCodeLayerY1_offset(); +// codeLayerX2_offset = this.itemProtocol.getCodeLayerX2_offset(); +// codeLayerY2_offset = this.itemProtocol.getCodeLayerY2_offset(); +// codeLayerX3_offset = this.itemProtocol.getCodeLayerX3_offset(); +// codeLayerY3_offset = this.itemProtocol.getCodeLayerY3_offset(); +// pressLayerX1_interval = this.itemProtocol.getPressLayerX1_interval(); +// pressLayerY1_interval = this.itemProtocol.getPressLayerY1_interval(); +// pressLayerX2_interval = this.itemProtocol.getPressLayerX2_interval(); +// pressLayerY2_interval = this.itemProtocol.getPressLayerY2_interval(); +// pressLayerX3_interval = this.itemProtocol.getPressLayerX3_interval(); +// pressLayerY3_interval = this.itemProtocol.getPressLayerY3_interval(); +// pressLayerX1_offset = this.itemProtocol.getPressLayerX1_offset(); +// pressLayerY1_offset = this.itemProtocol.getPressLayerY1_offset(); +// pressLayerX2_offset = this.itemProtocol.getPressLayerX2_offset(); +// pressLayerY2_offset = this.itemProtocol.getPressLayerY2_offset(); +// pressLayerX3_offset = this.itemProtocol.getPressLayerX3_offset(); +// pressLayerY3_offset = this.itemProtocol.getPressLayerY3_offset(); +// tool_coordinate = this.itemProtocol.getTool_coordinate(); +// tool_coordinate = this.itemProtocol.getTool_coordinate(); if (mode != last_mode) { this.setRequireSucess(false); if(mode==2){ @@ -1268,8 +1268,6 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic + "." + ItemProtocol.item_to_target; String to_task = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() + "." + ItemProtocol.item_to_task; - String to_tray_qty = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() - + "." + ItemProtocol.item_to_tray_qty; String opcservcerid = this.getDevice().getOpc_server_id(); Server server = ReadUtil.getServer(opcservcerid); Map itemMap = new HashMap(); @@ -1279,8 +1277,6 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic itemMap.put(to_target, command); } else if (type == 3) { itemMap.put(to_task, command); - }else if(type==4){ - itemMap.put(to_tray_qty, command); } ReadUtil.write(itemMap, server); server.disconnect(); @@ -1465,30 +1461,30 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic String Zoffset = content.getString("zoffset"); String pallet_layerQty = content.getString("pallet_layerqty"); String pressCrib_layerQty = content.getString("presscrib_layerqty"); - String codeLayerX1_interval = content.getString("codelayerx1_interval"); - String codeLayerY1_interval = content.getString("codelayery1_interval"); - String codeLayerX2_interval = content.getString("codelayerx2_interval"); - String codeLayerY2_interval = content.getString("codelayery2_interval"); - String codeLayerX3_interval = content.getString("codelayerx3_interval"); - String codeLayerY3_interval = content.getString("codelayery3_interval"); - String codeLayerX1_offset = content.getString("codelayerx1_offset"); - String codeLayerY1_offset = content.getString("codelayery1_offset"); - String codeLayerX2_offset = content.getString("codelayerx2_offset"); - String codeLayerY2_offset = content.getString("codelayery2_offset"); - String codeLayerX3_offset = content.getString("codelayerx3_offset"); - String codeLayerY3_offset = content.getString("codelayery3_offset"); - String pressLayerX1_interval = content.getString("presslayerx1_interval"); - String pressLayerY1_interval = content.getString("presslayery1_interval"); - String pressLayerX2_interval = content.getString("presslayerx2_interval"); - String pressLayerY2_interval = content.getString("presslayery2_interval"); - String pressLayerX3_interval = content.getString("presslayerx3_interval"); - String pressLayerY3_interval = content.getString("presslayery3_interval"); - String pressLayerX1_offset = content.getString("presslayerx1_offset"); - String pressLayerY1_offset = content.getString("presslayery1_offset"); - String pressLayerX2_offset = content.getString("presslayerx2_offset"); - String pressLayerY2_offset = content.getString("presslayery2_offset"); - String pressLayerX3_offset = content.getString("presslayerx3_offset"); - String pressLayerY3_offset = content.getString("presslayery3_offset"); +// String codeLayerX1_interval = content.getString("codelayerx1_interval"); +// String codeLayerY1_interval = content.getString("codelayery1_interval"); +// String codeLayerX2_interval = content.getString("codelayerx2_interval"); +// String codeLayerY2_interval = content.getString("codelayery2_interval"); +// String codeLayerX3_interval = content.getString("codelayerx3_interval"); +// String codeLayerY3_interval = content.getString("codelayery3_interval"); +// String codeLayerX1_offset = content.getString("codelayerx1_offset"); +// String codeLayerY1_offset = content.getString("codelayery1_offset"); +// String codeLayerX2_offset = content.getString("codelayerx2_offset"); +// String codeLayerY2_offset = content.getString("codelayery2_offset"); +// String codeLayerX3_offset = content.getString("codelayerx3_offset"); +// String codeLayerY3_offset = content.getString("codelayery3_offset"); +// String pressLayerX1_interval = content.getString("presslayerx1_interval"); +// String pressLayerY1_interval = content.getString("presslayery1_interval"); +// String pressLayerX2_interval = content.getString("presslayerx2_interval"); +// String pressLayerY2_interval = content.getString("presslayery2_interval"); +// String pressLayerX3_interval = content.getString("presslayerx3_interval"); +// String pressLayerY3_interval = content.getString("presslayery3_interval"); +// String pressLayerX1_offset = content.getString("presslayerx1_offset"); +// String pressLayerY1_offset = content.getString("presslayery1_offset"); +// String pressLayerX2_offset = content.getString("presslayerx2_offset"); +// String pressLayerY2_offset = content.getString("presslayery2_offset"); +// String pressLayerX3_offset = content.getString("presslayerx3_offset"); +// String pressLayerY3_offset = content.getString("presslayery3_offset"); String tool_coordinate = content.getString("tool_coordinate"); String product_code = content.getString("product_code"); String AlongSide = content.getString("alongside"); @@ -1527,30 +1523,30 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic map.put("to_Zoffset", StrUtil.isBlank(Zoffset) ? "0" : Zoffset); map.put("to_pallet_layerQty", StrUtil.isBlank(pallet_layerQty) ? "0" : pallet_layerQty); map.put("to_pressCrib_layerQty", StrUtil.isBlank(pressCrib_layerQty) ? "0" : pressCrib_layerQty); - map.put("to_codeLayerX1_interval", StrUtil.isBlank(codeLayerX1_interval) ? "0" : codeLayerX1_interval); - map.put("to_codeLayerY1_interval", StrUtil.isBlank(codeLayerY1_interval) ? "0" : codeLayerY1_interval); - map.put("to_codeLayerX2_interval", StrUtil.isBlank(codeLayerX2_interval) ? "0" : codeLayerX2_interval); - map.put("to_codeLayerY2_interval", StrUtil.isBlank(codeLayerY2_interval) ? "0" : codeLayerY2_interval); - map.put("to_codeLayerX3_interval", StrUtil.isBlank(codeLayerX3_interval) ? "0" : codeLayerX3_interval); - map.put("to_codeLayerY3_interval", StrUtil.isBlank(codeLayerY3_interval) ? "0" : codeLayerY3_interval); - map.put("to_codeLayerX1_offset", StrUtil.isBlank(codeLayerX1_offset) ? "0" : codeLayerX1_offset); - map.put("to_codeLayerY1_offset", StrUtil.isBlank(codeLayerY1_offset) ? "0" : codeLayerY1_offset); - map.put("to_codeLayerX2_offset", StrUtil.isBlank(codeLayerX2_offset) ? "0" : codeLayerX2_offset); - map.put("to_codeLayerY2_offset", StrUtil.isBlank(codeLayerY2_offset) ? "0" : codeLayerY2_offset); - map.put("to_codeLayerX3_offset", StrUtil.isBlank(codeLayerX3_offset) ? "0" : codeLayerX3_offset); - map.put("to_codeLayerY3_offset", StrUtil.isBlank(codeLayerY3_offset) ? "0" : codeLayerY3_offset); - map.put("to_pressLayerX1_interval", StrUtil.isBlank(pressLayerX1_interval) ? "0" : pressLayerX1_interval); - map.put("to_pressLayerY1_interval", StrUtil.isBlank(pressLayerY1_interval) ? "0" : pressLayerY1_interval); - map.put("to_pressLayerX2_interval", StrUtil.isBlank(pressLayerX2_interval) ? "0" : pressLayerX2_interval); - map.put("to_pressLayerY2_interval", StrUtil.isBlank(pressLayerY2_interval) ? "0" : pressLayerY2_interval); - map.put("to_pressLayerX3_interval", StrUtil.isBlank(pressLayerX3_interval) ? "0" : pressLayerX3_interval); - map.put("to_pressLayerY3_interval", StrUtil.isBlank(pressLayerY3_interval) ? "0" : pressLayerY3_interval); - map.put("to_pressLayerX1_offset", StrUtil.isBlank(pressLayerX1_offset) ? "0" : pressLayerX1_offset); - map.put("to_pressLayerY1_offset", StrUtil.isBlank(pressLayerY1_offset) ? "0" : pressLayerY1_offset); - map.put("to_pressLayerX2_offset", StrUtil.isBlank(pressLayerX2_offset) ? "0" : pressLayerX2_offset); - map.put("to_pressLayerY2_offset", StrUtil.isBlank(pressLayerY2_offset) ? "0" : pressLayerY2_offset); - map.put("to_pressLayerX3_offset", StrUtil.isBlank(pressLayerX3_offset) ? "0" : pressLayerX3_offset); - map.put("to_pressLayerY3_offset", StrUtil.isBlank(pressLayerY3_offset) ? "0" : pressLayerY3_offset); +// map.put("to_codeLayerX1_interval", StrUtil.isBlank(codeLayerX1_interval) ? "0" : codeLayerX1_interval); +// map.put("to_codeLayerY1_interval", StrUtil.isBlank(codeLayerY1_interval) ? "0" : codeLayerY1_interval); +// map.put("to_codeLayerX2_interval", StrUtil.isBlank(codeLayerX2_interval) ? "0" : codeLayerX2_interval); +// map.put("to_codeLayerY2_interval", StrUtil.isBlank(codeLayerY2_interval) ? "0" : codeLayerY2_interval); +// map.put("to_codeLayerX3_interval", StrUtil.isBlank(codeLayerX3_interval) ? "0" : codeLayerX3_interval); +// map.put("to_codeLayerY3_interval", StrUtil.isBlank(codeLayerY3_interval) ? "0" : codeLayerY3_interval); +// map.put("to_codeLayerX1_offset", StrUtil.isBlank(codeLayerX1_offset) ? "0" : codeLayerX1_offset); +// map.put("to_codeLayerY1_offset", StrUtil.isBlank(codeLayerY1_offset) ? "0" : codeLayerY1_offset); +// map.put("to_codeLayerX2_offset", StrUtil.isBlank(codeLayerX2_offset) ? "0" : codeLayerX2_offset); +// map.put("to_codeLayerY2_offset", StrUtil.isBlank(codeLayerY2_offset) ? "0" : codeLayerY2_offset); +// map.put("to_codeLayerX3_offset", StrUtil.isBlank(codeLayerX3_offset) ? "0" : codeLayerX3_offset); +// map.put("to_codeLayerY3_offset", StrUtil.isBlank(codeLayerY3_offset) ? "0" : codeLayerY3_offset); +// map.put("to_pressLayerX1_interval", StrUtil.isBlank(pressLayerX1_interval) ? "0" : pressLayerX1_interval); +// map.put("to_pressLayerY1_interval", StrUtil.isBlank(pressLayerY1_interval) ? "0" : pressLayerY1_interval); +// map.put("to_pressLayerX2_interval", StrUtil.isBlank(pressLayerX2_interval) ? "0" : pressLayerX2_interval); +// map.put("to_pressLayerY2_interval", StrUtil.isBlank(pressLayerY2_interval) ? "0" : pressLayerY2_interval); +// map.put("to_pressLayerX3_interval", StrUtil.isBlank(pressLayerX3_interval) ? "0" : pressLayerX3_interval); +// map.put("to_pressLayerY3_interval", StrUtil.isBlank(pressLayerY3_interval) ? "0" : pressLayerY3_interval); +// map.put("to_pressLayerX1_offset", StrUtil.isBlank(pressLayerX1_offset) ? "0" : pressLayerX1_offset); +// map.put("to_pressLayerY1_offset", StrUtil.isBlank(pressLayerY1_offset) ? "0" : pressLayerY1_offset); +// map.put("to_pressLayerX2_offset", StrUtil.isBlank(pressLayerX2_offset) ? "0" : pressLayerX2_offset); +// map.put("to_pressLayerY2_offset", StrUtil.isBlank(pressLayerY2_offset) ? "0" : pressLayerY2_offset); +// map.put("to_pressLayerX3_offset", StrUtil.isBlank(pressLayerX3_offset) ? "0" : pressLayerX3_offset); +// map.put("to_pressLayerY3_offset", StrUtil.isBlank(pressLayerY3_offset) ? "0" : pressLayerY3_offset); map.put("to_tool_coordinate", StrUtil.isBlank(tool_coordinate) ? "0" : tool_coordinate); map.put("to_command",200); this.writing(map); @@ -1622,30 +1618,30 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic json.put("Zoffset", Zoffset); json.put("pallet_layerQty", pallet_layerQty); json.put("pressCrib_layerQty", pressCrib_layerQty); - json.put("codeLayerX1_interval", codeLayerX1_interval); - json.put("codeLayerY1_interval", codeLayerY1_interval); - json.put("codeLayerX2_interval", codeLayerX2_interval); - json.put("codeLayerY2_interval", codeLayerY2_interval); - json.put("codeLayerX3_interval", codeLayerX3_interval); - json.put("codeLayerY3_interval", codeLayerY3_interval); - json.put("codeLayerX1_offset", codeLayerX1_offset); - json.put("codeLayerY1_offset", codeLayerY1_offset); - json.put("codeLayerX2_offset", codeLayerX2_offset); - json.put("codeLayerY2_offset", codeLayerY2_offset); - json.put("codeLayerX3_offset", codeLayerX3_offset); - json.put("codeLayerY3_offset", codeLayerY3_offset); - json.put("pressLayerX1_interval", pressLayerX1_interval); - json.put("pressLayerY1_interval", pressLayerY1_interval); - json.put("pressLayerX2_interval", pressLayerX2_interval); - json.put("pressLayerY2_interval", pressLayerY2_interval); - json.put("pressLayerX3_interval", pressLayerX3_interval); - json.put("pressLayerY3_interval", pressLayerY3_interval); - json.put("pressLayerX1_offset", pressLayerX1_offset); - json.put("pressLayerY1_offset", pressLayerY1_offset); - json.put("pressLayerX2_offset", pressLayerX2_offset); - json.put("pressLayerY2_offset", pressLayerY2_offset); - json.put("pressLayerX3_offset", pressLayerX3_offset); - json.put("pressLayerY3_offset", pressLayerY3_offset); +// json.put("codeLayerX1_interval", codeLayerX1_interval); +// json.put("codeLayerY1_interval", codeLayerY1_interval); +// json.put("codeLayerX2_interval", codeLayerX2_interval); +// json.put("codeLayerY2_interval", codeLayerY2_interval); +// json.put("codeLayerX3_interval", codeLayerX3_interval); +// json.put("codeLayerY3_interval", codeLayerY3_interval); +// json.put("codeLayerX1_offset", codeLayerX1_offset); +// json.put("codeLayerY1_offset", codeLayerY1_offset); +// json.put("codeLayerX2_offset", codeLayerX2_offset); +// json.put("codeLayerY2_offset", codeLayerY2_offset); +// json.put("codeLayerX3_offset", codeLayerX3_offset); +// json.put("codeLayerY3_offset", codeLayerY3_offset); +// json.put("pressLayerX1_interval", pressLayerX1_interval); +// json.put("pressLayerY1_interval", pressLayerY1_interval); +// json.put("pressLayerX2_interval", pressLayerX2_interval); +// json.put("pressLayerY2_interval", pressLayerY2_interval); +// json.put("pressLayerX3_interval", pressLayerX3_interval); +// json.put("pressLayerY3_interval", pressLayerY3_interval); +// json.put("pressLayerX1_offset", pressLayerX1_offset); +// json.put("pressLayerY1_offset", pressLayerY1_offset); +// json.put("pressLayerX2_offset", pressLayerX2_offset); +// json.put("pressLayerY2_offset", pressLayerY2_offset); +// json.put("pressLayerX3_offset", pressLayerX3_offset); +// json.put("pressLayerY3_offset", pressLayerY3_offset); json.put("tool_coordinate", tool_coordinate); HttpResponse result = acsToWmsService.applyTaskManipulatorToWms(json); if (ObjectUtil.isNotEmpty(result)) { diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_press/ItemProtocol.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_press/ItemProtocol.java index 738bc92..7431200 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_press/ItemProtocol.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_press/ItemProtocol.java @@ -207,46 +207,46 @@ public class ItemProtocol { public static List getReadableItemDtos() { ArrayList list = new ArrayList(); - list.add(new ItemDto(item_heartbeat, "心跳", "DB112.B0")); - list.add(new ItemDto(item_mode, "工作模式", "DB112.B1", Boolean.valueOf(true))); - list.add(new ItemDto(item_status, "设备状态", "DB112.B2")); - list.add(new ItemDto(item_error, "故障", "DB112.B3")); - list.add(new ItemDto(item_open_time, "开机时间", "DB112.STRING4.50")); - list.add(new ItemDto(item_standby_time, "待机时间", "DB112.D56")); - list.add(new ItemDto(item_production_time, "生产时间", "DB112.D60")); - list.add(new ItemDto(item_error_time, "故障时间", "DB112.D64")); - list.add(new ItemDto(item_material, "当前生产物料", "DB112.STRING68.50")); - list.add(new ItemDto(item_qty, "当前已生产数量", "DB112.D120")); - list.add(new ItemDto(item_weight, "当前已生产重量", "DB112.D124")); - list.add(new ItemDto(item_qualified, "当前已生产合格数", "DB112.D128")); - list.add(new ItemDto(item_unqualified, "当前已生产不合格数", "DB112.D132")); - list.add(new ItemDto(item_order_No, "工单号", "DB112.STRING136.50")); + list.add(new ItemDto(item_heartbeat, "心跳", "DB400.B0")); + list.add(new ItemDto(item_mode, "工作模式", "DB400.B1", Boolean.valueOf(true))); + list.add(new ItemDto(item_status, "设备状态", "DB400.B2")); + list.add(new ItemDto(item_error, "故障", "DB400.B3")); + list.add(new ItemDto(item_open_time, "开机时间", "DB400.STRING4.50")); + list.add(new ItemDto(item_standby_time, "待机时间", "DB400.D56")); + list.add(new ItemDto(item_production_time, "生产时间", "DB400.D60")); + list.add(new ItemDto(item_error_time, "故障时间", "DB400.D64")); + list.add(new ItemDto(item_material, "当前生产物料", "DB400.STRING68.50")); + list.add(new ItemDto(item_qty, "当前已生产数量", "DB400.D120")); + list.add(new ItemDto(item_weight, "当前已生产重量", "DB400.D124")); + list.add(new ItemDto(item_qualified, "当前已生产合格数", "DB400.D128")); + list.add(new ItemDto(item_unqualified, "当前已生产不合格数", "DB400.D132")); + list.add(new ItemDto(item_order_No, "工单号", "DB400.STRING136.50")); return list; } public static List getWriteableItemDtos() { ArrayList list = new ArrayList(); - list.add(new ItemDto(item_to_command, "反馈", "DB113.W0", Boolean.valueOf(true))); - list.add(new ItemDto(item_to_error, "error", "DB113.W2")); - list.add(new ItemDto(item_to_order_No, "工单号", "DB113.STRING4.50")); - list.add(new ItemDto(item_to_qty, "生产重量", "DB113.D56")); - list.add(new ItemDto(item_to_material_code, "下发物料编号", "DB113.STRING60.50")); - list.add(new ItemDto(item_to_brick_code, "砖型代号", "DB113.STRING112.50")); - list.add(new ItemDto(item_to_formula, "配方代号", "DB113.STRING164.50")); - list.add(new ItemDto(item_to_product_code, "产品编号", "DB113.W216")); - list.add(new ItemDto(item_to_AlongSide, "A长边", "DB113.W218")); - list.add(new ItemDto(item_to_BshortSide, "B短边", "DB113.W220")); - list.add(new ItemDto(item_to_Htrapezoidal, "H梯形高", "DB113.W222")); - list.add(new ItemDto(item_to_Wthickness, "W厚度", "DB113.W224")); - list.add(new ItemDto(item_to_size_error, "尺寸允许误差", "DB113.REAL228")); - list.add(new ItemDto(item_to_single_weight, "单重允许误差", "DB113.REAL232")); - list.add(new ItemDto(item_to_drawing_address, "图纸地址", "DB113.REAL236")); - list.add(new ItemDto(item_to_standard_weight, "标准重量", "DB113.REAL240")); - list.add(new ItemDto(item_to_detection_error, "检测误差值", "DB113.REAL244")); - list.add(new ItemDto(item_to_standard_size_height1, "标准尺寸高度1", "DB113.REAL248")); - list.add(new ItemDto(item_to_standard_size_height2, "标准尺寸高度2", "DB113.REAL252")); - list.add(new ItemDto(item_to_standard_size_height3, "标准尺寸高度3", "DB113.REAL256")); - list.add(new ItemDto(item_to_standard_size_height4, "标准尺寸高度4", "DB113.REAL260")); + list.add(new ItemDto(item_to_command, "反馈", "DB400.W188", Boolean.valueOf(true))); + list.add(new ItemDto(item_to_error, "error", "DB400.W190")); + list.add(new ItemDto(item_to_order_No, "工单号", "DB400.STRING192.50")); + list.add(new ItemDto(item_to_qty, "生产重量", "DB400.D244")); + list.add(new ItemDto(item_to_material_code, "下发物料编号", "DB400.STRING248.50")); + list.add(new ItemDto(item_to_brick_code, "砖型代号", "DB400.STRING300.50")); + list.add(new ItemDto(item_to_formula, "配方代号", "DB400.STRING352.50")); + list.add(new ItemDto(item_to_product_code, "产品编号", "DB400.W404")); + list.add(new ItemDto(item_to_AlongSide, "A长边", "DB400.W406")); + list.add(new ItemDto(item_to_BshortSide, "B短边", "DB400.W408")); + list.add(new ItemDto(item_to_Htrapezoidal, "H梯形高", "DB400.W410")); + list.add(new ItemDto(item_to_Wthickness, "W厚度", "DB400.W412")); + list.add(new ItemDto(item_to_size_error, "尺寸允许误差", "DB400.REAL414")); + list.add(new ItemDto(item_to_single_weight, "单重允许误差", "DB400.REAL418")); + list.add(new ItemDto(item_to_drawing_address, "图纸地址", "DB400.REAL422")); + list.add(new ItemDto(item_to_standard_weight, "标准重量", "DB400.REAL426")); + list.add(new ItemDto(item_to_detection_error, "检测误差值", "DB400.REAL430")); + list.add(new ItemDto(item_to_standard_size_height1, "标准尺寸高度1", "DB400.REAL434")); + list.add(new ItemDto(item_to_standard_size_height2, "标准尺寸高度2", "DB400.REAL438")); + list.add(new ItemDto(item_to_standard_size_height3, "标准尺寸高度3", "DB400.REAL442")); + list.add(new ItemDto(item_to_standard_size_height4, "标准尺寸高度4", "DB400.REAL446")); return list; } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_press/LnshPressDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_press/LnshPressDeviceDriver.java index ffa7eac..742b325 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_press/LnshPressDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_press/LnshPressDeviceDriver.java @@ -198,11 +198,11 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De logServer.deviceItemValue(this.device_code, "order_No", order_No); logServer.deviceExecuteLog(this.device_code, "", "", "信号order_No:" + last_order_No + " -> " + order_No); } - if (errorDeviceRecord) { - this.errorDeviceRecord(); - } +// if (errorDeviceRecord) { +// this.errorDeviceRecord(); +// } } catch (Exception var17) { - log.info(var17.getMessage()); + log.info("压机错误为{}",var17.getMessage()); message = "错误:" + var17.getMessage(); return; } @@ -224,8 +224,6 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De message = ""; Instruction instruction = null; List toInstructions; - - if (mode > 2 && !requireSucess) { if (ObjectUtil.isNotEmpty(this.device.getExtraValue().get(String.valueOf(mode)))) { String modethod = this.device.getExtraValue().get(String.valueOf(mode)).toString(); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_rgv/ItemProtocol.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_rgv/ItemProtocol.java index 689289b..8f3ef87 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_rgv/ItemProtocol.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_rgv/ItemProtocol.java @@ -20,7 +20,7 @@ public class ItemProtocol { public static String item_move1 = "move1"; public static String item_move2 = "move2"; public static String item_action1 = "action1"; - public static String item_action2 = "action2"; + public static String item_actoin2 = "actoin2"; public static String item_walk_y = "walk_y"; public static String item_error = "error"; public static String item_task1 = "task1"; @@ -88,8 +88,8 @@ public class ItemProtocol { return this.getOpcIntegerValue(item_action1); } - public int getAction2() { - return this.getOpcIntegerValue(item_action2); + public int getActoin2() { + return this.getOpcIntegerValue(item_actoin2); } public int getWalk_y() { @@ -174,7 +174,7 @@ public class ItemProtocol { list.add(new ItemDto(item_move1, "前工位光电信号", "DB50.B3")); list.add(new ItemDto(item_move2, "后工位光电信号", "DB50.B4")); list.add(new ItemDto(item_action1, "前工位动作信号", "DB50.B5")); - list.add(new ItemDto(item_action2, "后工位动作信号", "DB50.B6")); + list.add(new ItemDto(item_actoin2, "后工位动作信号", "DB50.B6")); list.add(new ItemDto(item_walk_y, "行走列", "DB50.B7")); list.add(new ItemDto(item_error, "车体报警", "DB50.B8")); list.add(new ItemDto(item_task1, "前工位任务号", "DB50.D10")); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_rgv/LnshRGVDefination.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_rgv/LnshRGVDefination.java index 4174040..464e986 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_rgv/LnshRGVDefination.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_rgv/LnshRGVDefination.java @@ -63,7 +63,7 @@ public class LnshRGVDefination implements OpcDeviceDriverDefination { list.add(new ItemDto(ItemProtocol.item_move1, "前工位光电信号", "DB50.B3")); list.add(new ItemDto(ItemProtocol.item_move2, "后工位光电信号", "DB50.B4")); list.add(new ItemDto(ItemProtocol.item_action1, "前工位动作信号", "DB50.B5")); - list.add(new ItemDto(ItemProtocol.item_action2, "后工位动作信号", "DB50.B6")); + list.add(new ItemDto(ItemProtocol.item_actoin2, "后工位动作信号", "DB50.B6")); list.add(new ItemDto(ItemProtocol.item_walk_y, "行走列", "DB50.B7")); list.add(new ItemDto(ItemProtocol.item_error, "车体报警", "DB50.B8")); list.add(new ItemDto(ItemProtocol.item_task1, "前工位任务号", "DB50.D10")); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_rgv/LnshRGVDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_rgv/LnshRGVDeviceDriver.java index 1146038..0418a83 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_rgv/LnshRGVDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_rgv/LnshRGVDeviceDriver.java @@ -112,8 +112,8 @@ public class LnshRGVDeviceDriver extends AbstractOpcDeviceDriver implements Devi int last_move2 = 0; int action1 = 0; int last_action1 = 0; - int action2 = 0; - int last_action2 = 0; + int actoin2 = 0; + int last_actoin2 = 0; int walk_y = 0; int last_walk_y = 0; int task1 = 0; @@ -201,7 +201,7 @@ public class LnshRGVDeviceDriver extends AbstractOpcDeviceDriver implements Devi move1 = this.itemProtocol.getMove1(); move2 = this.itemProtocol.getMove2(); action1 = this.itemProtocol.getAction1(); - action2 = this.itemProtocol.getAction2(); + actoin2 = this.itemProtocol.getActoin2(); walk_y = this.itemProtocol.getWalk_y(); error = this.itemProtocol.getError(); task1 = this.itemProtocol.getTask1(); @@ -261,8 +261,8 @@ public class LnshRGVDeviceDriver extends AbstractOpcDeviceDriver implements Devi if (action1 != last_action1) { logServer.deviceExecuteLog(this.device_code, "", "", "信号action1:" + last_action1 + "->" + action1); } - if (action2 != last_action2) { - logServer.deviceExecuteLog(this.device_code, "", "", "信号action2:" + last_action2 + "->" + action2); + if (actoin2 != last_actoin2) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号actoin2:" + last_actoin2 + "->" + actoin2); } if (walk_y != last_walk_y) { logServer.deviceExecuteLog(this.device_code, "", "", "信号walk_y:" + last_walk_y + "->" + walk_y); @@ -325,7 +325,7 @@ public class LnshRGVDeviceDriver extends AbstractOpcDeviceDriver implements Devi } //前工位取货时判断取货位光电信号 - if (mode == 3 && error == 0 && status != 3 && action1 == 0 && move1 == 0 && task1 > 0 && action2 == 2) { + if (mode == 3 && error == 0 && status != 3 && action1 == 0 && move1 == 0 && task1 > 0 && actoin2 == 2) { Instruction inst1 = instructionService.findByCodeFromCache(String.valueOf(task1)); String start_device_code = inst1.getStart_device_code(); Device startDevice = deviceAppservice.findDeviceByCode(start_device_code); @@ -362,7 +362,7 @@ public class LnshRGVDeviceDriver extends AbstractOpcDeviceDriver implements Devi } //前工位放货时判断放货位光电信号 - if (mode == 3 && error == 0 && status != 3 && action1 == 2 && move1 != 0 && task1 > 0 && action2 != 1) { + if (mode == 3 && error == 0 && status != 3 && action1 == 2 && move1 != 0 && task1 > 0 && actoin2 != 1) { Instruction inst1 = instructionService.findByCodeFromCache(String.valueOf(task1)); String next_device_code = inst1.getNext_device_code(); Device nextDevice = deviceAppservice.findDeviceByCode(next_device_code); @@ -428,7 +428,7 @@ public class LnshRGVDeviceDriver extends AbstractOpcDeviceDriver implements Devi } //后工位取货时判断取货位光电信号 没问题 - if (mode == 2 && error == 0 && status != 3 && action2 == 1 && move2 == 0 && task2 > 0) { + if (mode == 2 && error == 0 && status != 3 && actoin2 == 1 && move2 == 0 && task2 > 0) { Instruction inst1 = instructionService.findByCodeFromCache(String.valueOf(task2)); String start_device_code = inst1.getStart_device_code(); Device startDevice = deviceAppservice.findDeviceByCode(start_device_code); @@ -485,7 +485,7 @@ public class LnshRGVDeviceDriver extends AbstractOpcDeviceDriver implements Devi } //后工位放货时判断放货位光电信号 - if (mode == 3 && error == 0 && status != 3 && action2 == 2 && move2 != 0 && task2 > 0 && action1 != 1) { + if (mode == 3 && error == 0 && status != 3 && actoin2 == 2 && move2 != 0 && task2 > 0 && action1 != 1) { Instruction inst1 = instructionService.findByCodeFromCache(String.valueOf(task2)); String next_device_code = inst1.getNext_device_code(); String start_device_code=inst1.getStart_device_code(); @@ -565,7 +565,7 @@ public class LnshRGVDeviceDriver extends AbstractOpcDeviceDriver implements Devi return; case 2: logServer.deviceExecuteLog(this.device_code, "", "", "前工位光电信号" + move1 + "后工位光电信号" + move2+"复位标记"+ requireSucess1+"模式"+mode); - if (move1 == 0 && move2 == 0 && !requireSucess1 &&mode==2 && action2 == 0 && action1==0&& task1==0&& task2==0) { + if (move1 == 0 && move2 == 0 && !requireSucess1 &&mode==2 && actoin2 == 0 && action1==0&& task1==0&& task2==0) { instruction_require(); } break; @@ -592,7 +592,7 @@ public class LnshRGVDeviceDriver extends AbstractOpcDeviceDriver implements Devi last_move1 = move1; last_move2 = move2; last_action1 = action1; - last_action2 = action2; + last_actoin2 = actoin2; last_walk_y = walk_y; last_task1 = task1; last_task2 = task2; @@ -964,7 +964,7 @@ public class LnshRGVDeviceDriver extends AbstractOpcDeviceDriver implements Devi String move1 = ""; String move2 = ""; String action1 = ""; - String action2 = ""; + String actoin2 = ""; String walk_y = ""; String mode = ""; String status = ""; @@ -1014,16 +1014,16 @@ public class LnshRGVDeviceDriver extends AbstractOpcDeviceDriver implements Devi }else if (this.getAction1() == 0) { action1 = "无动作"; } - if (this.getAction2() == 1) { - action2 = "取货中"; - } else if (this.getAction2() == 2) { - action2 = "取货完成"; - } else if (this.getAction2() == 3) { - action2 = "放货中"; - } else if (this.getAction2() == 4) { - action2 = "放货完成"; - }else if (this.getAction2() == 0) { - action2 = "无动作"; + if (this.getActoin2() == 1) { + actoin2 = "取货中"; + } else if (this.getActoin2() == 2) { + actoin2 = "取货完成"; + } else if (this.getActoin2() == 3) { + actoin2 = "放货中"; + } else if (this.getActoin2() == 4) { + actoin2 = "放货完成"; + }else if (this.getActoin2() == 0) { + actoin2 = "无动作"; } if (this.getWalk_y() == 0) { @@ -1038,7 +1038,7 @@ public class LnshRGVDeviceDriver extends AbstractOpcDeviceDriver implements Devi jo.put("move1", move1); jo.put("move2", move2); jo.put("action1", action1); - jo.put("action2", action2); + jo.put("actoin2", actoin2); jo.put("walk_y", walk_y); if (this.getIserror()) { jo.put("error", "设备有故障"); @@ -1083,7 +1083,7 @@ public class LnshRGVDeviceDriver extends AbstractOpcDeviceDriver implements Devi } else { this.instruction_update_time = date; - if (task1 > 0 && task2 > 0 && action1 == 4 && action2 == 4 && move1 == 0 && move2 == 0) { + if (task1 > 0 && task2 > 0 && action1 == 4 && actoin2 == 4 && move1 == 0 && move2 == 0) { //inst_message inst1 = checkInst(); if (inst1 != null) { @@ -1113,7 +1113,7 @@ public class LnshRGVDeviceDriver extends AbstractOpcDeviceDriver implements Devi } //单独的后工位任务 - } else if (action2 == 4 && move2 == 0 && task2 > 0 && action1 == 0 && move2 == 0 && task1 == 0) { + } else if (actoin2 == 4 && move2 == 0 && task2 > 0 && action1 == 0 && move2 == 0 && task1 == 0) { //inst_message inst2 = checkInst(); if (inst2 != null) { @@ -1132,7 +1132,7 @@ public class LnshRGVDeviceDriver extends AbstractOpcDeviceDriver implements Devi writing("to_task2", "0"); writing("to_task2", "0"); } - } else if (action1 == 4 && move1 == 0 && task1 > 0 && action2 == 0 && move2 == 0 && task2 == 0) { + } else if (action1 == 4 && move1 == 0 && task1 > 0 && actoin2 == 0 && move2 == 0 && task2 == 0) { inst1 = checkInst(); if (inst1 != null) { try { diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/ItemProtocol.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/ItemProtocol.java index 21b743b..6e4d3eb 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/ItemProtocol.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/ItemProtocol.java @@ -18,7 +18,7 @@ public class ItemProtocol { public static String item_mode = "mode"; public static String item_move = "move"; public static String item_action = "action"; - public static String item_ioaction = "ioaction"; + public static String item_io_action = "io_action"; public static String item_error = "error"; public static String item_task = "task"; public static String item_weight = "weight"; @@ -54,7 +54,7 @@ public class ItemProtocol { } public int getIoAction() { - return this.getOpcIntegerValue(item_ioaction); + return this.getOpcIntegerValue(item_io_action); } public int getError() { @@ -118,24 +118,24 @@ public class ItemProtocol { public static List getReadableItemDtos() { ArrayList list = new ArrayList(); - list.add(new ItemDto(item_heartbeat, "心跳", "DB81.B10")); - list.add(new ItemDto(item_mode, "工作模式", "DB81.B1", Boolean.valueOf(true))); - list.add(new ItemDto(item_move, "光电开关信号", "DB81.B2")); - list.add(new ItemDto(item_action, "取放信号", "DB81.B3")); - list.add(new ItemDto(item_ioaction, "进出信号", "DB81.B4")); - list.add(new ItemDto(item_error, "报警信号", "DB81.B5")); - list.add(new ItemDto(item_task, "任务号", "DB81.D6")); - list.add(new ItemDto(item_weight, "重量", "DB81.D10")); - list.add(new ItemDto(item_material, "物料", "DB81.STRING14.50")); - list.add(new ItemDto(item_barcode, "条码", "DB81.W66")); + list.add(new ItemDto(item_heartbeat, "心跳", "DB402.B10")); + list.add(new ItemDto(item_mode, "工作模式", "DB402.B1", Boolean.valueOf(true))); + list.add(new ItemDto(item_move, "光电开关信号", "DB402.B2")); + list.add(new ItemDto(item_action, "取放信号", "DB402.B3")); + list.add(new ItemDto(item_io_action, "进出信号", "DB402.B4")); + list.add(new ItemDto(item_error, "报警信号", "DB402.B5")); + list.add(new ItemDto(item_task, "任务号", "DB402.D6")); + list.add(new ItemDto(item_weight, "重量", "DB402.D10")); + list.add(new ItemDto(item_material, "物料", "DB402.STRING14.50")); + list.add(new ItemDto(item_barcode, "条码", "DB402.W66")); return list; } public static List getWriteableItemDtos() { ArrayList list = new ArrayList(); - list.add(new ItemDto(item_to_command, "作业命令", "DB71.W0", Boolean.valueOf(true))); - list.add(new ItemDto(item_to_target, "目标站", "DB71.W2")); - list.add(new ItemDto(item_to_task, "任务号", "DB71.D4")); + list.add(new ItemDto(item_to_command, "作业命令", "DB402.W68", Boolean.valueOf(true))); + list.add(new ItemDto(item_to_target, "目标站", "DB402.W70")); + list.add(new ItemDto(item_to_task, "任务号", "DB402.D72")); return list; } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/package_site/ItemProtocol.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/package_site/ItemProtocol.java index 57827a0..e7da5d5 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/package_site/ItemProtocol.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/package_site/ItemProtocol.java @@ -17,7 +17,7 @@ public class ItemProtocol { public static String item_mode = "mode"; public static String item_move = "move"; public static String item_action = "action"; - public static String item_ioaction = "ioaction"; + public static String item_io_action = "io_action"; public static String item_error = "error"; public static String item_vehicle_code = "vehicle_code"; public static String item_vehicle_type = "vehicle_type"; @@ -26,10 +26,11 @@ public class ItemProtocol { public static String item_to_vehicle_code = "to_vehicle_code"; public static String item_to_vehicle_type = "to_vehicle_type"; public static String item_to_is_package = "to_is_package"; - public static String item_is_weight = "is_weight"; + public static String item_weight = "weight"; public static String item_material = "material"; public static String item_barcode = "barcode"; public static String item_to_target = "to_target"; + public static String item_to_is_coating= "to_is_coating"; public static String item_to_task= "to_task"; public static String item_to_message= "to_message"; Boolean isonline; @@ -67,7 +68,7 @@ public class ItemProtocol { public int getTask() { return this.getOpcIntegerValue(item_task); } - public int getWeight() { return this.getOpcIntegerValue(item_is_weight);} + public int getWeight() { return this.getOpcIntegerValue(item_weight);} public int getMove() { return this.getOpcIntegerValue(item_move); @@ -77,8 +78,12 @@ public class ItemProtocol { return this.getOpcIntegerValue(item_action); } + public int getTo_is_coating() { + return this.getOpcIntegerValue(item_to_is_coating); + } + public int getIoaction() { - return this.getOpcIntegerValue(item_ioaction); + return this.getOpcIntegerValue(item_io_action); } public int getError() { @@ -139,10 +144,10 @@ public class ItemProtocol { list.add(new ItemDto(item_mode, "工作模式", "DB51.B1", Boolean.valueOf(true))); list.add(new ItemDto(item_move, "光电开关信号", "DB51.B2")); list.add(new ItemDto(item_action, "取放信号", "DB51.B3")); - list.add(new ItemDto(item_ioaction, "进出信号", "DB51.B4")); + list.add(new ItemDto(item_io_action, "进出信号", "DB51.B4")); list.add(new ItemDto(item_error, "报警信号", "DB51.B5")); list.add(new ItemDto(item_task, "任务号", "DB51.D6")); - list.add(new ItemDto(item_is_weight, "重量", "DB51.D10")); + list.add(new ItemDto(item_weight, "重量", "DB51.D10")); list.add(new ItemDto(item_material, "物料", "DB51.STRING14.50")); list.add(new ItemDto(item_barcode, "条码", "DB51.W66")); return list; @@ -155,6 +160,7 @@ public class ItemProtocol { list.add(new ItemDto(item_to_task, "下发任务号", "DB51.B4")); list.add(new ItemDto(item_to_is_package, "下发是否包装", "DB51.B8")); list.add(new ItemDto(item_to_message, "下发信息反馈", "DB62.STRING10.50")); + list.add(new ItemDto(item_to_is_coating, "是否裹膜", "DB51.B12")); return list; } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java index d53570c..3943dd7 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java @@ -366,18 +366,8 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { String Wthickness = orderDto.getW(); String formula = orderDto.getFormula(); String brick_code = orderDto.getProduct_code(); - String size_error = orderDto.getSize_error(); - String single_weight = orderDto.getSingle_weight(); - String drawing_address = orderDto.getDrawing_address(); - String standard_size_height1 = orderDto.getStandard_size_height1(); - String standard_size_height2 = orderDto.getStandard_size_height2(); - String standard_size_height3 = orderDto.getStandard_size_height3(); - String standard_size_height4 = orderDto.getStandard_size_height4(); - String standard_weight = orderDto.getStandard_weight(); - String detection_error = orderDto.getDetection_error(); - - - + //混碾泥料号 + String material_model=orderDto.getMaterial_model(); if (StrUtil.isEmpty(order_code)) { JSONObject json = new JSONObject(); json.put("order_code", order_code); @@ -431,7 +421,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { Map map = new LinkedHashMap<>(); map.put("to_order_No", order_code); map.put("to_weight", qty); - map.put("to_material_code", material_code); + map.put("to_material_code", material_model); map.put("to_command",100); lnshMixingMillDeviceDriver.writing(map); is_flag = true; @@ -465,13 +455,12 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { Map map = new LinkedHashMap<>(); map.put("to_order_No", order_code); map.put("to_material", material_code); - map.put("to_product_code", product_code); map.put("to_AlongSide", AlongSide); map.put("to_BshortSide", BshortSide); map.put("to_Htrapezoidal", Htrapezoidal); map.put("to_Wthickness", Wthickness); map.put("to_brick_code", product_code+formula); - map.put("to_formula", order_number); +// map.put("to_formula", order_number); map.put("to_feedback",100); lnshPackagePalletManipulatorDeviceDriver.writing(map); is_flag = true; @@ -507,7 +496,6 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { map.put("to_order_No", order_code); map.put("to_qty", qty); map.put("to_material_code", material_code); - map.put("to_product_code", product_code); map.put("to_AlongSide", AlongSide); map.put("to_BshortSide", BshortSide); map.put("to_Htrapezoidal", Htrapezoidal); @@ -938,7 +926,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { jo.put("move1", lnshRGVDeviceDriver.getMove1()); jo.put("move2", lnshRGVDeviceDriver.getMove2()); jo.put("action1", lnshRGVDeviceDriver.getAction1()); - jo.put("action2", lnshRGVDeviceDriver.getAction2()); + jo.put("action2", lnshRGVDeviceDriver.getActoin2()); jo.put("walk_y", lnshRGVDeviceDriver.getWalk_y()); jo.put("error", lnshRGVDeviceDriver.getError()); jo.put("task1", lnshRGVDeviceDriver.getTask1()); @@ -1147,7 +1135,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { jo.put("move_1", lnshRGVDeviceDriver.getMove1()); jo.put("move_2", lnshRGVDeviceDriver.getMove2()); jo.put("action_1", lnshRGVDeviceDriver.getAction1()); - jo.put("action_2", lnshRGVDeviceDriver.getAction2()); + jo.put("action_2", lnshRGVDeviceDriver.getActoin2()); jo.put("walk_y", lnshRGVDeviceDriver.getWalk_y()); jo.put("error", lnshRGVDeviceDriver.getError()); jo.put("task1", lnshRGVDeviceDriver.getTask1()); diff --git a/acs/nladmin-system/src/main/java/org/nl/modules/logicflow/service/impl/StageServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/modules/logicflow/service/impl/StageServiceImpl.java index 69b5181..b651b4f 100644 --- a/acs/nladmin-system/src/main/java/org/nl/modules/logicflow/service/impl/StageServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/modules/logicflow/service/impl/StageServiceImpl.java @@ -765,13 +765,13 @@ public class StageServiceImpl implements StageService { action_1 = "放货完成"; } - if (lnshRGVDeviceDriver.getAction2() == 1) { + if (lnshRGVDeviceDriver.getActoin2() == 1) { action_2 = "取货中"; - } else if (lnshRGVDeviceDriver.getAction2() == 2) { + } else if (lnshRGVDeviceDriver.getActoin2() == 2) { action_2 = "取货完成"; - } else if (lnshRGVDeviceDriver.getAction2() == 3) { + } else if (lnshRGVDeviceDriver.getActoin2() == 3) { action_2 = "放货中"; - } else if (lnshRGVDeviceDriver.getAction2() == 4) { + } else if (lnshRGVDeviceDriver.getActoin2() == 4) { action_2 = "放货完成"; } diff --git a/acs/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java b/acs/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java index 36e047a..d5aa3eb 100644 --- a/acs/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java +++ b/acs/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java @@ -39,6 +39,7 @@ import java.io.DataOutputStream; import java.io.IOException; import java.net.InetSocketAddress; import java.net.Socket; +import java.util.Arrays; import java.util.Date; import java.util.List; import java.util.Map; @@ -258,7 +259,7 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable { } catch (Exception e) { System.out.println("OneAgv链接异常"); log.info("OneAgv链接异常"); - log.error("agv连接出现异常:{}", e); + log.error("agv连接出现异常:{}", Arrays.toString(e.getStackTrace())); logServer.deviceExecuteLog("1", "", "", "agv异常" + e.getMessage()); logServer.deviceExecuteLog("1", "", "", "agv异常" + e); if (ObjectUtil.isNotEmpty(s)) {