From 9ea3216efd3dbf3ef4eeebae94e19866c2d8863d Mon Sep 17 00:00:00 2001 From: loujf Date: Wed, 6 Jul 2022 19:16:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=98=89=E8=80=90=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- acs/hd/logPath_IS_UNDEFINED/2022-04-29.0.log | 0 .../device/device_driver/DriverTypeEnum.java | 6 +- .../lnsh_Laminating_machine/ItemProtocol.java | 26 +- .../LnshLaminatingMachineDefination.java | 19 +- .../LnshLaminatingMachineDeviceDriver.java | 10 +- .../ItemProtocol.java | 753 +--------- .../LnshPalletizingManipulatorDefination.java | 66 +- ...nshPalletizingManipulatorDeviceDriver.java | 731 +--------- .../lnsh_split_manipulator/ItemProtocol.java | 721 +--------- .../LnshSplitManipulatorDefination.java | 78 +- .../LnshSplitManipulatorDeviceDriver.java | 662 +-------- .../lnsh/lnsh_station/ItemProtocol.java | 23 +- .../lnsh_station/LnshStationDefination.java | 6 +- .../lnsh_station/LnshStationDeviceDriver.java | 16 + .../ItemProtocol.java | 926 +++++++++++++ ...ckagePalletSplitManipulatorDefination.java | 145 ++ ...agePalletSplitManipulatorDeviceDriver.java | 1220 +++++++++++++++++ .../wms/service/impl/WmsToAcsServiceImpl.java | 75 +- .../service/impl/StageActorServiceImpl.java | 49 +- acs/qd/src/views/acs/device/config.vue | 3 +- .../driver/lnsh/lnsh_Laminating_machine.vue | 5 +- .../rljn_package_palletSplit_manipulator.vue | 487 +++++++ acs/qd/src/views/acs/monitor/device/index.vue | 6 + 23 files changed, 3069 insertions(+), 2964 deletions(-) delete mode 100644 acs/hd/logPath_IS_UNDEFINED/2022-04-29.0.log create mode 100644 acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/rljn_package_palletSplit_manipulator/ItemProtocol.java create mode 100644 acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/rljn_package_palletSplit_manipulator/RljnPackagePalletSplitManipulatorDefination.java create mode 100644 acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/rljn_package_palletSplit_manipulator/RljnPackagePalletSplitManipulatorDeviceDriver.java create mode 100644 acs/qd/src/views/acs/device/driver/lnsh/rljn_package_palletSplit_manipulator.vue diff --git a/acs/hd/logPath_IS_UNDEFINED/2022-04-29.0.log b/acs/hd/logPath_IS_UNDEFINED/2022-04-29.0.log deleted file mode 100644 index e69de29..0000000 diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device/device_driver/DriverTypeEnum.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device/device_driver/DriverTypeEnum.java index 15108f5..6de1912 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device/device_driver/DriverTypeEnum.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device/device_driver/DriverTypeEnum.java @@ -109,9 +109,11 @@ public enum DriverTypeEnum { LNSH_STATION(50, "lnsh_station", "晟华-工位(交互模板)", "station"), - LNSH_LAMINATING_MACHINE(51, "lnsh_Laminating_machine", "晟华-覆膜机", "station"), + LNSH_LAMINATING_MACHINE(51, "lnsh_Laminating_machine", "晟华-缓存货架", "station"), - LNSH_PACKAGE_SITE(52, "lnsh_package_site", "晟华-包装线工位", "station"); + LNSH_PACKAGE_SITE(52, "lnsh_package_site", "晟华-包装线工位", "station"), + + LNSH_PACKAGE_PALLETSPLIT_MANIPULATOR(53, "lnsh_package_palletSplit_manipulator", "荣力嘉耐-包装码拆垛机械手", "station"); //驱动索引 diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_Laminating_machine/ItemProtocol.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_Laminating_machine/ItemProtocol.java index 9beb7d0..c1277c8 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_Laminating_machine/ItemProtocol.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_Laminating_machine/ItemProtocol.java @@ -17,6 +17,7 @@ public class ItemProtocol { public static String item_container_type = "container_type"; 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"; @@ -51,6 +52,10 @@ public class ItemProtocol { public int getTask() { return this.getOpcIntegerValue(item_task); } + + public String getBarcode() { + return this.getOpcStringValue(item_barcode); + } public int getToCommand() { return this.getOpcIntegerValue(item_to_command); @@ -100,21 +105,22 @@ public class ItemProtocol { public static List getReadableItemDtos() { ArrayList list = new ArrayList(); - list.add(new ItemDto(item_heartbeat, "心跳", "DB32.B0")); - list.add(new ItemDto(item_mode, "工作状态", "DB32.B2", Boolean.valueOf(true))); - list.add(new ItemDto(item_move, "光电开关信号", "DB32.B3")); - list.add(new ItemDto(item_container_type, "托盘类型", "DB32.B6")); - list.add(new ItemDto(item_error, "报警信号", "DB32.B7")); - list.add(new ItemDto(item_task, "任务号", "DB32.D10")); + list.add(new ItemDto(item_heartbeat, "心跳", "DB1.B0")); + list.add(new ItemDto(item_mode, "工作状态", "DB1.B1", Boolean.valueOf(true))); + list.add(new ItemDto(item_move, "光电开关信号", "DB1.B2")); + list.add(new ItemDto(item_container_type, "托盘类型", "DB1.B3")); + list.add(new ItemDto(item_error, "报警信号", "DB1.B4")); + list.add(new ItemDto(item_task, "任务号", "DB1.D5")); + list.add(new ItemDto(item_barcode, "条码", "DB1.S9")); return list; } public static List getWriteableItemDtos() { ArrayList list = new ArrayList(); - list.add(new ItemDto(item_to_command, "作业命令", "DB33.W2", Boolean.valueOf(true))); - list.add(new ItemDto(item_to_target, "目标站", "DB33.W4")); - list.add(new ItemDto(item_to_task, "任务号", "DB33.D8")); - list.add(new ItemDto(item_to_barcode, "条码", "DB33.S12")); + list.add(new ItemDto(item_to_command, "作业命令", "DB2.W0", Boolean.valueOf(true))); + list.add(new ItemDto(item_to_target, "目标站", "DB2.W2")); + list.add(new ItemDto(item_to_task, "任务号", "DB2.D4")); + list.add(new ItemDto(item_to_barcode, "条码", "DB2.S8")); return list; } diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_Laminating_machine/LnshLaminatingMachineDefination.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_Laminating_machine/LnshLaminatingMachineDefination.java index 22ec6e8..2b8378f 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_Laminating_machine/LnshLaminatingMachineDefination.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_Laminating_machine/LnshLaminatingMachineDefination.java @@ -12,7 +12,7 @@ import java.util.LinkedList; import java.util.List; /** - * 晟华-覆膜机 + * 晟华-缓存货架 * */ @Service @@ -24,12 +24,12 @@ public class LnshLaminatingMachineDefination implements OpcDeviceDriverDefinatio @Override public String getDriverName() { - return "晟华-覆膜机"; + return "晟华-缓存货架"; } @Override public String getDriverDescription() { - return "晟华-覆膜机"; + return "晟华-缓存货架"; } @Override @@ -57,12 +57,13 @@ public class LnshLaminatingMachineDefination implements OpcDeviceDriverDefinatio public static List getReadableItemDtos2() { List list = new ArrayList(); - list.add(new ItemDto(ItemProtocol.item_heartbeat, "心跳", "DB32.B0")); - list.add(new ItemDto(ItemProtocol.item_mode, "工作状态", "DB32.B1", true)); - list.add(new ItemDto(ItemProtocol.item_move, "光电开关信号", "DB32.B2")); - list.add(new ItemDto(ItemProtocol.item_container_type, "托盘类型", "DB32.B6")); - list.add(new ItemDto(ItemProtocol.item_error, "报警信号", "DB32.B7")); - list.add(new ItemDto(ItemProtocol.item_task, "任务号", "DB32.D8")); + list.add(new ItemDto(ItemProtocol.item_heartbeat, "心跳", "DB1.B0")); + list.add(new ItemDto(ItemProtocol.item_mode, "工作状态", "DB1.B1", Boolean.valueOf(true))); + list.add(new ItemDto(ItemProtocol.item_move, "光电开关信号", "DB1.B2")); + list.add(new ItemDto(ItemProtocol.item_container_type, "托盘类型", "DB1.B3")); + list.add(new ItemDto(ItemProtocol.item_error, "报警信号", "DB1.B4")); + list.add(new ItemDto(ItemProtocol.item_task, "任务号", "DB1.D5")); + list.add(new ItemDto(ItemProtocol.item_barcode, "条码", "DB1.S9")); return list; } diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_Laminating_machine/LnshLaminatingMachineDeviceDriver.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_Laminating_machine/LnshLaminatingMachineDeviceDriver.java index 2e7e139..ca76654 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_Laminating_machine/LnshLaminatingMachineDeviceDriver.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_Laminating_machine/LnshLaminatingMachineDeviceDriver.java @@ -38,7 +38,7 @@ import java.util.List; import java.util.Map; /** - * 晟华-覆膜机 + * 晟华-缓存货架 */ @Slf4j @Data @@ -73,6 +73,9 @@ public class LnshLaminatingMachineDeviceDriver extends AbstractOpcDeviceDriver i int last_move = 0; int last_task = 0; int last_container_type = 0; + String barcode = ""; + String last_barcode = ""; + Boolean isonline = true; int hasGoods = 0; String message = null; @@ -120,6 +123,7 @@ public class LnshLaminatingMachineDeviceDriver extends AbstractOpcDeviceDriver i error = this.itemProtocol.getError(); move = this.itemProtocol.getMove(); task = this.itemProtocol.getTask(); + barcode = this.itemProtocol.getBarcode(); hasGoods = this.itemProtocol.getMove(); container_type = this.itemProtocol.getContainer_type(); @@ -140,6 +144,10 @@ public class LnshLaminatingMachineDeviceDriver extends AbstractOpcDeviceDriver i logServer.deviceLog(this.device_code,"task",String.valueOf(task)); logServer.deviceLogToacs(this.device_code,"","","信号task:" + last_task + "->" + task); } + if (!StrUtil.equals(barcode,last_barcode)) { + logServer.deviceLog(this.device_code,"barcode",barcode); + logServer.deviceLogToacs(this.device_code,"","","信号barcode:" + last_barcode + "->" + barcode); + } if (container_type != last_container_type) { logServer.deviceLog(this.device_code,"container_type",String.valueOf(container_type)); logServer.deviceLogToacs(this.device_code,"","","信号container_type:" + last_container_type + "->" + container_type); diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/ItemProtocol.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/ItemProtocol.java index 331010e..1137090 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/ItemProtocol.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/ItemProtocol.java @@ -19,138 +19,13 @@ public class ItemProtocol { public static String item_action = "action"; public static String item_error = "error"; public static String item_put_station = "put_station"; - public static String item_barcode = "barcode"; public static String item_material = "material"; public static String item_encoder_qty = "encoder_qty"; - public static String item_open_time = "open_time"; - public static String item_standby_time = "standby_time "; - public static String item_production_time = "production_time"; - public static String item_error_time = "error_time"; - 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_one_cribTotal = "one_cribTotal"; - public static String item_two_cribTotal = "two_cribTotal"; - public static String item_one_qty = "one_qty"; - public static String item_two_qty = "two_qty"; - public static String item_tool_coordinate = "tool_coordinate"; + public static String item_batch = "batch"; + public static String item_specifications = "specifications"; - public static String item_to_heartbeat = "to_heartbeat"; public static String item_to_feedback = "to_feedback"; public static String item_to_error = "to_error"; - public static String item_to_materialQty = "to_materialQty"; - public static String item_to_material_type = "to_material_type"; - public static String item_to_material_code = "to_material_code"; - - 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_one_cribTotal = "to_one_cribTotal"; - public static String item_to_two_cribTotal = "to_two_cribTotal"; - public static String item_to_one_qty = "to_one_qty"; - public static String item_to_two_qty = "to_two_qty"; - public static String item_to_tool_coordinate = "to_tool_coordinate"; - private LnshPalletizingManipulatorDeviceDriver driver; @@ -182,10 +57,6 @@ public class ItemProtocol { return this.getOpcIntegerValue(item_put_station); } - public String getBarcode() { - return this.getOpcStringValue(item_barcode); - } - public String getMaterial() { return this.getOpcStringValue(item_material); } @@ -194,252 +65,12 @@ public class ItemProtocol { return this.getOpcIntegerValue(item_encoder_qty); } - public int getOpen_time() { - return this.getOpcIntegerValue(item_open_time); + public int getBatch() { + return this.getOpcIntegerValue(item_batch); } - public int getStandby_time() { - return this.getOpcIntegerValue(item_standby_time); - } - - public int getProduction_time() { - return this.getOpcIntegerValue(item_production_time); - } - - public int getError_time() { - return this.getOpcIntegerValue(item_error_time); - } - - 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 Float getPalletX1_line() { - return this.getOpcFloatValue(item_palletX1_line); - } - - public Float getPalletY1_row() { - return this.getOpcFloatValue(item_palletY1_row); - } - - public Float getPalletA1_angle() { - return this.getOpcFloatValue(item_palletA1_angle); - } - - public Float getPalletX2_line() { - return this.getOpcFloatValue(item_palletX2_line); - } - - public Float getPalletY2_row() { - return this.getOpcFloatValue(item_palletY2_row); - } - - public Float getPalletA2_angle() { - return this.getOpcFloatValue(item_palletA2_angle); - } - - public Float getPalletX3_line() { - return this.getOpcFloatValue(item_palletX3_line); - } - - public Float getPalletY3_row() { - return this.getOpcFloatValue(item_palletY3_row); - } - - public Float getPalletA3_angle() { - return this.getOpcFloatValue(item_palletA3_angle); - } - - public Float getPressCribX1_line() { - return this.getOpcFloatValue(item_pressCribX1_line); - } - - public Float getPressCribY1_row() { - return this.getOpcFloatValue(item_pressCribY1_row); - } - - public Float getPressCribA1_angle() { - return this.getOpcFloatValue(item_pressCribA1_angle); - } - - public Float getPressCribX2_line() { - return this.getOpcFloatValue(item_pressCribX2_line); - } - - public Float getPressCribY2_row() { - return this.getOpcFloatValue(item_pressCribY2_row); - } - - public Float getPressCribA2_angle() { - return this.getOpcFloatValue(item_pressCribA2_angle); - } - - public Float getPressCribX3_line() { - return this.getOpcFloatValue(item_pressCribX3_line); - } - - public Float getPressCribY3_row() { - return this.getOpcFloatValue(item_pressCribY3_row); - } - - public Float getPressCribA3_angle() { - return this.getOpcFloatValue(item_pressCribA3_angle); - } - - public Float getZoffset() { - return this.getOpcFloatValue(item_Zoffset); - } - - public int getPallet_layerQty() { - return this.getOpcIntegerValue(item_pallet_layerQty); - } - - public int getPressCrib_layerQty() { - return this.getOpcIntegerValue(item_pressCrib_layerQty); - } - - public Float getCodeLayerX1_interval() { - return this.getOpcFloatValue(item_codeLayerX1_interval); - } - - public Float getCodeLayerY1_interval() { - return this.getOpcFloatValue(item_codeLayerY1_interval); - } - - public Float getCodeLayerX2_interval() { - return this.getOpcFloatValue(item_codeLayerX2_interval); - } - - public Float getCodeLayerY2_interval() { - return this.getOpcFloatValue(item_codeLayerY2_interval); - } - - public Float getCodeLayerX3_interval() { - return this.getOpcFloatValue(item_codeLayerX3_interval); - } - - public Float getcodeLayerY3_interval() { - return this.getOpcFloatValue(item_codeLayerY3_interval); - } - - public Float getCodeLayerX1_offset() { - return this.getOpcFloatValue(item_codeLayerX1_offset); - } - - public Float getCodeLayerY1_offset() { - return this.getOpcFloatValue(item_codeLayerY1_offset); - } - - public Float getCodeLayerX2_offset() { - return this.getOpcFloatValue(item_codeLayerX2_offset); - } - - public Float getCodeLayerY2_offset() { - return this.getOpcFloatValue(item_codeLayerY2_offset); - } - - public Float getCodeLayerX3_offset() { - return this.getOpcFloatValue(item_codeLayerX3_offset); - } - - public Float getCodeLayerY3_offset() { - return this.getOpcFloatValue(item_codeLayerY3_offset); - } - - public Float getPressLayerX1_interval() { - return this.getOpcFloatValue(item_pressLayerX1_interval); - } - - public Float getPressLayerY1_interval() { - return this.getOpcFloatValue(item_pressLayerY1_interval); - } - - public Float getPressLayerX2_interval() { - return this.getOpcFloatValue(item_pressLayerX2_interval); - } - - public Float getPressLayerY2_interval() { - return this.getOpcFloatValue(item_pressLayerY2_interval); - } - - public Float getPressLayerX3_interval() { - return this.getOpcFloatValue(item_pressLayerX3_interval); - } - - public Float getPressLayerY3_interval() { - return this.getOpcFloatValue(item_pressLayerY3_interval); - } - - public Float getPressLayerX1_offset() { - return this.getOpcFloatValue(item_pressLayerX1_offset); - } - - public Float getPressLayerY1_offset() { - return this.getOpcFloatValue(item_pressLayerY1_offset); - } - - public Float getPressLayerX2_offset() { - return this.getOpcFloatValue(item_pressLayerX2_offset); - } - - public Float getPressLayerY2_offset() { - return this.getOpcFloatValue(item_pressLayerY2_offset); - } - - public Float getPressLayerX3_offset() { - return this.getOpcFloatValue(item_pressLayerX3_offset); - } - - public Float getPressLayerY3_offset() { - return this.getOpcFloatValue(item_pressLayerY3_offset); - } - - public int getOne_cribTotal() { - return this.getOpcIntegerValue(item_one_cribTotal); - } - - public int getTwo_cribTotal() { - return this.getOpcIntegerValue(item_two_cribTotal); - } - - public int getOne_qty() { - return this.getOpcIntegerValue(item_one_qty); - } - - public int getTwo_qty() { - return this.getOpcIntegerValue(item_two_qty); - } - - public int getTool_coordinate() { - return this.getOpcIntegerValue(item_tool_coordinate); + public String getSpecifications() { + return this.getOpcStringValue(item_specifications); } public int getTo_feedback() { @@ -450,250 +81,6 @@ public class ItemProtocol { return this.getOpcIntegerValue(item_to_error); } - public int getTo_materialQty() { - return this.getOpcIntegerValue(item_to_materialQty); - } - - public int getTo_material_type() { - return this.getOpcIntegerValue(item_to_material_type); - } - - public String getTo_material_code() { - return this.getOpcStringValue(item_to_material_code); - } - - public int getToProduct_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 Float getToPalletX1_line() { - return this.getOpcFloatValue(item_to_palletX1_line); - } - - public Float getToPalletY1_row() { - return this.getOpcFloatValue(item_to_palletY1_row); - } - - public Float getToPalletA1_angle() { - return this.getOpcFloatValue(item_to_palletA1_angle); - } - - public Float getToPalletX2_line() { - return this.getOpcFloatValue(item_to_palletX2_line); - } - - public Float getToPalletY2_row() { - return this.getOpcFloatValue(item_to_palletY2_row); - } - - public Float getToPalletA2_angle() { - return this.getOpcFloatValue(item_to_palletA2_angle); - } - - public Float getToPalletX3_line() { - return this.getOpcFloatValue(item_to_palletX3_line); - } - - public Float getToPalletY3_row() { - return this.getOpcFloatValue(item_to_palletY3_row); - } - - public Float getToPalletA3_angle() { - return this.getOpcFloatValue(item_to_palletA3_angle); - } - - public Float getToPressCribX1_line() { - return this.getOpcFloatValue(item_to_pressCribX1_line); - } - - public Float getToPressCribY1_row() { - return this.getOpcFloatValue(item_to_pressCribY1_row); - } - - public Float getToPressCribA1_angle() { - return this.getOpcFloatValue(item_to_pressCribA1_angle); - } - - public Float getToPressCribX2_line() { - return this.getOpcFloatValue(item_to_pressCribX2_line); - } - - public Float getToPressCribY2_row() { - return this.getOpcFloatValue(item_to_pressCribY2_row); - } - - public Float getToPressCribA2_angle() { - return this.getOpcFloatValue(item_to_pressCribA2_angle); - } - - public Float getToPressCribX3_line() { - return this.getOpcFloatValue(item_to_pressCribX3_line); - } - - public Float getToPressCribY3_row() { - return this.getOpcFloatValue(item_to_pressCribY3_row); - } - - public Float getToPressCribA3_angle() { - return this.getOpcFloatValue(item_to_pressCribA3_angle); - } - - public Float getToZoffset() { - return this.getOpcFloatValue(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 Float getToCodeLayerX1_interval() { - return this.getOpcFloatValue(item_to_codeLayerX1_interval); - } - - public Float getToCodeLayerY1_interval() { - return this.getOpcFloatValue(item_to_codeLayerY1_interval); - } - - public Float getToCodeLayerX2_interval() { - return this.getOpcFloatValue(item_to_codeLayerX2_interval); - } - - public Float getToCodeLayerY2_interval() { - return this.getOpcFloatValue(item_to_codeLayerY2_interval); - } - - public Float getToCodeLayerX3_interval() { - return this.getOpcFloatValue(item_to_codeLayerX3_interval); - } - - public Float getTocodeLayerY3_interval() { - return this.getOpcFloatValue(item_to_codeLayerY3_interval); - } - - public Float getToCodeLayerX1_offset() { - return this.getOpcFloatValue(item_to_codeLayerX1_offset); - } - - public Float getToCodeLayerY1_offset() { - return this.getOpcFloatValue(item_to_codeLayerY1_offset); - } - - public Float getToCodeLayerX2_offset() { - return this.getOpcFloatValue(item_to_codeLayerX2_offset); - } - - public Float getToCodeLayerY2_offset() { - return this.getOpcFloatValue(item_to_codeLayerY2_offset); - } - - public Float getToCodeLayerX3_offset() { - return this.getOpcFloatValue(item_to_codeLayerX3_offset); - } - - public Float getToCodeLayerY3_offset() { - return this.getOpcFloatValue(item_to_codeLayerY3_offset); - } - - public Float getToPressLayerX1_interval() { - return this.getOpcFloatValue(item_to_pressLayerX1_interval); - } - - public Float getToPressLayerY1_interval() { - return this.getOpcFloatValue(item_to_pressLayerY1_interval); - } - - public Float getToPressLayerX2_interval() { - return this.getOpcFloatValue(item_to_pressLayerX2_interval); - } - - public Float getToPressLayerY2_interval() { - return this.getOpcFloatValue(item_to_pressLayerY2_interval); - } - - public Float getToPressLayerX3_interval() { - return this.getOpcFloatValue(item_to_pressLayerX3_interval); - } - - public Float getToPressLayerY3_interval() { - return this.getOpcFloatValue(item_to_pressLayerY3_interval); - } - - public Float getToPressLayerX1_offset() { - return this.getOpcFloatValue(item_to_pressLayerX1_offset); - } - - public Float getToPressLayerY1_offset() { - return this.getOpcFloatValue(item_to_pressLayerY1_offset); - } - - public Float getToPressLayerX2_offset() { - return this.getOpcFloatValue(item_to_pressLayerX2_offset); - } - - public Float getToPressLayerY2_offset() { - return this.getOpcFloatValue(item_to_pressLayerY2_offset); - } - - public Float getToPressLayerX3_offset() { - return this.getOpcFloatValue(item_to_pressLayerX3_offset); - } - - public Float getToPressLayerY3_offset() { - return this.getOpcFloatValue(item_to_pressLayerY3_offset); - } - - public int getToOne_cribTotal() { - return this.getOpcIntegerValue(item_to_one_cribTotal); - } - - public int getToTwo_cribTotal() { - return this.getOpcIntegerValue(item_to_two_cribTotal); - } - - public int getToOne_qty() { - return this.getOpcIntegerValue(item_to_one_qty); - } - - public int getToTwo_qty() { - return this.getOpcIntegerValue(item_to_two_qty); - } - - public int getToTool_coordinate() { - return this.getOpcIntegerValue(item_to_tool_coordinate); - } - Boolean isonline; public int getOpcIntegerValue(String protocol) { @@ -737,72 +124,10 @@ public class ItemProtocol { list.add(new ItemDto(item_action, "动作", "DB1.B3")); list.add(new ItemDto(item_error, "故障代码", "DB1.B4")); list.add(new ItemDto(item_put_station, "当前码盘工位", "DB1.B5")); - list.add(new ItemDto(item_barcode, "当前码盘工位条码", "DB1.S6")); list.add(new ItemDto(item_material, "码盘工位当前物料", "DB1.S262")); list.add(new ItemDto(item_encoder_qty, "码盘位当前码盘数量", "DB1.D518")); - list.add(new ItemDto(item_open_time, "开机时间", "DB1.D522")); - list.add(new ItemDto(item_standby_time, "待机时间", "DB1.D526")); - list.add(new ItemDto(item_production_time, "生产时间", "DB1.D530")); - list.add(new ItemDto(item_error_time, "故障时间", "DB1.D534")); - - list.add(new ItemDto(item_product_code, "产品编号", "DB1.D538")); - list.add(new ItemDto(item_AlongSide, "A长边", "DB1.D542")); - list.add(new ItemDto(item_BshortSide, "B短边", "DB1.D546")); - list.add(new ItemDto(item_Htrapezoidal, "H梯形高", "DB1.D550")); - list.add(new ItemDto(item_Wthickness, "W厚度", "DB1.D554")); - list.add(new ItemDto(item_tray_qty, "当前垛盘数", "DB1.D558")); - list.add(new ItemDto(item_tray_high, "垛盘高度", "DB1.D562")); - list.add(new ItemDto(item_crib_category, "垛型类别", "DB1.D566")); - list.add(new ItemDto(item_palletX1_line, "码垛X1行", "DB1.REAL570")); - list.add(new ItemDto(item_palletY1_row, "码垛Y1列", "DB1.REAL1574")); - list.add(new ItemDto(item_palletA1_angle, "码垛A1角度", "DB1.REAL578")); - list.add(new ItemDto(item_palletX2_line, "码垛X2行", "DB1.REAL582")); - list.add(new ItemDto(item_palletY2_row, "码垛Y2列", "DB1.REAL586")); - list.add(new ItemDto(item_palletA2_angle, "码垛A2角度", "DB1.REAL590")); - list.add(new ItemDto(item_palletX3_line, "码垛X3行", "DB1.REAL594")); - list.add(new ItemDto(item_palletY3_row, "码垛Y3列", "DB1.REAL598")); - list.add(new ItemDto(item_palletA3_angle, "码垛A3角度", "DB1.REAL602")); - list.add(new ItemDto(item_pressCribX1_line, "压垛X1行", "DB1.REAL606")); - list.add(new ItemDto(item_pressCribY1_row, "压垛Y1列", "DB1.REAL610")); - list.add(new ItemDto(item_pressCribA1_angle, "压垛A1角度", "DB1.REAL614")); - list.add(new ItemDto(item_pressCribX2_line, "压垛X2行", "DB1.REAL618")); - list.add(new ItemDto(item_pressCribY2_row, "压垛Y2列", "DB1.REAL622")); - list.add(new ItemDto(item_pressCribA2_angle, "压垛A2角度", "DB1.REAL626")); - list.add(new ItemDto(item_pressCribX3_line, "压垛X3行", "DB1.REAL630")); - list.add(new ItemDto(item_pressCribY3_row, "压垛Y3列", "DB1.REAL634")); - list.add(new ItemDto(item_pressCribA3_angle, "压垛A3角度", "DB1.REAL638")); - list.add(new ItemDto(item_Zoffset, "Z轴偏移", "DB1.REAL642")); - list.add(new ItemDto(item_pallet_layerQty, "码垛层数", "DB1.D646")); - list.add(new ItemDto(item_pressCrib_layerQty, "压垛层数", "DB1.D650")); - list.add(new ItemDto(item_codeLayerX1_interval, "码层X1间隔", "DB1.REAL654")); - list.add(new ItemDto(item_codeLayerY1_interval, "码层Y1间隔", "DB1.REAL658")); - list.add(new ItemDto(item_codeLayerX2_interval, "码层X2间隔", "DB1.REAL662")); - list.add(new ItemDto(item_codeLayerY2_interval, "码层Y2间隔", "DB1.REAL666")); - list.add(new ItemDto(item_codeLayerX3_interval, "码层X3间隔", "DB1.REAL670")); - list.add(new ItemDto(item_codeLayerY3_interval, "码层Y3间隔", "DB1.REAL674")); - list.add(new ItemDto(item_codeLayerX1_offset, "码层X1偏移", "DB1.REAL678")); - list.add(new ItemDto(item_codeLayerY1_offset, "码层Y1偏移", "DB1.REAL682")); - list.add(new ItemDto(item_codeLayerX2_offset, "码层X2偏移", "DB1.REAL686")); - list.add(new ItemDto(item_codeLayerY2_offset, "码层Y2偏移", "DB1.REAL690")); - list.add(new ItemDto(item_codeLayerX3_offset, "码层X3偏移", "DB1.REAL694")); - list.add(new ItemDto(item_codeLayerY3_offset, "码层Y3偏移", "DB1.REAL698")); - list.add(new ItemDto(item_pressLayerX1_interval, "压层X1间隔", "DB1.REAL702")); - list.add(new ItemDto(item_pressLayerY1_interval, "压层Y1间隔", "DB1.REAL706")); - list.add(new ItemDto(item_pressLayerX2_interval, "压层X2间隔", "DB1.REAL710")); - list.add(new ItemDto(item_pressLayerY2_interval, "压层Y2间隔", "DB1.REAL714")); - list.add(new ItemDto(item_pressLayerX3_interval, "压层X3间隔", "DB1.REAL718")); - list.add(new ItemDto(item_pressLayerY3_interval, "压层Y3间隔", "DB1.REAL722")); - list.add(new ItemDto(item_pressLayerX1_offset, "压层X1偏移", "DB1.REAL726")); - list.add(new ItemDto(item_pressLayerY1_offset, "压层Y1偏移", "DB1.REAL730")); - list.add(new ItemDto(item_pressLayerX2_offset, "压层X2偏移", "DB1.REAL734")); - list.add(new ItemDto(item_pressLayerY2_offset, "压层Y2偏移", "DB1.REAL738")); - list.add(new ItemDto(item_pressLayerX3_offset, "压层X3偏移", "DB1.REAL742")); - list.add(new ItemDto(item_pressLayerY3_offset, "压层Y3偏移", "DB1.REAL746")); - list.add(new ItemDto(item_one_cribTotal, "1#垛总数", "DB1.D750")); - list.add(new ItemDto(item_two_cribTotal, "2#垛总数", "DB1.D754")); - list.add(new ItemDto(item_one_qty, "1#垛当前数", "DB1.D758")); - list.add(new ItemDto(item_two_qty, "2#垛当前数", "DB1.D762")); - list.add(new ItemDto(item_tool_coordinate, "工具坐标", "DB1.D766")); + list.add(new ItemDto(item_batch, "批次", "DB1.D522")); + list.add(new ItemDto(item_specifications, "规格", "DB1.D526")); return list; } @@ -810,68 +135,6 @@ public class ItemProtocol { ArrayList list = new ArrayList(); list.add(new ItemDto(item_to_feedback, "机器人动作反馈", "DB2.B0")); list.add(new ItemDto(item_to_error, "故障代码", "DB2.B1")); - list.add(new ItemDto(item_to_materialQty, "托盘砖数量", "DB2.W2")); - list.add(new ItemDto(item_to_material_type, "箱型", "DB2.W4")); - list.add(new ItemDto(item_to_material_code, "下发物料编号", "DB2.S6")); - - list.add(new ItemDto(item_to_product_code, "产品编号", "DB2.D262")); - list.add(new ItemDto(item_to_AlongSide, "A长边", "DB2.D266")); - list.add(new ItemDto(item_to_BshortSide, "B短边", "DB2.D270")); - list.add(new ItemDto(item_to_Htrapezoidal, "H梯形高", "DB2.D274")); - list.add(new ItemDto(item_to_Wthickness, "W厚度", "DB2.D278")); - list.add(new ItemDto(item_to_tray_qty, "当前垛盘数", "DB2.D282")); - list.add(new ItemDto(item_to_tray_high, "垛盘高度", "DB2.D286")); - list.add(new ItemDto(item_to_crib_category, "垛型类别", "DB2.D290")); - list.add(new ItemDto(item_to_palletX1_line, "码垛X1行", "DB2.REAL294")); - list.add(new ItemDto(item_to_palletY1_row, "码垛Y1列", "DB2.REAL298")); - list.add(new ItemDto(item_to_palletA1_angle, "码垛A1角度", "DB2.REAL302")); - list.add(new ItemDto(item_to_palletX2_line, "码垛X2行", "DB2.REAL306")); - list.add(new ItemDto(item_to_palletY2_row, "码垛Y2列", "DB2.REAL310")); - list.add(new ItemDto(item_to_palletA2_angle, "码垛A2角度", "DB2.REAL314")); - list.add(new ItemDto(item_to_palletX3_line, "码垛X3行", "DB2.REAL318")); - list.add(new ItemDto(item_to_palletY3_row, "码垛Y3列", "DB2.REAL322")); - list.add(new ItemDto(item_to_palletA3_angle, "码垛A3角度", "DB2.REAL326")); - list.add(new ItemDto(item_to_pressCribX1_line, "压垛X1行", "DB2.REAL330")); - list.add(new ItemDto(item_to_pressCribY1_row, "压垛Y1列", "DB2.REAL334")); - list.add(new ItemDto(item_to_pressCribA1_angle, "压垛A1角度", "DB2.REAL338")); - list.add(new ItemDto(item_to_pressCribX2_line, "压垛X2行", "DB2.REAL342")); - list.add(new ItemDto(item_to_pressCribY2_row, "压垛Y2列", "DB2.REAL346")); - list.add(new ItemDto(item_to_pressCribA2_angle, "压垛A2角度", "DB2.REAL350")); - list.add(new ItemDto(item_to_pressCribX3_line, "压垛X3行", "DB2.REAL354")); - list.add(new ItemDto(item_to_pressCribY3_row, "压垛Y3列", "DB2.REAL358")); - list.add(new ItemDto(item_to_pressCribA3_angle, "压垛A3角度", "DB2.REAL362")); - list.add(new ItemDto(item_to_Zoffset, "Z轴偏移", "DB2.REAL366")); - list.add(new ItemDto(item_to_pallet_layerQty, "码垛层数", "DB2.D370")); - list.add(new ItemDto(item_to_pressCrib_layerQty, "压垛层数", "DB2.D374")); - list.add(new ItemDto(item_to_codeLayerX1_interval, "码层X1间隔", "DB2.REAL378")); - list.add(new ItemDto(item_to_codeLayerY1_interval, "码层Y1间隔", "DB2.REAL382")); - list.add(new ItemDto(item_to_codeLayerX2_interval, "码层X2间隔", "DB2.REAL386")); - list.add(new ItemDto(item_to_codeLayerY2_interval, "码层Y2间隔", "DB2.REAL390")); - list.add(new ItemDto(item_to_codeLayerX3_interval, "码层X3间隔", "DB2.REAL394")); - list.add(new ItemDto(item_to_codeLayerY3_interval, "码层Y3间隔", "DB2.REAL398")); - list.add(new ItemDto(item_to_codeLayerX1_offset, "码层X1偏移", "DB2.REAL402")); - list.add(new ItemDto(item_to_codeLayerY1_offset, "码层Y1偏移", "DB2.REAL406")); - list.add(new ItemDto(item_to_codeLayerX2_offset, "码层X2偏移", "DB2.REAL410")); - list.add(new ItemDto(item_to_codeLayerY2_offset, "码层Y2偏移", "DB2.REAL414")); - list.add(new ItemDto(item_to_codeLayerX3_offset, "码层X3偏移", "DB2.REAL418")); - list.add(new ItemDto(item_to_codeLayerY3_offset, "码层Y3偏移", "DB2.REAL422")); - list.add(new ItemDto(item_to_pressLayerX1_interval, "压层X1间隔", "DB2.REAL426")); - list.add(new ItemDto(item_to_pressLayerY1_interval, "压层Y1间隔", "DB2.REAL430")); - list.add(new ItemDto(item_to_pressLayerX2_interval, "压层X2间隔", "DB2.REAL434")); - list.add(new ItemDto(item_to_pressLayerY2_interval, "压层Y2间隔", "DB2.REAL438")); - list.add(new ItemDto(item_to_pressLayerX3_interval, "压层X3间隔", "DB2.REAL442")); - list.add(new ItemDto(item_to_pressLayerY3_interval, "压层Y3间隔", "DB2.REAL446")); - list.add(new ItemDto(item_to_pressLayerX1_offset, "压层X1偏移", "DB2.REAL450")); - list.add(new ItemDto(item_to_pressLayerY1_offset, "压层Y1偏移", "DB2.REAL454")); - list.add(new ItemDto(item_to_pressLayerX2_offset, "压层X2偏移", "DB2.REAL458")); - list.add(new ItemDto(item_to_pressLayerY2_offset, "压层Y2偏移", "DB2.REAL462")); - list.add(new ItemDto(item_to_pressLayerX3_offset, "压层X3偏移", "DB2.REAL466")); - list.add(new ItemDto(item_to_pressLayerY3_offset, "压层Y3偏移", "DB2.REAL470")); - list.add(new ItemDto(item_to_one_cribTotal, "1#垛总数", "DB2.D474")); - list.add(new ItemDto(item_to_two_cribTotal, "2#垛总数", "DB2.D478")); - list.add(new ItemDto(item_to_one_qty, "1#垛当前数", "DB2.D482")); - list.add(new ItemDto(item_to_two_qty, "2#垛当前数", "DB2.D486")); - list.add(new ItemDto(item_to_tool_coordinate, "工具坐标", "DB2.D490")); return list; } diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/LnshPalletizingManipulatorDefination.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/LnshPalletizingManipulatorDefination.java index 421ef12..a2c57be 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/LnshPalletizingManipulatorDefination.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/LnshPalletizingManipulatorDefination.java @@ -63,72 +63,10 @@ public class LnshPalletizingManipulatorDefination implements OpcDeviceDriverDefi list.add(new ItemDto(ItemProtocol.item_action, "动作", "DB1.B3")); list.add(new ItemDto(ItemProtocol.item_error, "故障代码", "DB1.B4")); list.add(new ItemDto(ItemProtocol.item_put_station, "当前码盘工位", "DB1.B5")); - list.add(new ItemDto(ItemProtocol.item_barcode, "当前码盘工位条码", "DB1.S6")); list.add(new ItemDto(ItemProtocol.item_material, "码盘工位当前物料", "DB1.S262")); list.add(new ItemDto(ItemProtocol.item_encoder_qty, "码盘位当前码盘数量", "DB1.D518")); - list.add(new ItemDto(ItemProtocol.item_open_time, "开机时间", "DB1.D522")); - list.add(new ItemDto(ItemProtocol.item_standby_time, "待机时间", "DB1.D526")); - list.add(new ItemDto(ItemProtocol.item_production_time, "生产时间", "DB1.D530")); - list.add(new ItemDto(ItemProtocol.item_error_time, "故障时间", "DB1.D534")); - - list.add(new ItemDto(ItemProtocol.item_product_code, "产品编号", "DB1.D538")); - list.add(new ItemDto(ItemProtocol.item_AlongSide, "A长边", "DB1.D542")); - list.add(new ItemDto(ItemProtocol.item_BshortSide, "B短边", "DB1.D546")); - list.add(new ItemDto(ItemProtocol.item_Htrapezoidal, "H梯形高", "DB1.D550")); - list.add(new ItemDto(ItemProtocol.item_Wthickness, "W厚度", "DB1.D554")); - list.add(new ItemDto(ItemProtocol.item_tray_qty, "当前垛盘数", "DB1.D558")); - list.add(new ItemDto(ItemProtocol.item_tray_high, "垛盘高度", "DB1.D562")); - list.add(new ItemDto(ItemProtocol.item_crib_category, "垛型类别", "DB1.D566")); - list.add(new ItemDto(ItemProtocol.item_palletX1_line, "码垛X1行", "DB1.REAL570")); - list.add(new ItemDto(ItemProtocol.item_palletY1_row, "码垛Y1列", "DB1.REAL1574")); - list.add(new ItemDto(ItemProtocol.item_palletA1_angle, "码垛A1角度", "DB1.REAL578")); - list.add(new ItemDto(ItemProtocol.item_palletX2_line, "码垛X2行", "DB1.REAL582")); - list.add(new ItemDto(ItemProtocol.item_palletY2_row, "码垛Y2列", "DB1.REAL586")); - list.add(new ItemDto(ItemProtocol.item_palletA2_angle, "码垛A2角度", "DB1.REAL590")); - list.add(new ItemDto(ItemProtocol.item_palletX3_line, "码垛X3行", "DB1.REAL594")); - list.add(new ItemDto(ItemProtocol.item_palletY3_row, "码垛Y3列", "DB1.REAL598")); - list.add(new ItemDto(ItemProtocol.item_palletA3_angle, "码垛A3角度", "DB1.REAL602")); - list.add(new ItemDto(ItemProtocol.item_pressCribX1_line, "压垛X1行", "DB1.REAL606")); - list.add(new ItemDto(ItemProtocol.item_pressCribY1_row, "压垛Y1列", "DB1.REAL610")); - list.add(new ItemDto(ItemProtocol.item_pressCribA1_angle, "压垛A1角度", "DB1.REAL614")); - list.add(new ItemDto(ItemProtocol.item_pressCribX2_line, "压垛X2行", "DB1.REAL618")); - list.add(new ItemDto(ItemProtocol.item_pressCribY2_row, "压垛Y2列", "DB1.REAL622")); - list.add(new ItemDto(ItemProtocol.item_pressCribA2_angle, "压垛A2角度", "DB1.REAL626")); - list.add(new ItemDto(ItemProtocol.item_pressCribX3_line, "压垛X3行", "DB1.REAL630")); - list.add(new ItemDto(ItemProtocol.item_pressCribY3_row, "压垛Y3列", "DB1.REAL634")); - list.add(new ItemDto(ItemProtocol.item_pressCribA3_angle, "压垛A3角度", "DB1.REAL638")); - list.add(new ItemDto(ItemProtocol.item_Zoffset, "Z轴偏移", "DB1.REAL642")); - list.add(new ItemDto(ItemProtocol.item_pallet_layerQty, "码垛层数", "DB1.D646")); - list.add(new ItemDto(ItemProtocol.item_pressCrib_layerQty, "压垛层数", "DB1.D650")); - list.add(new ItemDto(ItemProtocol.item_codeLayerX1_interval, "码层X1间隔", "DB1.REAL654")); - list.add(new ItemDto(ItemProtocol.item_codeLayerY1_interval, "码层Y1间隔", "DB1.REAL658")); - list.add(new ItemDto(ItemProtocol.item_codeLayerX2_interval, "码层X2间隔", "DB1.REAL662")); - list.add(new ItemDto(ItemProtocol.item_codeLayerY2_interval, "码层Y2间隔", "DB1.REAL666")); - list.add(new ItemDto(ItemProtocol.item_codeLayerX3_interval, "码层X3间隔", "DB1.REAL670")); - list.add(new ItemDto(ItemProtocol.item_codeLayerY3_interval, "码层Y3间隔", "DB1.REAL674")); - list.add(new ItemDto(ItemProtocol.item_codeLayerX1_offset, "码层X1偏移", "DB1.REAL678")); - list.add(new ItemDto(ItemProtocol.item_codeLayerY1_offset, "码层Y1偏移", "DB1.REAL682")); - list.add(new ItemDto(ItemProtocol.item_codeLayerX2_offset, "码层X2偏移", "DB1.REAL686")); - list.add(new ItemDto(ItemProtocol.item_codeLayerY2_offset, "码层Y2偏移", "DB1.REAL690")); - list.add(new ItemDto(ItemProtocol.item_codeLayerX3_offset, "码层X3偏移", "DB1.REAL694")); - list.add(new ItemDto(ItemProtocol.item_codeLayerY3_offset, "码层Y3偏移", "DB1.REAL698")); - list.add(new ItemDto(ItemProtocol.item_pressLayerX1_interval, "压层X1间隔", "DB1.REAL702")); - list.add(new ItemDto(ItemProtocol.item_pressLayerY1_interval, "压层Y1间隔", "DB1.REAL706")); - list.add(new ItemDto(ItemProtocol.item_pressLayerX2_interval, "压层X2间隔", "DB1.REAL710")); - list.add(new ItemDto(ItemProtocol.item_pressLayerY2_interval, "压层Y2间隔", "DB1.REAL714")); - list.add(new ItemDto(ItemProtocol.item_pressLayerX3_interval, "压层X3间隔", "DB1.REAL718")); - list.add(new ItemDto(ItemProtocol.item_pressLayerY3_interval, "压层Y3间隔", "DB1.REAL722")); - list.add(new ItemDto(ItemProtocol.item_pressLayerX1_offset, "压层X1偏移", "DB1.REAL726")); - list.add(new ItemDto(ItemProtocol.item_pressLayerY1_offset, "压层Y1偏移", "DB1.REAL730")); - list.add(new ItemDto(ItemProtocol.item_pressLayerX2_offset, "压层X2偏移", "DB1.REAL734")); - list.add(new ItemDto(ItemProtocol.item_pressLayerY2_offset, "压层Y2偏移", "DB1.REAL738")); - list.add(new ItemDto(ItemProtocol.item_pressLayerX3_offset, "压层X3偏移", "DB1.REAL742")); - list.add(new ItemDto(ItemProtocol.item_pressLayerY3_offset, "压层Y3偏移", "DB1.REAL746")); - list.add(new ItemDto(ItemProtocol.item_one_cribTotal, "1#垛总数", "DB1.D750")); - list.add(new ItemDto(ItemProtocol.item_two_cribTotal, "2#垛总数", "DB1.D754")); - list.add(new ItemDto(ItemProtocol.item_one_qty, "1#垛当前数", "DB1.D758")); - list.add(new ItemDto(ItemProtocol.item_two_qty, "2#垛当前数", "DB1.D762")); - list.add(new ItemDto(ItemProtocol.item_tool_coordinate, "工具坐标", "DB1.D766")); + list.add(new ItemDto(ItemProtocol.item_batch, "批次", "DB1.D522")); + list.add(new ItemDto(ItemProtocol.item_specifications, "规格", "DB1.D526")); return list; } diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/LnshPalletizingManipulatorDeviceDriver.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/LnshPalletizingManipulatorDeviceDriver.java index b2e41cd..ed200ac 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/LnshPalletizingManipulatorDeviceDriver.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/LnshPalletizingManipulatorDeviceDriver.java @@ -89,146 +89,19 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri String device_code; int status = 0; int last_status = 0; - //开机时间 - int open_time = 0; - int last_open_time = 0; - //待机时间 - int standby_time = 0; - int last_standby_time = 0; - //生产时间 - int production_time = 0; - int last_production_time = 0; - //故障时间 - int error_time = 0; - int last_error_time = 0; int put_station = 0; int last_put_station = 0; - String barcode; - String last_barcode; + //批次 + int batch = 0; + int last_batch = 0; + //规格 + String specifications = ""; + String last_specifications = ""; String material; String last_material; int encoder_qty = 0; int last_encoder_qty = 0; - //垛型参数 - int product_code = 0; - int AlongSide = 0; - int BshortSide = 0; - int Htrapezoidal = 0; - int Wthickness = 0; - int tray_qty = 0; - int tray_high = 0; - int crib_category = 0; - float palletX1_line = 0f; - float palletY1_row = 0f; - float palletA1_angle = 0f; - float palletX2_line = 0f; - float palletY2_row = 0f; - float palletA2_angle = 0f; - float palletX3_line = 0f; - float palletY3_row = 0f; - float palletA3_angle = 0f; - float pressCribX1_line = 0f; - float pressCribY1_row = 0f; - float pressCribA1_angle = 0f; - float pressCribX2_line = 0f; - float pressCribY2_row = 0f; - float pressCribA2_angle = 0f; - float pressCribX3_line = 0f; - float pressCribY3_row = 0f; - float pressCribA3_angle = 0f; - float Zoffset = 0f; - int pallet_layerQty = 0; - int pressCrib_layerQty = 0; - float codeLayerX1_interval = 0f; - float codeLayerY1_interval = 0f; - float codeLayerX2_interval = 0f; - float codeLayerY2_interval = 0f; - float codeLayerX3_interval = 0f; - float codeLayerY3_interval = 0f; - float codeLayerX1_offset = 0f; - float codeLayerY1_offset = 0f; - float codeLayerX2_offset = 0f; - float codeLayerY2_offset = 0f; - float codeLayerX3_offset = 0f; - float codeLayerY3_offset = 0f; - float pressLayerX1_interval = 0f; - float pressLayerY1_interval = 0f; - float pressLayerX2_interval = 0f; - float pressLayerY2_interval = 0f; - float pressLayerX3_interval = 0f; - float pressLayerY3_interval = 0f; - float pressLayerX1_offset = 0f; - float pressLayerY1_offset = 0f; - float pressLayerX2_offset = 0f; - float pressLayerY2_offset = 0f; - float pressLayerX3_offset = 0f; - float pressLayerY3_offset = 0f; - int one_cribTotal = 0; - int two_cribTotal = 0; - int one_qty = 0; - int two_qty = 0; - int tool_coordinate = 0; - - int last_product_code = 0; - int last_AlongSide = 0; - int last_BshortSide = 0; - int last_Htrapezoidal = 0; - int last_Wthickness = 0; - int last_tray_qty = 0; - int last_tray_high = 0; - int last_crib_category = 0; - float last_palletX1_line = 0f; - float last_palletY1_row = 0f; - float last_palletA1_angle = 0f; - float last_palletX2_line = 0f; - float last_palletY2_row = 0f; - float last_palletA2_angle = 0f; - float last_palletX3_line = 0f; - float last_palletY3_row = 0f; - float last_palletA3_angle = 0f; - float last_pressCribX1_line = 0f; - float last_pressCribY1_row = 0f; - float last_pressCribA1_angle = 0f; - float last_pressCribX2_line = 0f; - float last_pressCribY2_row = 0f; - float last_pressCribA2_angle = 0f; - float last_pressCribX3_line = 0f; - float last_pressCribY3_row = 0f; - float last_pressCribA3_angle = 0f; - float last_Zoffset = 0f; - int last_pallet_layerQty = 0; - int last_pressCrib_layerQty = 0; - float last_codeLayerX1_interval = 0f; - float last_codeLayerY1_interval = 0f; - float last_codeLayerX2_interval = 0f; - float last_codeLayerY2_interval = 0f; - float last_codeLayerX3_interval = 0f; - float last_codeLayerY3_interval = 0f; - float last_codeLayerX1_offset = 0f; - float last_codeLayerY1_offset = 0f; - float last_codeLayerX2_offset = 0f; - float last_codeLayerY2_offset = 0f; - float last_codeLayerX3_offset = 0f; - float last_codeLayerY3_offset = 0f; - float last_pressLayerX1_interval = 0f; - float last_pressLayerY1_interval = 0f; - float last_pressLayerX2_interval = 0f; - float last_pressLayerY2_interval = 0f; - float last_pressLayerX3_interval = 0f; - float last_pressLayerY3_interval = 0f; - float last_pressLayerX1_offset = 0f; - float last_pressLayerY1_offset = 0f; - float last_pressLayerX2_offset = 0f; - float last_pressLayerY2_offset = 0f; - float last_pressLayerX3_offset = 0f; - float last_pressLayerY3_offset = 0f; - int last_one_cribTotal = 0; - int last_two_cribTotal = 0; - int last_one_qty = 0; - int last_two_qty = 0; - int last_tool_coordinate = 0; - @Override public Device getDevice() { return this.device; @@ -245,13 +118,10 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri action = this.itemProtocol.getAction(); error = this.itemProtocol.getError(); put_station = this.itemProtocol.getPut_station(); - barcode = this.itemProtocol.getBarcode(); material = this.itemProtocol.getMaterial(); - open_time = this.itemProtocol.getOpen_time(); - standby_time = this.itemProtocol.getStandby_time(); - production_time = this.itemProtocol.getProduction_time(); - error_time = this.itemProtocol.getError_time(); encoder_qty = this.itemProtocol.getEncoder_qty(); + batch = this.itemProtocol.getBatch(); + specifications = this.itemProtocol.getSpecifications(); if (mode != last_mode) { this.setRequireSucess(false); @@ -278,262 +148,18 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri logServer.deviceLog(this.device_code,"encoder_qty" ,String.valueOf(encoder_qty)); logServer.deviceLogToacs(this.device_code,"","","信号encoder_qty:" + last_encoder_qty + "->" + encoder_qty); } - if (open_time != last_open_time) { - logServer.deviceLog(this.device_code,"open_time" ,String.valueOf(open_time)); - logServer.deviceLogToacs(this.device_code,"","","信号open_time:" + last_open_time + "->" + open_time); + if (batch != last_batch) { + logServer.deviceLog(this.device_code,"batch" ,String.valueOf(batch)); + logServer.deviceLogToacs(this.device_code,"","","信号batch:" + last_batch + "->" + batch); } - if (standby_time != last_standby_time) { - logServer.deviceLog(this.device_code,"standby_time" ,String.valueOf(standby_time)); - logServer.deviceLogToacs(this.device_code,"","","信号standby_time:" + last_standby_time + "->" + standby_time); - } - if (production_time != last_production_time) { - logServer.deviceLog(this.device_code,"production_time" ,String.valueOf(production_time)); - logServer.deviceLogToacs(this.device_code,"","","信号production_time:" + last_production_time + "->" + production_time); - } - if (error_time != last_error_time) { - logServer.deviceLog(this.device_code,"error_time" ,String.valueOf(error_time)); - logServer.deviceLogToacs(this.device_code,"","","信号error_time:" + last_error_time + "->" + error_time); - } - if (!StrUtil.equals(barcode,last_barcode)) { - logServer.deviceLog(this.device_code,"barcode", barcode); - logServer.deviceLogToacs(this.device_code,"","","信号barcode:" + last_barcode + "->" + barcode); + if (!StrUtil.equals(specifications,last_specifications)) { + logServer.deviceLog(this.device_code,"specifications", specifications); + logServer.deviceLogToacs(this.device_code,"","","信号specifications:" + last_specifications + "->" + specifications); } if (!StrUtil.equals(material,last_material)) { logServer.deviceLog(this.device_code,"material", material); logServer.deviceLogToacs(this.device_code,"","","信号material:" + last_material + "->" + material); } - if (product_code != last_product_code) { - logServer.deviceLog(this.device_code,"product_code" ,String.valueOf(product_code)); - logServer.deviceLogToacs(this.device_code,"","","信号product_code:" + last_product_code + "->" + product_code); - } - if (AlongSide != last_AlongSide) { - logServer.deviceLog(this.device_code,"AlongSide" ,String.valueOf(AlongSide)); - logServer.deviceLogToacs(this.device_code,"","","信号AlongSide:" + last_AlongSide + "->" + AlongSide); - } - if (BshortSide != last_BshortSide) { - logServer.deviceLog(this.device_code,"BshortSide" ,String.valueOf(BshortSide)); - logServer.deviceLogToacs(this.device_code,"","","信号BshortSide:" + last_BshortSide + "->" + BshortSide); - } - if (Htrapezoidal != last_Htrapezoidal) { - logServer.deviceLog(this.device_code,"Htrapezoidal" ,String.valueOf(Htrapezoidal)); - logServer.deviceLogToacs(this.device_code,"","","信号Htrapezoidal:" + last_Htrapezoidal + "->" + Htrapezoidal); - } - if (Wthickness != last_Wthickness) { - logServer.deviceLog(this.device_code,"Wthickness" ,String.valueOf(Wthickness)); - logServer.deviceLogToacs(this.device_code,"","","信号Wthickness:" + last_Wthickness + "->" + Wthickness); - } - if (tray_qty != last_tray_qty) { - logServer.deviceLog(this.device_code,"tray_qty" ,String.valueOf(tray_qty)); - logServer.deviceLogToacs(this.device_code,"","","信号tray_qty:" + last_tray_qty + "->" + tray_qty); - } - if (tray_high != last_tray_high) { - logServer.deviceLog(this.device_code,"tray_high" ,String.valueOf(tray_high)); - logServer.deviceLogToacs(this.device_code,"","","信号tray_high:" + last_tray_high + "->" + tray_high); - } - if (crib_category != last_crib_category) { - logServer.deviceLog(this.device_code,"crib_category" ,String.valueOf(crib_category)); - logServer.deviceLogToacs(this.device_code,"","","信号crib_category:" + last_crib_category + "->" + crib_category); - } - if (palletX1_line != last_palletX1_line) { - logServer.deviceLog(this.device_code,"palletX1_line" ,String.valueOf(palletX1_line)); - logServer.deviceLogToacs(this.device_code,"","","信号palletX1_line:" + last_palletX1_line + "->" + palletX1_line); - } - if (palletY1_row != last_palletY1_row) { - logServer.deviceLog(this.device_code,"palletY1_row" ,String.valueOf(palletY1_row)); - logServer.deviceLogToacs(this.device_code,"","","信号palletY1_row:" + last_palletY1_row + "->" + palletY1_row); - } - if (palletA1_angle != last_palletA1_angle) { - logServer.deviceLog(this.device_code,"palletA1_angle" ,String.valueOf(palletA1_angle)); - logServer.deviceLogToacs(this.device_code,"","","信号palletA1_angle:" + last_palletA1_angle + "->" + palletA1_angle); - } - if (palletX2_line != last_palletX2_line) { - logServer.deviceLog(this.device_code,"palletX2_line" ,String.valueOf(palletX2_line)); - logServer.deviceLogToacs(this.device_code,"","","信号palletX2_line:" + last_palletX2_line + "->" + palletX2_line); - } - if (palletY2_row != last_palletY2_row) { - logServer.deviceLog(this.device_code,"palletY2_row" ,String.valueOf(palletY2_row)); - logServer.deviceLogToacs(this.device_code,"","","信号palletY2_row:" + last_palletY2_row + "->" + palletY2_row); - } - if (palletA2_angle != last_palletA2_angle) { - logServer.deviceLog(this.device_code,"palletA2_angle" ,String.valueOf(palletA2_angle)); - logServer.deviceLogToacs(this.device_code,"","","信号palletA2_angle:" + last_palletA2_angle + "->" + palletA2_angle); - } - if (palletX3_line != last_palletX3_line) { - logServer.deviceLog(this.device_code,"palletX3_line" ,String.valueOf(palletX3_line)); - logServer.deviceLogToacs(this.device_code,"","","信号palletX3_line:" + last_palletX3_line + "->" + palletX3_line); - } - if (palletY3_row != last_palletY3_row) { - logServer.deviceLog(this.device_code,"palletY3_row" ,String.valueOf(palletY3_row)); - logServer.deviceLogToacs(this.device_code,"","","信号palletY3_row:" + last_palletY3_row + "->" + palletY3_row); - } - if (palletA3_angle != last_palletA3_angle) { - logServer.deviceLog(this.device_code,"palletA3_angle" ,String.valueOf(palletA3_angle)); - logServer.deviceLogToacs(this.device_code,"","","信号palletA3_angle:" + last_palletA3_angle + "->" + palletA3_angle); - } - if (pressCribX1_line != last_pressCribX1_line) { - logServer.deviceLog(this.device_code,"pressCribX1_line" ,String.valueOf(pressCribX1_line)); - logServer.deviceLogToacs(this.device_code,"","","信号pressCribX1_line:" + last_pressCribX1_line + "->" + pressCribX1_line); - } - if (pressCribY1_row != last_pressCribY1_row) { - logServer.deviceLog(this.device_code,"pressCribY1_row" ,String.valueOf(pressCribY1_row)); - logServer.deviceLogToacs(this.device_code,"","","信号pressCribY1_row:" + last_pressCribY1_row + "->" + pressCribY1_row); - } - if (pressCribA1_angle != last_pressCribA1_angle) { - logServer.deviceLog(this.device_code,"pressCribA1_angle" ,String.valueOf(pressCribA1_angle)); - logServer.deviceLogToacs(this.device_code,"","","信号pressCribA1_angle:" + last_pressCribA1_angle + "->" + pressCribA1_angle); - } - if (pressCribX2_line != last_pressCribX2_line) { - logServer.deviceLog(this.device_code,"pressCribX2_line" ,String.valueOf(pressCribX2_line)); - logServer.deviceLogToacs(this.device_code,"","","信号pressCribX2_line:" + last_pressCribX2_line + "->" + pressCribX2_line); - } - if (pressCribY2_row != last_pressCribY2_row) { - logServer.deviceLog(this.device_code,"pressCribY2_row" ,String.valueOf(pressCribY2_row)); - logServer.deviceLogToacs(this.device_code,"","","信号pressCribY2_row:" + last_pressCribY2_row + "->" + pressCribY2_row); - } - if (pressCribA2_angle != last_pressCribA2_angle) { - logServer.deviceLog(this.device_code,"pressCribA2_angle" ,String.valueOf(pressCribA2_angle)); - logServer.deviceLogToacs(this.device_code,"","","信号pressCribA2_angle:" + last_pressCribA2_angle + "->" + pressCribA2_angle); - } - if (pressCribX3_line != last_pressCribX3_line) { - logServer.deviceLog(this.device_code,"pressCribX3_line" ,String.valueOf(pressCribX3_line)); - logServer.deviceLogToacs(this.device_code,"","","信号pressCribX3_line:" + last_pressCribX3_line + "->" + pressCribX3_line); - } - if (pressCribY3_row != last_pressCribY3_row) { - logServer.deviceLog(this.device_code,"pressCribY3_row" ,String.valueOf(pressCribY3_row)); - logServer.deviceLogToacs(this.device_code,"","","信号pressCribY3_row:" + last_pressCribY3_row + "->" + pressCribY3_row); - } - if (pressCribA3_angle != last_pressCribA3_angle) { - logServer.deviceLog(this.device_code,"pressCribA3_angle" ,String.valueOf(pressCribA3_angle)); - logServer.deviceLogToacs(this.device_code,"","","信号pressCribA3_angle:" + last_pressCribA3_angle + "->" + pressCribA3_angle); - } - if (Zoffset != last_Zoffset) { - logServer.deviceLog(this.device_code,"Zoffset" ,String.valueOf(Zoffset)); - logServer.deviceLogToacs(this.device_code,"","","信号Zoffset:" + last_Zoffset + "->" + Zoffset); - } - if (pallet_layerQty != last_pallet_layerQty) { - logServer.deviceLog(this.device_code,"pallet_layerQty" ,String.valueOf(pallet_layerQty)); - logServer.deviceLogToacs(this.device_code,"","","信号pallet_layerQty:" + last_pallet_layerQty + "->" + pallet_layerQty); - } - if (pressCrib_layerQty != last_pressCrib_layerQty) { - logServer.deviceLog(this.device_code,"pressCrib_layerQty" ,String.valueOf(pressCrib_layerQty)); - logServer.deviceLogToacs(this.device_code,"","","信号pressCrib_layerQty:" + last_pressCrib_layerQty + "->" + pressCrib_layerQty); - } - if (codeLayerX1_interval != last_codeLayerX1_interval) { - logServer.deviceLog(this.device_code,"codeLayerX1_interval" ,String.valueOf(codeLayerX1_interval)); - logServer.deviceLogToacs(this.device_code,"","","信号codeLayerX1_interval:" + last_codeLayerX1_interval + "->" + codeLayerX1_interval); - } - if (codeLayerY1_interval != last_codeLayerY1_interval) { - logServer.deviceLog(this.device_code,"codeLayerY1_interval" ,String.valueOf(codeLayerY1_interval)); - logServer.deviceLogToacs(this.device_code,"","","信号codeLayerY1_interval:" + last_codeLayerY1_interval + "->" + codeLayerY1_interval); - } - if (codeLayerX2_interval != last_codeLayerX2_interval) { - logServer.deviceLog(this.device_code,"codeLayerX2_interval" ,String.valueOf(codeLayerX2_interval)); - logServer.deviceLogToacs(this.device_code,"","","信号codeLayerX2_interval:" + last_codeLayerX2_interval + "->" + codeLayerX2_interval); - } - if (codeLayerY2_interval != last_codeLayerY2_interval) { - logServer.deviceLog(this.device_code,"codeLayerY2_interval" ,String.valueOf(codeLayerY2_interval)); - logServer.deviceLogToacs(this.device_code,"","","信号codeLayerY2_interval:" + last_codeLayerY2_interval + "->" + codeLayerY2_interval); - } - if (codeLayerX3_interval != last_codeLayerX3_interval) { - logServer.deviceLog(this.device_code,"codeLayerX3_interval" ,String.valueOf(codeLayerX3_interval)); - logServer.deviceLogToacs(this.device_code,"","","信号codeLayerX3_interval:" + last_codeLayerX3_interval + "->" + codeLayerX3_interval); - } - if (codeLayerY3_interval != last_codeLayerY3_interval) { - logServer.deviceLog(this.device_code,"codeLayerY3_interval" ,String.valueOf(codeLayerY3_interval)); - logServer.deviceLogToacs(this.device_code,"","","信号codeLayerY3_interval:" + last_codeLayerY3_interval + "->" + codeLayerY3_interval); - } - if (codeLayerX1_offset != last_codeLayerX1_offset) { - logServer.deviceLog(this.device_code,"codeLayerX1_offset" ,String.valueOf(codeLayerX1_offset)); - logServer.deviceLogToacs(this.device_code,"","","信号codeLayerX1_offset:" + last_codeLayerX1_offset + "->" + codeLayerX1_offset); - } - if (codeLayerY1_offset != last_codeLayerY1_offset) { - logServer.deviceLog(this.device_code,"codeLayerY1_offset" ,String.valueOf(codeLayerY1_offset)); - logServer.deviceLogToacs(this.device_code,"","","信号codeLayerY1_offset:" + last_codeLayerY1_offset + "->" + codeLayerY1_offset); - } - if (codeLayerX2_offset != last_codeLayerX2_offset) { - logServer.deviceLog(this.device_code,"codeLayerX2_offset" ,String.valueOf(codeLayerX2_offset)); - logServer.deviceLogToacs(this.device_code,"","","信号codeLayerX2_offset:" + last_codeLayerX2_offset + "->" + codeLayerX2_offset); - } - if (codeLayerY2_offset != last_codeLayerY2_offset) { - logServer.deviceLog(this.device_code,"codeLayerY2_offset" ,String.valueOf(codeLayerY2_offset)); - logServer.deviceLogToacs(this.device_code,"","","信号codeLayerY2_offset:" + last_codeLayerY2_offset + "->" + codeLayerY2_offset); - } - if (codeLayerX3_offset != last_codeLayerX3_offset) { - logServer.deviceLog(this.device_code,"codeLayerX3_offset" ,String.valueOf(codeLayerX3_offset)); - logServer.deviceLogToacs(this.device_code,"","","信号codeLayerX3_offset:" + last_codeLayerX3_offset + "->" + codeLayerX3_offset); - } - if (codeLayerY3_offset != last_codeLayerY3_offset) { - logServer.deviceLog(this.device_code,"codeLayerY3_offset" ,String.valueOf(codeLayerY3_offset)); - logServer.deviceLogToacs(this.device_code,"","","信号codeLayerY3_offset:" + last_codeLayerY3_offset + "->" + codeLayerY3_offset); - } - if (pressLayerX1_interval != last_pressLayerX1_interval) { - logServer.deviceLog(this.device_code,"pressLayerX1_interval" ,String.valueOf(pressLayerX1_interval)); - logServer.deviceLogToacs(this.device_code,"","","信号pressLayerX1_interval:" + last_pressLayerX1_interval + "->" + pressLayerX1_interval); - } - if (pressLayerY1_interval != last_pressLayerY1_interval) { - logServer.deviceLog(this.device_code,"pressLayerY1_interval" ,String.valueOf(pressLayerY1_interval)); - logServer.deviceLogToacs(this.device_code,"","","信号pressLayerY1_interval:" + last_pressLayerY1_interval + "->" + pressLayerY1_interval); - } - if (pressLayerX2_interval != last_pressLayerX2_interval) { - logServer.deviceLog(this.device_code,"pressLayerX2_interval" ,String.valueOf(pressLayerX2_interval)); - logServer.deviceLogToacs(this.device_code,"","","信号pressLayerX2_interval:" + last_pressLayerX2_interval + "->" + pressLayerX2_interval); - } - if (pressLayerY2_interval != last_pressLayerY2_interval) { - logServer.deviceLog(this.device_code,"pressLayerY2_interval" ,String.valueOf(pressLayerY2_interval)); - logServer.deviceLogToacs(this.device_code,"","","信号pressLayerY2_interval:" + last_pressLayerY2_interval + "->" + pressLayerY2_interval); - } - if (pressLayerX3_interval != last_pressLayerX3_interval) { - logServer.deviceLog(this.device_code,"pressLayerX3_interval" ,String.valueOf(pressLayerX3_interval)); - logServer.deviceLogToacs(this.device_code,"","","信号pressLayerX3_interval:" + last_pressLayerX3_interval + "->" + pressLayerX3_interval); - } - if (pressLayerY3_interval != last_pressLayerY3_interval) { - logServer.deviceLog(this.device_code,"pressLayerY3_interval" ,String.valueOf(pressLayerY3_interval)); - logServer.deviceLogToacs(this.device_code,"","","信号pressLayerY3_interval:" + last_pressLayerY3_interval + "->" + pressLayerY3_interval); - } - if (pressLayerX1_offset != last_pressLayerX1_offset) { - logServer.deviceLog(this.device_code,"pressLayerX1_offset" ,String.valueOf(pressLayerX1_offset)); - logServer.deviceLogToacs(this.device_code,"","","信号pressLayerX1_offset:" + last_pressLayerX1_offset + "->" + pressLayerX1_offset); - } - if (pressLayerY1_offset != last_pressLayerY1_offset) { - logServer.deviceLog(this.device_code,"pressLayerY1_offset" ,String.valueOf(pressLayerY1_offset)); - logServer.deviceLogToacs(this.device_code,"","","信号pressLayerY1_offset:" + last_pressLayerY1_offset + "->" + pressLayerY1_offset); - } - if (pressLayerX2_offset != last_pressLayerX2_offset) { - logServer.deviceLog(this.device_code,"pressLayerX2_offset" ,String.valueOf(pressLayerX2_offset)); - logServer.deviceLogToacs(this.device_code,"","","信号pressLayerX2_offset:" + last_pressLayerX2_offset + "->" + pressLayerX2_offset); - } - if (pressLayerY2_offset != last_pressLayerY2_offset) { - logServer.deviceLog(this.device_code,"pressLayerY2_offset" ,String.valueOf(pressLayerY2_offset)); - logServer.deviceLogToacs(this.device_code,"","","信号pressLayerY2_offset:" + last_pressLayerY2_offset + "->" + pressLayerY2_offset); - } - if (pressLayerX3_offset != last_pressLayerX3_offset) { - logServer.deviceLog(this.device_code,"pressLayerX3_offset" ,String.valueOf(pressLayerX3_offset)); - logServer.deviceLogToacs(this.device_code,"","","信号pressLayerX3_offset:" + last_pressLayerX3_offset + "->" + pressLayerX3_offset); - } - if (pressLayerY3_offset != last_pressLayerY3_offset) { - logServer.deviceLog(this.device_code,"pressLayerY3_offset" ,String.valueOf(pressLayerY3_offset)); - logServer.deviceLogToacs(this.device_code,"","","信号pressLayerY3_offset:" + last_pressLayerY3_offset + "->" + pressLayerY3_offset); - } - if (one_cribTotal != last_one_cribTotal) { - logServer.deviceLog(this.device_code,"one_cribTotal" ,String.valueOf(one_cribTotal)); - logServer.deviceLogToacs(this.device_code,"","","信号one_cribTotal:" + last_one_cribTotal + "->" + one_cribTotal); - } - if (two_cribTotal != last_two_cribTotal) { - logServer.deviceLog(this.device_code,"two_cribTotal" ,String.valueOf(two_cribTotal)); - logServer.deviceLogToacs(this.device_code,"","","信号two_cribTotal:" + last_two_cribTotal + "->" + two_cribTotal); - } - if (one_qty != last_one_qty) { - logServer.deviceLog(this.device_code,"one_qty" ,String.valueOf(one_qty)); - logServer.deviceLogToacs(this.device_code,"","","信号one_qty:" + last_one_qty + "->" + one_qty); - } - if (two_qty != last_two_qty) { - logServer.deviceLog(this.device_code,"two_qty" ,String.valueOf(two_qty)); - logServer.deviceLogToacs(this.device_code,"","","信号two_qty:" + last_two_qty + "->" + two_qty); - } - if (tool_coordinate != last_tool_coordinate) { - logServer.deviceLog(this.device_code,"tool_coordinate" ,String.valueOf(tool_coordinate)); - logServer.deviceLogToacs(this.device_code,"","","信号tool_coordinate:" + last_tool_coordinate + "->" + tool_coordinate); - } } catch (Exception var17) { return; @@ -612,73 +238,10 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri last_action = action; last_error = error; last_put_station = put_station; - last_barcode = barcode; last_material = material; last_encoder_qty = encoder_qty; - last_open_time = open_time; - last_standby_time = standby_time; - last_production_time = production_time; - last_error_time = error_time; - - last_product_code = product_code; - last_AlongSide = AlongSide; - last_BshortSide = BshortSide; - last_Htrapezoidal = Htrapezoidal; - last_Wthickness = Wthickness; - last_tray_qty = tray_qty; - last_tray_high = tray_high; - last_crib_category = crib_category; - last_palletX1_line = palletX1_line; - last_palletY1_row = palletY1_row; - last_palletA1_angle = palletA1_angle; - last_palletX2_line = palletX2_line; - last_palletY2_row = palletY2_row; - last_palletA2_angle = palletA2_angle; - last_palletX3_line = palletX3_line; - last_palletY3_row = palletY3_row; - last_palletA3_angle = palletA3_angle; - last_pressCribX1_line = pressCribX1_line; - last_pressCribY1_row = pressCribY1_row; - last_pressCribA1_angle = pressCribA1_angle; - last_pressCribX2_line = pressCribX2_line; - last_pressCribY2_row = pressCribY2_row; - last_pressCribA2_angle = pressCribA2_angle; - last_pressCribX3_line = pressCribX3_line; - last_pressCribY3_row = pressCribY3_row; - last_pressCribA3_angle = pressCribA3_angle; - last_Zoffset = Zoffset; - last_pallet_layerQty = pallet_layerQty; - last_pressCrib_layerQty = pressCrib_layerQty; - last_codeLayerX1_interval = codeLayerX1_interval; - last_codeLayerY1_interval = codeLayerY1_interval; - last_codeLayerX2_interval = codeLayerX2_interval; - last_codeLayerY2_interval = codeLayerY2_interval; - last_codeLayerX3_interval = codeLayerX3_interval; - last_codeLayerY3_interval = codeLayerY3_interval; - last_codeLayerX1_offset = codeLayerX1_offset; - last_codeLayerY1_offset = codeLayerY1_offset; - last_codeLayerX2_offset = codeLayerX2_offset; - last_codeLayerY2_offset = codeLayerY2_offset; - last_codeLayerX3_offset = codeLayerX3_offset; - last_codeLayerY3_offset = codeLayerY3_offset; - last_pressLayerX1_interval = pressLayerX1_interval; - last_pressLayerY1_interval = pressLayerY1_interval; - last_pressLayerX2_interval = pressLayerX2_interval; - last_pressLayerY2_interval = pressLayerY2_interval; - last_pressLayerX3_interval = pressLayerX3_interval; - last_pressLayerY3_interval = pressLayerY3_interval; - last_pressLayerX1_offset = pressLayerX1_offset; - last_pressLayerY1_offset = pressLayerY1_offset; - last_pressLayerX2_offset = pressLayerX2_offset; - last_pressLayerY2_offset = pressLayerY2_offset; - last_pressLayerX3_offset = pressLayerX3_offset; - last_pressLayerY3_offset = pressLayerY3_offset; - last_one_cribTotal = one_cribTotal; - last_two_cribTotal = two_cribTotal; - last_one_qty = one_qty; - last_two_qty = two_qty; - last_tool_coordinate = tool_coordinate; - + last_batch = batch; + last_specifications = specifications; } /** @@ -695,7 +258,6 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri this.instruction_require_time = date; JSONObject json = new JSONObject(); json.put("device_code",this.device_code); - json.put("vehicle_code",barcode); JSONObject jo = acsToWmsService.getVehicle(json); if (jo.getInteger("status") == 200) { @@ -703,126 +265,10 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri String qty = content.getString("qty"); String material_code = content.getString("material_code"); String material_name = content.getString("material_name"); - String product_code = content.getString("product_code"); - String AlongSide = content.getString("AlongSide"); - String BshortSide = content.getString("BshortSide"); - String Htrapezoidal = content.getString("Htrapezoidal"); - String Wthickness = content.getString("Wthickness"); - String tray_qty = content.getString("tray_qty"); - String tray_high = content.getString("tray_high"); - String crib_category = content.getString("crib_category"); - String palletX1_line = content.getString("palletX1_line"); - String palletY1_row = content.getString("palletY1_row"); - String palletA1_angle = content.getString("palletA1_angle"); - String palletX2_line = content.getString("palletX2_line"); - String palletY2_row = content.getString("palletY2_row"); - String palletA2_angle = content.getString("palletA2_angle"); - String palletX3_line = content.getString("palletX3_line"); - String palletY3_row = content.getString("palletY3_row"); - String palletA3_angle = content.getString("palletA3_angle"); - String pressCribX1_line = content.getString("pressCribX1_line"); - String pressCribY1_row = content.getString("pressCribY1_row"); - String pressCribA1_angle = content.getString("pressCribA1_angle"); - String pressCribX2_line = content.getString("pressCribX2_line"); - String pressCribY2_row = content.getString("pressCribY2_row"); - String pressCribA2_angle = content.getString("pressCribA2_angle"); - String pressCribX3_line = content.getString("pressCribX3_line"); - String pressCribY3_row = content.getString("pressCribY3_row"); - String pressCribA3_angle = content.getString("pressCribA3_angle"); - 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 one_cribTotal = content.getString("one_cribTotal"); - String two_cribTotal = content.getString("two_cribTotal"); - String one_qty = content.getString("one_qty"); - String two_qty = content.getString("two_qty"); - String tool_coordinate = content.getString("tool_coordinate"); this.writing(this.mode); this.writing("to_materialQty",qty); this.writing("to_material_code",material_code); - this.writing("to_AlongSide",AlongSide); - this.writing("to_BshortSide",BshortSide); - this.writing("to_Htrapezoidal",Htrapezoidal); - this.writing("to_Wthickness",Wthickness); - this.writing("to_tray_qty",tray_qty); - this.writing("to_tray_high",tray_high); - this.writing("to_crib_category",crib_category); - this.writing("to_palletX1_line",palletX1_line); - this.writing("to_palletY1_row",palletY1_row); - this.writing("to_palletA1_angle",palletA1_angle); - this.writing("to_palletX2_line",palletX2_line); - this.writing("to_palletY2_row",palletY2_row); - this.writing("to_palletA2_angle",palletA2_angle); - this.writing("to_palletX3_line",palletX3_line); - this.writing("to_palletY3_row",palletY3_row); - this.writing("to_palletA3_angle",palletA3_angle); - this.writing("to_pressCribX1_line",pressCribX1_line); - this.writing("to_pressCribY1_row",pressCribY1_row); - this.writing("to_pressCribA1_angle",pressCribA1_angle); - this.writing("to_pressCribX2_line",pressCribX2_line); - this.writing("to_pressCribY2_row",pressCribY2_row); - this.writing("to_pressCribA2_angle",pressCribA2_angle); - this.writing("to_pressCribX3_line",pressCribX3_line); - this.writing("to_pressCribY3_row",pressCribY3_row); - this.writing("to_pressCribA3_angle",pressCribA3_angle); - this.writing("to_Zoffset",Zoffset); - this.writing("to_pallet_layerQty",pallet_layerQty); - this.writing("to_pressCrib_layerQty",pressCrib_layerQty); - this.writing("to_codeLayerX1_interval",codeLayerX1_interval); - this.writing("to_codeLayerY1_interval",codeLayerY1_interval); - this.writing("to_codeLayerX2_interval",codeLayerX2_interval); - this.writing("to_codeLayerY2_interval",codeLayerY2_interval); - this.writing("to_codeLayerX3_interval",codeLayerX3_interval); - this.writing("to_codeLayerY3_interval",codeLayerY3_interval); - this.writing("to_codeLayerX1_offset",codeLayerX1_offset); - this.writing("to_codeLayerY1_offset",codeLayerY1_offset); - this.writing("to_codeLayerX2_offset",codeLayerX2_offset); - this.writing("to_codeLayerY2_offset",codeLayerY2_offset); - this.writing("to_codeLayerX3_offset",codeLayerX3_offset); - this.writing("to_codeLayerY3_offset",codeLayerY3_offset); - this.writing("to_pressLayerX1_interval",pressLayerX1_interval); - this.writing("to_pressLayerY1_interval",pressLayerY1_interval); - this.writing("to_pressLayerX2_interval",pressLayerX2_interval); - this.writing("to_pressLayerY2_interval",pressLayerY2_interval); - this.writing("to_pressLayerX3_interval",pressLayerX3_interval); - this.writing("to_pressLayerY3_interval",pressLayerY3_interval); - this.writing("to_pressLayerX1_offset",pressLayerX1_offset); - this.writing("to_pressLayerY1_offset",pressLayerY1_offset); - this.writing("to_pressLayerX2_offset",pressLayerX2_offset); - this.writing("to_pressLayerY2_offset",pressLayerY2_offset); - this.writing("to_pressLayerX3_offset",pressLayerX3_offset); - this.writing("to_pressLayerY3_offset",pressLayerY3_offset); - this.writing("to_one_cribTotal",one_cribTotal); - this.writing("to_two_cribTotal",two_cribTotal); - this.writing("to_one_qty",one_qty); - this.writing("to_two_qty",two_qty); - this.writing("to_tool_coordinate",tool_coordinate); - } requireSucess = true; return true; @@ -844,67 +290,7 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri JSONObject json = new JSONObject(); json.put("device_code",this.device_code); json.put("qty",encoder_qty); - json.put("vehicle_code",barcode); json.put("is_full","1"); - json.put("product_code",product_code); - json.put("AlongSide",AlongSide); - json.put("BshortSide",BshortSide); - json.put("Htrapezoidal",Htrapezoidal); - json.put("Wthickness",Wthickness); - json.put("tray_qty",tray_qty); - json.put("tray_high",tray_high); - json.put("crib_category",crib_category); - json.put("palletX1_line",palletX1_line); - json.put("palletY1_row",palletY1_row); - json.put("palletA1_angle",palletA1_angle); - json.put("palletX2_line",palletX2_line); - json.put("palletY2_row",palletY2_row); - json.put("palletA2_angle",palletA2_angle); - json.put("palletX3_line",palletX3_line); - json.put("palletY3_row",palletY3_row); - json.put("palletA3_angle",palletA3_angle); - json.put("pressCribX1_line",pressCribX1_line); - json.put("pressCribY1_row",pressCribY1_row); - json.put("pressCribA1_angle",pressCribA1_angle); - json.put("pressCribX2_line",pressCribX2_line); - json.put("pressCribY2_row",pressCribY2_row); - json.put("pressCribA2_angle",pressCribA2_angle); - json.put("pressCribX3_line",pressCribX3_line); - json.put("pressCribY3_row",pressCribY3_row); - json.put("pressCribA3_angle",pressCribA3_angle); - 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("one_cribTotal",one_cribTotal); - json.put("two_cribTotal",two_cribTotal); - json.put("one_qty",one_qty); - json.put("two_qty",two_qty); - json.put("tool_coordinate",tool_coordinate); - HttpResponse result = acsToWmsService.applyTaskManipulatorToWms(json); if (result.getStatus() == 200) { this.writing(this.mode); @@ -929,66 +315,7 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri JSONObject json = new JSONObject(); json.put("device_code",this.device_code); json.put("qty",encoder_qty); - json.put("vehicle_code",barcode); json.put("is_full","0"); - json.put("product_code",product_code); - json.put("AlongSide",AlongSide); - json.put("BshortSide",BshortSide); - json.put("Htrapezoidal",Htrapezoidal); - json.put("Wthickness",Wthickness); - json.put("tray_qty",tray_qty); - json.put("tray_high",tray_high); - json.put("crib_category",crib_category); - json.put("palletX1_line",palletX1_line); - json.put("palletY1_row",palletY1_row); - json.put("palletA1_angle",palletA1_angle); - json.put("palletX2_line",palletX2_line); - json.put("palletY2_row",palletY2_row); - json.put("palletA2_angle",palletA2_angle); - json.put("palletX3_line",palletX3_line); - json.put("palletY3_row",palletY3_row); - json.put("palletA3_angle",palletA3_angle); - json.put("pressCribX1_line",pressCribX1_line); - json.put("pressCribY1_row",pressCribY1_row); - json.put("pressCribA1_angle",pressCribA1_angle); - json.put("pressCribX2_line",pressCribX2_line); - json.put("pressCribY2_row",pressCribY2_row); - json.put("pressCribA2_angle",pressCribA2_angle); - json.put("pressCribX3_line",pressCribX3_line); - json.put("pressCribY3_row",pressCribY3_row); - json.put("pressCribA3_angle",pressCribA3_angle); - 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("one_cribTotal",one_cribTotal); - json.put("two_cribTotal",two_cribTotal); - json.put("one_qty",one_qty); - json.put("two_qty",two_qty); - json.put("tool_coordinate",tool_coordinate); HttpResponse result = acsToWmsService.applyTaskManipulatorToWms(json); if (result.getStatus() == 200) { @@ -1015,7 +342,6 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri json.put("device_code",this.device_code); json.put("type","4"); json.put("qty",encoder_qty); - json.put("vehicle_code",barcode); HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json); if (result.getStatus() == 200) { this.writing(this.mode); @@ -1065,18 +391,17 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri } - public void writing(int type, int command) { - String to_material_code = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() - + "." + ItemProtocol.item_to_material_code; - String opcservcerid = this.getDevice().getOpc_server_id(); - Server server = ReadUtil.getServer(opcservcerid); - Map itemMap = new HashMap(); - if (type == 2) { - itemMap.put(to_material_code, command); - - } - ReadUtil.write(itemMap, server); - - } +// public void writing(int type, int command) { +// String to_material_code = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() +// + "." + ItemProtocol.item_to_material_code; +// String opcservcerid = this.getDevice().getOpc_server_id(); +// Server server = ReadUtil.getServer(opcservcerid); +// Map itemMap = new HashMap(); +// if (type == 2) { +// itemMap.put(to_material_code, command); +// } +// ReadUtil.write(itemMap, server); +// +// } } diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_split_manipulator/ItemProtocol.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_split_manipulator/ItemProtocol.java index 00bb0e0..b7555fd 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_split_manipulator/ItemProtocol.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_split_manipulator/ItemProtocol.java @@ -24,128 +24,14 @@ public class ItemProtocol { public static String item_error_time = "error_time"; public static String item_material = "material"; public static String item_total_split = "total_split"; - 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_one_cribTotal = "one_cribTotal"; - public static String item_two_cribTotal = "two_cribTotal"; - public static String item_one_qty = "one_qty"; - public static String item_two_qty = "two_qty"; - public static String item_tool_coordinate = "tool_coordinate"; + public static String item_batch = "batch"; + public static String item_specifications = "specifications"; + public static String item_onoff_status = "onoff_status"; public static String item_to_feedback = "to_feedback"; public static String item_to_error = "to_error"; public static String item_to_material = "to_material"; - 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_one_cribTotal = "to_one_cribTotal"; - public static String item_to_two_cribTotal = "to_two_cribTotal"; - public static String item_to_one_qty = "to_one_qty"; - public static String item_to_two_qty = "to_two_qty"; - public static String item_to_tool_coordinate = "to_tool_coordinate"; - private LnshSplitManipulatorDeviceDriver driver; public ItemProtocol(LnshSplitManipulatorDeviceDriver driver) { @@ -196,236 +82,16 @@ public class ItemProtocol { return this.getOpcIntegerValue(item_total_split); } - public int getProduct_code() { - return this.getOpcIntegerValue(item_product_code); + public int getBatch() { + return this.getOpcIntegerValue(item_batch); } - public int getAlongSide() { - return this.getOpcIntegerValue(item_AlongSide); + public String getSpecifications() { + return this.getOpcStringValue(item_specifications); } - 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 Float getPalletX1_line() { - return this.getOpcFloatValue(item_palletX1_line); - } - - public Float getPalletY1_row() { - return this.getOpcFloatValue(item_palletY1_row); - } - - public Float getPalletA1_angle() { - return this.getOpcFloatValue(item_palletA1_angle); - } - - public Float getPalletX2_line() { - return this.getOpcFloatValue(item_palletX2_line); - } - - public Float getPalletY2_row() { - return this.getOpcFloatValue(item_palletY2_row); - } - - public Float getPalletA2_angle() { - return this.getOpcFloatValue(item_palletA2_angle); - } - - public Float getPalletX3_line() { - return this.getOpcFloatValue(item_palletX3_line); - } - - public Float getPalletY3_row() { - return this.getOpcFloatValue(item_palletY3_row); - } - - public Float getPalletA3_angle() { - return this.getOpcFloatValue(item_palletA3_angle); - } - - public Float getPressCribX1_line() { - return this.getOpcFloatValue(item_pressCribX1_line); - } - - public Float getPressCribY1_row() { - return this.getOpcFloatValue(item_pressCribY1_row); - } - - public Float getPressCribA1_angle() { - return this.getOpcFloatValue(item_pressCribA1_angle); - } - - public Float getPressCribX2_line() { - return this.getOpcFloatValue(item_pressCribX2_line); - } - - public Float getPressCribY2_row() { - return this.getOpcFloatValue(item_pressCribY2_row); - } - - public Float getPressCribA2_angle() { - return this.getOpcFloatValue(item_pressCribA2_angle); - } - - public Float getPressCribX3_line() { - return this.getOpcFloatValue(item_pressCribX3_line); - } - - public Float getPressCribY3_row() { - return this.getOpcFloatValue(item_pressCribY3_row); - } - - public Float getPressCribA3_angle() { - return this.getOpcFloatValue(item_pressCribA3_angle); - } - - public Float getZoffset() { - return this.getOpcFloatValue(item_Zoffset); - } - - public int getPallet_layerQty() { - return this.getOpcIntegerValue(item_pallet_layerQty); - } - - public int getPressCrib_layerQty() { - return this.getOpcIntegerValue(item_pressCrib_layerQty); - } - - public Float getCodeLayerX1_interval() { - return this.getOpcFloatValue(item_codeLayerX1_interval); - } - - public Float getCodeLayerY1_interval() { - return this.getOpcFloatValue(item_codeLayerY1_interval); - } - - public Float getCodeLayerX2_interval() { - return this.getOpcFloatValue(item_codeLayerX2_interval); - } - - public Float getCodeLayerY2_interval() { - return this.getOpcFloatValue(item_codeLayerY2_interval); - } - - public Float getCodeLayerX3_interval() { - return this.getOpcFloatValue(item_codeLayerX3_interval); - } - - public Float getcodeLayerY3_interval() { - return this.getOpcFloatValue(item_codeLayerY3_interval); - } - - public Float getCodeLayerX1_offset() { - return this.getOpcFloatValue(item_codeLayerX1_offset); - } - - public Float getCodeLayerY1_offset() { - return this.getOpcFloatValue(item_codeLayerY1_offset); - } - - public Float getCodeLayerX2_offset() { - return this.getOpcFloatValue(item_codeLayerX2_offset); - } - - public Float getCodeLayerY2_offset() { - return this.getOpcFloatValue(item_codeLayerY2_offset); - } - - public Float getCodeLayerX3_offset() { - return this.getOpcFloatValue(item_codeLayerX3_offset); - } - - public Float getCodeLayerY3_offset() { - return this.getOpcFloatValue(item_codeLayerY3_offset); - } - - public Float getPressLayerX1_interval() { - return this.getOpcFloatValue(item_pressLayerX1_interval); - } - - public Float getPressLayerY1_interval() { - return this.getOpcFloatValue(item_pressLayerY1_interval); - } - - public Float getPressLayerX2_interval() { - return this.getOpcFloatValue(item_pressLayerX2_interval); - } - - public Float getPressLayerY2_interval() { - return this.getOpcFloatValue(item_pressLayerY2_interval); - } - - public Float getPressLayerX3_interval() { - return this.getOpcFloatValue(item_pressLayerX3_interval); - } - - public Float getPressLayerY3_interval() { - return this.getOpcFloatValue(item_pressLayerY3_interval); - } - - public Float getPressLayerX1_offset() { - return this.getOpcFloatValue(item_pressLayerX1_offset); - } - - public Float getPressLayerY1_offset() { - return this.getOpcFloatValue(item_pressLayerY1_offset); - } - - public Float getPressLayerX2_offset() { - return this.getOpcFloatValue(item_pressLayerX2_offset); - } - - public Float getPressLayerY2_offset() { - return this.getOpcFloatValue(item_pressLayerY2_offset); - } - - public Float getPressLayerX3_offset() { - return this.getOpcFloatValue(item_pressLayerX3_offset); - } - - public Float getPressLayerY3_offset() { - return this.getOpcFloatValue(item_pressLayerY3_offset); - } - - public int getOne_cribTotal() { - return this.getOpcIntegerValue(item_one_cribTotal); - } - - public int getTwo_cribTotal() { - return this.getOpcIntegerValue(item_two_cribTotal); - } - - public int getOne_qty() { - return this.getOpcIntegerValue(item_one_qty); - } - - public int getTwo_qty() { - return this.getOpcIntegerValue(item_two_qty); - } - - public int getTool_coordinate() { - return this.getOpcIntegerValue(item_tool_coordinate); + public int getOnoff_status() { + return this.getOpcIntegerValue(item_onoff_status); } public int getTo_feedback() { @@ -440,238 +106,6 @@ public class ItemProtocol { return this.getOpcStringValue(item_to_material); } - public int getToProduct_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 Float getToPalletX1_line() { - return this.getOpcFloatValue(item_to_palletX1_line); - } - - public Float getToPalletY1_row() { - return this.getOpcFloatValue(item_to_palletY1_row); - } - - public Float getToPalletA1_angle() { - return this.getOpcFloatValue(item_to_palletA1_angle); - } - - public Float getToPalletX2_line() { - return this.getOpcFloatValue(item_to_palletX2_line); - } - - public Float getToPalletY2_row() { - return this.getOpcFloatValue(item_to_palletY2_row); - } - - public Float getToPalletA2_angle() { - return this.getOpcFloatValue(item_to_palletA2_angle); - } - - public Float getToPalletX3_line() { - return this.getOpcFloatValue(item_to_palletX3_line); - } - - public Float getToPalletY3_row() { - return this.getOpcFloatValue(item_to_palletY3_row); - } - - public Float getToPalletA3_angle() { - return this.getOpcFloatValue(item_to_palletA3_angle); - } - - public Float getToPressCribX1_line() { - return this.getOpcFloatValue(item_to_pressCribX1_line); - } - - public Float getToPressCribY1_row() { - return this.getOpcFloatValue(item_to_pressCribY1_row); - } - - public Float getToPressCribA1_angle() { - return this.getOpcFloatValue(item_to_pressCribA1_angle); - } - - public Float getToPressCribX2_line() { - return this.getOpcFloatValue(item_to_pressCribX2_line); - } - - public Float getToPressCribY2_row() { - return this.getOpcFloatValue(item_to_pressCribY2_row); - } - - public Float getToPressCribA2_angle() { - return this.getOpcFloatValue(item_to_pressCribA2_angle); - } - - public Float getToPressCribX3_line() { - return this.getOpcFloatValue(item_to_pressCribX3_line); - } - - public Float getToPressCribY3_row() { - return this.getOpcFloatValue(item_to_pressCribY3_row); - } - - public Float getToPressCribA3_angle() { - return this.getOpcFloatValue(item_to_pressCribA3_angle); - } - - public Float getToZoffset() { - return this.getOpcFloatValue(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 Float getToCodeLayerX1_interval() { - return this.getOpcFloatValue(item_to_codeLayerX1_interval); - } - - public Float getToCodeLayerY1_interval() { - return this.getOpcFloatValue(item_to_codeLayerY1_interval); - } - - public Float getToCodeLayerX2_interval() { - return this.getOpcFloatValue(item_to_codeLayerX2_interval); - } - - public Float getToCodeLayerY2_interval() { - return this.getOpcFloatValue(item_to_codeLayerY2_interval); - } - - public Float getToCodeLayerX3_interval() { - return this.getOpcFloatValue(item_to_codeLayerX3_interval); - } - - public Float getTocodeLayerY3_interval() { - return this.getOpcFloatValue(item_to_codeLayerY3_interval); - } - - public Float getToCodeLayerX1_offset() { - return this.getOpcFloatValue(item_to_codeLayerX1_offset); - } - - public Float getToCodeLayerY1_offset() { - return this.getOpcFloatValue(item_to_codeLayerY1_offset); - } - - public Float getToCodeLayerX2_offset() { - return this.getOpcFloatValue(item_to_codeLayerX2_offset); - } - - public Float getToCodeLayerY2_offset() { - return this.getOpcFloatValue(item_to_codeLayerY2_offset); - } - - public Float getToCodeLayerX3_offset() { - return this.getOpcFloatValue(item_to_codeLayerX3_offset); - } - - public Float getToCodeLayerY3_offset() { - return this.getOpcFloatValue(item_to_codeLayerY3_offset); - } - - public Float getToPressLayerX1_interval() { - return this.getOpcFloatValue(item_to_pressLayerX1_interval); - } - - public Float getToPressLayerY1_interval() { - return this.getOpcFloatValue(item_to_pressLayerY1_interval); - } - - public Float getToPressLayerX2_interval() { - return this.getOpcFloatValue(item_to_pressLayerX2_interval); - } - - public Float getToPressLayerY2_interval() { - return this.getOpcFloatValue(item_to_pressLayerY2_interval); - } - - public Float getToPressLayerX3_interval() { - return this.getOpcFloatValue(item_to_pressLayerX3_interval); - } - - public Float getToPressLayerY3_interval() { - return this.getOpcFloatValue(item_to_pressLayerY3_interval); - } - - public Float getToPressLayerX1_offset() { - return this.getOpcFloatValue(item_to_pressLayerX1_offset); - } - - public Float getToPressLayerY1_offset() { - return this.getOpcFloatValue(item_to_pressLayerY1_offset); - } - - public Float getToPressLayerX2_offset() { - return this.getOpcFloatValue(item_to_pressLayerX2_offset); - } - - public Float getToPressLayerY2_offset() { - return this.getOpcFloatValue(item_to_pressLayerY2_offset); - } - - public Float getToPressLayerX3_offset() { - return this.getOpcFloatValue(item_to_pressLayerX3_offset); - } - - public Float getToPressLayerY3_offset() { - return this.getOpcFloatValue(item_to_pressLayerY3_offset); - } - - public int getToOne_cribTotal() { - return this.getOpcIntegerValue(item_to_one_cribTotal); - } - - public int getToTwo_cribTotal() { - return this.getOpcIntegerValue(item_to_two_cribTotal); - } - - public int getToOne_qty() { - return this.getOpcIntegerValue(item_to_one_qty); - } - - public int getToTwo_qty() { - return this.getOpcIntegerValue(item_to_two_qty); - } - - public int getToTool_coordinate() { - return this.getOpcIntegerValue(item_to_tool_coordinate); - } - //是否有货 public int hasGoods(int move) { return move; @@ -717,73 +151,17 @@ public class ItemProtocol { list.add(new ItemDto(item_heartbeat, "心跳", "DB7.B0")); list.add(new ItemDto(item_mode, "工作状态", "DB7.B1", Boolean.valueOf(true))); list.add(new ItemDto(item_error, "故障", "DB7.B3")); - list.add(new ItemDto(item_getStation, "当前抓取工位", "DB7.D4")); - list.add(new ItemDto(item_barcode, "条码", "DB7.S8")); - list.add(new ItemDto(item_open_time, "开机时间", "DB7.D264")); - list.add(new ItemDto(item_standby_time, "待机时间", "DB7.D520")); - list.add(new ItemDto(item_production_time, "生产时间", "DB7.D524")); - list.add(new ItemDto(item_error_time, "故障时间", "DB7.D528")); - list.add(new ItemDto(item_material, "物料", "DB7.D532")); - list.add(new ItemDto(item_total_split, "累计拆垛数量", "DB7.D536")); - - list.add(new ItemDto(item_product_code, "产品编号", "DB7.D544")); - list.add(new ItemDto(item_AlongSide, "A长边", "DB7.D548")); - list.add(new ItemDto(item_BshortSide, "B短边", "DB7.D552")); - list.add(new ItemDto(item_Htrapezoidal, "H梯形高", "DB7.D556")); - list.add(new ItemDto(item_Wthickness, "W厚度", "DB7.D560")); - list.add(new ItemDto(item_tray_qty, "当前垛盘数", "DB7.D564")); - list.add(new ItemDto(item_tray_high, "垛盘高度", "DB7.D568")); - list.add(new ItemDto(item_crib_category, "垛型类别", "DB7.D572")); - list.add(new ItemDto(item_palletX1_line, "码垛X1行", "DB7.REAL576")); - list.add(new ItemDto(item_palletY1_row, "码垛Y1列", "DB7.REAL580")); - list.add(new ItemDto(item_palletA1_angle, "码垛A1角度", "DB7.REAL584")); - list.add(new ItemDto(item_palletX2_line, "码垛X2行", "DB7.REAL588")); - list.add(new ItemDto(item_palletY2_row, "码垛Y2列", "DB7.REAL592")); - list.add(new ItemDto(item_palletA2_angle, "码垛A2角度", "DB7.REAL596")); - list.add(new ItemDto(item_palletX3_line, "码垛X3行", "DB7.REAL600")); - list.add(new ItemDto(item_palletY3_row, "码垛Y3列", "DB7.REAL604")); - list.add(new ItemDto(item_palletA3_angle, "码垛A3角度", "DB7.REAL608")); - list.add(new ItemDto(item_pressCribX1_line, "压垛X1行", "DB7.REAL612")); - list.add(new ItemDto(item_pressCribY1_row, "压垛Y1列", "DB7.REAL616")); - list.add(new ItemDto(item_pressCribA1_angle, "压垛A1角度", "DB7.REAL620")); - list.add(new ItemDto(item_pressCribX2_line, "压垛X2行", "DB7.REAL624")); - list.add(new ItemDto(item_pressCribY2_row, "压垛Y2列", "DB7.REAL628")); - list.add(new ItemDto(item_pressCribA2_angle, "压垛A2角度", "DB7.REAL632")); - list.add(new ItemDto(item_pressCribX3_line, "压垛X3行", "DB7.REAL636")); - list.add(new ItemDto(item_pressCribY3_row, "压垛Y3列", "DB7.REAL640")); - list.add(new ItemDto(item_pressCribA3_angle, "压垛A3角度", "DB7.REAL644")); - list.add(new ItemDto(item_Zoffset, "Z轴偏移", "DB7.REAL648")); - list.add(new ItemDto(item_pallet_layerQty, "码垛层数", "DB7.D652")); - list.add(new ItemDto(item_pressCrib_layerQty, "压垛层数", "DB7.D656")); - list.add(new ItemDto(item_codeLayerX1_interval, "码层X1间隔", "DB7.REAL660")); - list.add(new ItemDto(item_codeLayerY1_interval, "码层Y1间隔", "DB7.REAL664")); - list.add(new ItemDto(item_codeLayerX2_interval, "码层X2间隔", "DB7.REAL668")); - list.add(new ItemDto(item_codeLayerY2_interval, "码层Y2间隔", "DB7.REAL672")); - list.add(new ItemDto(item_codeLayerX3_interval, "码层X3间隔", "DB7.REAL676")); - list.add(new ItemDto(item_codeLayerY3_interval, "码层Y3间隔", "DB7.REAL680")); - list.add(new ItemDto(item_codeLayerX1_offset, "码层X1偏移", "DB7.REAL684")); - list.add(new ItemDto(item_codeLayerY1_offset, "码层Y1偏移", "DB7.REAL688")); - list.add(new ItemDto(item_codeLayerX2_offset, "码层X2偏移", "DB7.REAL692")); - list.add(new ItemDto(item_codeLayerY2_offset, "码层Y2偏移", "DB7.REAL696")); - list.add(new ItemDto(item_codeLayerX3_offset, "码层X3偏移", "DB7.REAL700")); - list.add(new ItemDto(item_codeLayerY3_offset, "码层Y3偏移", "DB7.REAL704")); - list.add(new ItemDto(item_pressLayerX1_interval, "压层X1间隔", "DB7.REAL708")); - list.add(new ItemDto(item_pressLayerY1_interval, "压层Y1间隔", "DB7.REAL712")); - list.add(new ItemDto(item_pressLayerX2_interval, "压层X2间隔", "DB7.REAL716")); - list.add(new ItemDto(item_pressLayerY2_interval, "压层Y2间隔", "DB7.REAL720")); - list.add(new ItemDto(item_pressLayerX3_interval, "压层X3间隔", "DB7.REAL724")); - list.add(new ItemDto(item_pressLayerY3_interval, "压层Y3间隔", "DB7.REAL728")); - list.add(new ItemDto(item_pressLayerX1_offset, "压层X1偏移", "DB7.REAL732")); - list.add(new ItemDto(item_pressLayerY1_offset, "压层Y1偏移", "DB7.REAL736")); - list.add(new ItemDto(item_pressLayerX2_offset, "压层X2偏移", "DB7.REAL740")); - list.add(new ItemDto(item_pressLayerY2_offset, "压层Y2偏移", "DB7.REAL744")); - list.add(new ItemDto(item_pressLayerX3_offset, "压层X3偏移", "DB7.REAL748")); - list.add(new ItemDto(item_pressLayerY3_offset, "压层Y3偏移", "DB7.REAL752")); - list.add(new ItemDto(item_one_cribTotal, "1#垛总数", "DB7.D756")); - list.add(new ItemDto(item_two_cribTotal, "2#垛总数", "DB7.D760")); - list.add(new ItemDto(item_one_qty, "1#垛当前数", "DB7.D764")); - list.add(new ItemDto(item_two_qty, "2#垛当前数", "DB7.D768")); - list.add(new ItemDto(item_tool_coordinate, "工具坐标", "DB7.D772")); + list.add(new ItemDto(item_onoff_status, "开关机状态", "DB7.B4")); + list.add(new ItemDto(item_getStation, "当前抓取工位", "DB7.D5")); + list.add(new ItemDto(item_barcode, "条码", "DB7.S9")); + list.add(new ItemDto(item_open_time, "开机时间", "DB7.D265")); + list.add(new ItemDto(item_standby_time, "待机时间", "DB7.D521")); + list.add(new ItemDto(item_production_time, "生产时间", "DB7.D525")); + list.add(new ItemDto(item_error_time, "故障时间", "DB7.D529")); + list.add(new ItemDto(item_material, "物料", "DB7.D533")); + list.add(new ItemDto(item_total_split, "累计拆垛数量", "DB7.D537")); + list.add(new ItemDto(item_batch, "批次", "DB7.D541")); + list.add(new ItemDto(item_specifications, "规格", "DB7.S545")); return list; } @@ -792,65 +170,6 @@ public class ItemProtocol { list.add(new ItemDto(item_to_feedback, "机器人动作反馈", "DB8.W0")); list.add(new ItemDto(item_to_error, "故障代码", "DB8.W1")); list.add(new ItemDto(item_to_material, "物料", "DB8.S2")); - - list.add(new ItemDto(item_to_product_code, "产品编号", "DB8.D258")); - list.add(new ItemDto(item_to_AlongSide, "A长边", "DB8.D262")); - list.add(new ItemDto(item_to_BshortSide, "B短边", "DB8.D266")); - list.add(new ItemDto(item_to_Htrapezoidal, "H梯形高", "DB8.D270")); - list.add(new ItemDto(item_to_Wthickness, "W厚度", "DB8.D274")); - list.add(new ItemDto(item_to_tray_qty, "当前垛盘数", "DB8.D278")); - list.add(new ItemDto(item_to_tray_high, "垛盘高度", "DB8.D282")); - list.add(new ItemDto(item_to_crib_category, "垛型类别", "DB8.D286")); - list.add(new ItemDto(item_to_palletX1_line, "码垛X1行", "DB8.REAL290")); - list.add(new ItemDto(item_to_palletY1_row, "码垛Y1列", "DB8.REAL294")); - list.add(new ItemDto(item_to_palletA1_angle, "码垛A1角度", "DB8.REAL298")); - list.add(new ItemDto(item_to_palletX2_line, "码垛X2行", "DB8.REAL302")); - list.add(new ItemDto(item_to_palletY2_row, "码垛Y2列", "DB8.REAL306")); - list.add(new ItemDto(item_to_palletA2_angle, "码垛A2角度", "DB8.REAL310")); - list.add(new ItemDto(item_to_palletX3_line, "码垛X3行", "DB8.REAL314")); - list.add(new ItemDto(item_to_palletY3_row, "码垛Y3列", "DB8.REAL318")); - list.add(new ItemDto(item_to_palletA3_angle, "码垛A3角度", "DB8.REAL322")); - list.add(new ItemDto(item_to_pressCribX1_line, "压垛X1行", "DB8.REAL326")); - list.add(new ItemDto(item_to_pressCribY1_row, "压垛Y1列", "DB8.REAL330")); - list.add(new ItemDto(item_to_pressCribA1_angle, "压垛A1角度", "DB8.REAL334")); - list.add(new ItemDto(item_to_pressCribX2_line, "压垛X2行", "DB8.REAL338")); - list.add(new ItemDto(item_to_pressCribY2_row, "压垛Y2列", "DB8.REAL342")); - list.add(new ItemDto(item_to_pressCribA2_angle, "压垛A2角度", "DB8.REAL346")); - list.add(new ItemDto(item_to_pressCribX3_line, "压垛X3行", "DB8.REAL350")); - list.add(new ItemDto(item_to_pressCribY3_row, "压垛Y3列", "DB8.REAL354")); - list.add(new ItemDto(item_to_pressCribA3_angle, "压垛A3角度", "DB8.REAL358")); - list.add(new ItemDto(item_to_Zoffset, "Z轴偏移", "DB8.REAL362")); - list.add(new ItemDto(item_to_pallet_layerQty, "码垛层数", "DB8.D366")); - list.add(new ItemDto(item_to_pressCrib_layerQty, "压垛层数", "DB8.D370")); - list.add(new ItemDto(item_to_codeLayerX1_interval, "码层X1间隔", "DB8.REAL374")); - list.add(new ItemDto(item_to_codeLayerY1_interval, "码层Y1间隔", "DB8.REAL378")); - list.add(new ItemDto(item_to_codeLayerX2_interval, "码层X2间隔", "DB8.REAL382")); - list.add(new ItemDto(item_to_codeLayerY2_interval, "码层Y2间隔", "DB8.REAL386")); - list.add(new ItemDto(item_to_codeLayerX3_interval, "码层X3间隔", "DB8.REAL390")); - list.add(new ItemDto(item_to_codeLayerY3_interval, "码层Y3间隔", "DB8.REAL394")); - list.add(new ItemDto(item_to_codeLayerX1_offset, "码层X1偏移", "DB8.REAL398")); - list.add(new ItemDto(item_to_codeLayerY1_offset, "码层Y1偏移", "DB8.REAL402")); - list.add(new ItemDto(item_to_codeLayerX2_offset, "码层X2偏移", "DB8.REAL406")); - list.add(new ItemDto(item_to_codeLayerY2_offset, "码层Y2偏移", "DB8.REAL410")); - list.add(new ItemDto(item_to_codeLayerX3_offset, "码层X3偏移", "DB8.REAL414")); - list.add(new ItemDto(item_to_codeLayerY3_offset, "码层Y3偏移", "DB8.REAL418")); - list.add(new ItemDto(item_to_pressLayerX1_interval, "压层X1间隔", "DB8.REAL422")); - list.add(new ItemDto(item_to_pressLayerY1_interval, "压层Y1间隔", "DB8.REAL426")); - list.add(new ItemDto(item_to_pressLayerX2_interval, "压层X2间隔", "DB8.REAL430")); - list.add(new ItemDto(item_to_pressLayerY2_interval, "压层Y2间隔", "DB8.REAL434")); - list.add(new ItemDto(item_to_pressLayerX3_interval, "压层X3间隔", "DB8.REAL438")); - list.add(new ItemDto(item_to_pressLayerY3_interval, "压层Y3间隔", "DB8.REAL442")); - list.add(new ItemDto(item_to_pressLayerX1_offset, "压层X1偏移", "DB8.REAL446")); - list.add(new ItemDto(item_to_pressLayerY1_offset, "压层Y1偏移", "DB8.REAL450")); - list.add(new ItemDto(item_to_pressLayerX2_offset, "压层X2偏移", "DB8.REAL454")); - list.add(new ItemDto(item_to_pressLayerY2_offset, "压层Y2偏移", "DB8.REAL458")); - list.add(new ItemDto(item_to_pressLayerX3_offset, "压层X3偏移", "DB8.REAL462")); - list.add(new ItemDto(item_to_pressLayerY3_offset, "压层Y3偏移", "DB8.REAL466")); - list.add(new ItemDto(item_to_one_cribTotal, "1#垛总数", "DB8.D470")); - list.add(new ItemDto(item_to_two_cribTotal, "2#垛总数", "DB8.D474")); - list.add(new ItemDto(item_to_one_qty, "1#垛当前数", "DB8.D478")); - list.add(new ItemDto(item_to_two_qty, "2#垛当前数", "DB8.D482")); - list.add(new ItemDto(item_to_tool_coordinate, "工具坐标", "DB8.D486")); return list; } diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_split_manipulator/LnshSplitManipulatorDefination.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_split_manipulator/LnshSplitManipulatorDefination.java index b4adb48..8cc35ac 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_split_manipulator/LnshSplitManipulatorDefination.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_split_manipulator/LnshSplitManipulatorDefination.java @@ -60,73 +60,17 @@ public class LnshSplitManipulatorDefination implements OpcDeviceDriverDefination list.add(new ItemDto(ItemProtocol.item_heartbeat, "心跳", "DB7.B0")); list.add(new ItemDto(ItemProtocol.item_mode, "工作状态", "DB7.B1", Boolean.valueOf(true))); list.add(new ItemDto(ItemProtocol.item_error, "故障", "DB7.B3")); - list.add(new ItemDto(ItemProtocol.item_getStation, "当前抓取工位", "DB7.D4")); - list.add(new ItemDto(ItemProtocol.item_barcode, "条码", "DB7.S8")); - list.add(new ItemDto(ItemProtocol.item_open_time, "开机时间", "DB7.D264")); - list.add(new ItemDto(ItemProtocol.item_standby_time, "待机时间", "DB7.D520")); - list.add(new ItemDto(ItemProtocol.item_production_time, "生产时间", "DB7.D524")); - list.add(new ItemDto(ItemProtocol.item_error_time, "故障时间", "DB7.D528")); - list.add(new ItemDto(ItemProtocol.item_material, "物料", "DB7.D532")); - list.add(new ItemDto(ItemProtocol.item_total_split, "累计拆垛数量", "DB7.D536")); - - list.add(new ItemDto(ItemProtocol.item_product_code, "产品编号", "DB7.D544")); - list.add(new ItemDto(ItemProtocol.item_AlongSide, "A长边", "DB7.D548")); - list.add(new ItemDto(ItemProtocol.item_BshortSide, "B短边", "DB7.D552")); - list.add(new ItemDto(ItemProtocol.item_Htrapezoidal, "H梯形高", "DB7.D556")); - list.add(new ItemDto(ItemProtocol.item_Wthickness, "W厚度", "DB7.D560")); - list.add(new ItemDto(ItemProtocol.item_tray_qty, "当前垛盘数", "DB7.D564")); - list.add(new ItemDto(ItemProtocol.item_tray_high, "垛盘高度", "DB7.D568")); - list.add(new ItemDto(ItemProtocol.item_crib_category, "垛型类别", "DB7.D572")); - list.add(new ItemDto(ItemProtocol.item_palletX1_line, "码垛X1行", "DB7.REAL576")); - list.add(new ItemDto(ItemProtocol.item_palletY1_row, "码垛Y1列", "DB7.REAL580")); - list.add(new ItemDto(ItemProtocol.item_palletA1_angle, "码垛A1角度", "DB7.REAL584")); - list.add(new ItemDto(ItemProtocol.item_palletX2_line, "码垛X2行", "DB7.REAL588")); - list.add(new ItemDto(ItemProtocol.item_palletY2_row, "码垛Y2列", "DB7.REAL592")); - list.add(new ItemDto(ItemProtocol.item_palletA2_angle, "码垛A2角度", "DB7.REAL596")); - list.add(new ItemDto(ItemProtocol.item_palletX3_line, "码垛X3行", "DB7.REAL600")); - list.add(new ItemDto(ItemProtocol.item_palletY3_row, "码垛Y3列", "DB7.REAL604")); - list.add(new ItemDto(ItemProtocol.item_palletA3_angle, "码垛A3角度", "DB7.REAL608")); - list.add(new ItemDto(ItemProtocol.item_pressCribX1_line, "压垛X1行", "DB7.REAL612")); - list.add(new ItemDto(ItemProtocol.item_pressCribY1_row, "压垛Y1列", "DB7.REAL616")); - list.add(new ItemDto(ItemProtocol.item_pressCribA1_angle, "压垛A1角度", "DB7.REAL620")); - list.add(new ItemDto(ItemProtocol.item_pressCribX2_line, "压垛X2行", "DB7.REAL624")); - list.add(new ItemDto(ItemProtocol.item_pressCribY2_row, "压垛Y2列", "DB7.REAL628")); - list.add(new ItemDto(ItemProtocol.item_pressCribA2_angle, "压垛A2角度", "DB7.REAL632")); - list.add(new ItemDto(ItemProtocol.item_pressCribX3_line, "压垛X3行", "DB7.REAL636")); - list.add(new ItemDto(ItemProtocol.item_pressCribY3_row, "压垛Y3列", "DB7.REAL640")); - list.add(new ItemDto(ItemProtocol.item_pressCribA3_angle, "压垛A3角度", "DB7.REAL644")); - list.add(new ItemDto(ItemProtocol.item_Zoffset, "Z轴偏移", "DB7.REAL648")); - list.add(new ItemDto(ItemProtocol.item_pallet_layerQty, "码垛层数", "DB7.D652")); - list.add(new ItemDto(ItemProtocol.item_pressCrib_layerQty, "压垛层数", "DB7.D656")); - list.add(new ItemDto(ItemProtocol.item_codeLayerX1_interval, "码层X1间隔", "DB7.REAL660")); - list.add(new ItemDto(ItemProtocol.item_codeLayerY1_interval, "码层Y1间隔", "DB7.REAL664")); - list.add(new ItemDto(ItemProtocol.item_codeLayerX2_interval, "码层X2间隔", "DB7.REAL668")); - list.add(new ItemDto(ItemProtocol.item_codeLayerY2_interval, "码层Y2间隔", "DB7.REAL672")); - list.add(new ItemDto(ItemProtocol.item_codeLayerX3_interval, "码层X3间隔", "DB7.REAL676")); - list.add(new ItemDto(ItemProtocol.item_codeLayerY3_interval, "码层Y3间隔", "DB7.REAL680")); - list.add(new ItemDto(ItemProtocol.item_codeLayerX1_offset, "码层X1偏移", "DB7.REAL684")); - list.add(new ItemDto(ItemProtocol.item_codeLayerY1_offset, "码层Y1偏移", "DB7.REAL688")); - list.add(new ItemDto(ItemProtocol.item_codeLayerX2_offset, "码层X2偏移", "DB7.REAL692")); - list.add(new ItemDto(ItemProtocol.item_codeLayerY2_offset, "码层Y2偏移", "DB7.REAL696")); - list.add(new ItemDto(ItemProtocol.item_codeLayerX3_offset, "码层X3偏移", "DB7.REAL700")); - list.add(new ItemDto(ItemProtocol.item_codeLayerY3_offset, "码层Y3偏移", "DB7.REAL704")); - list.add(new ItemDto(ItemProtocol.item_pressLayerX1_interval, "压层X1间隔", "DB7.REAL708")); - list.add(new ItemDto(ItemProtocol.item_pressLayerY1_interval, "压层Y1间隔", "DB7.REAL712")); - list.add(new ItemDto(ItemProtocol.item_pressLayerX2_interval, "压层X2间隔", "DB7.REAL716")); - list.add(new ItemDto(ItemProtocol.item_pressLayerY2_interval, "压层Y2间隔", "DB7.REAL720")); - list.add(new ItemDto(ItemProtocol.item_pressLayerX3_interval, "压层X3间隔", "DB7.REAL724")); - list.add(new ItemDto(ItemProtocol.item_pressLayerY3_interval, "压层Y3间隔", "DB7.REAL728")); - list.add(new ItemDto(ItemProtocol.item_pressLayerX1_offset, "压层X1偏移", "DB7.REAL732")); - list.add(new ItemDto(ItemProtocol.item_pressLayerY1_offset, "压层Y1偏移", "DB7.REAL736")); - list.add(new ItemDto(ItemProtocol.item_pressLayerX2_offset, "压层X2偏移", "DB7.REAL740")); - list.add(new ItemDto(ItemProtocol.item_pressLayerY2_offset, "压层Y2偏移", "DB7.REAL744")); - list.add(new ItemDto(ItemProtocol.item_pressLayerX3_offset, "压层X3偏移", "DB7.REAL748")); - list.add(new ItemDto(ItemProtocol.item_pressLayerY3_offset, "压层Y3偏移", "DB7.REAL752")); - list.add(new ItemDto(ItemProtocol.item_one_cribTotal, "1#垛总数", "DB7.D756")); - list.add(new ItemDto(ItemProtocol.item_two_cribTotal, "2#垛总数", "DB7.D760")); - list.add(new ItemDto(ItemProtocol.item_one_qty, "1#垛当前数", "DB7.D764")); - list.add(new ItemDto(ItemProtocol.item_two_qty, "2#垛当前数", "DB7.D768")); - list.add(new ItemDto(ItemProtocol.item_tool_coordinate, "工具坐标", "DB7.D772")); + list.add(new ItemDto(ItemProtocol.item_onoff_status, "开关机状态", "DB7.B4")); + list.add(new ItemDto(ItemProtocol.item_getStation, "当前抓取工位", "DB7.D5")); + list.add(new ItemDto(ItemProtocol.item_barcode, "条码", "DB7.S9")); + list.add(new ItemDto(ItemProtocol.item_open_time, "开机时间", "DB7.D265")); + list.add(new ItemDto(ItemProtocol.item_standby_time, "待机时间", "DB7.D521")); + list.add(new ItemDto(ItemProtocol.item_production_time, "生产时间", "DB7.D525")); + list.add(new ItemDto(ItemProtocol.item_error_time, "故障时间", "DB7.D529")); + list.add(new ItemDto(ItemProtocol.item_material, "物料", "DB7.D533")); + list.add(new ItemDto(ItemProtocol.item_total_split, "累计拆垛数量", "DB7.D537")); + list.add(new ItemDto(ItemProtocol.item_batch, "批次", "DB7.D541")); + list.add(new ItemDto(ItemProtocol.item_specifications, "规格", "DB7.S545")); return list; } diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_split_manipulator/LnshSplitManipulatorDeviceDriver.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_split_manipulator/LnshSplitManipulatorDeviceDriver.java index 63816c8..7cd6286 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_split_manipulator/LnshSplitManipulatorDeviceDriver.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_split_manipulator/LnshSplitManipulatorDeviceDriver.java @@ -109,124 +109,14 @@ public class LnshSplitManipulatorDeviceDriver extends AbstractOpcDeviceDriver im int total_split = 0; int last_total_split = 0; - //垛型参数 - int product_code = 0; - int AlongSide = 0; - int BshortSide = 0; - int Htrapezoidal = 0; - int Wthickness = 0; - int tray_qty = 0; - int tray_high = 0; - int crib_category = 0; - float palletX1_line = 0f; - float palletY1_row = 0f; - float palletA1_angle = 0f; - float palletX2_line = 0f; - float palletY2_row = 0f; - float palletA2_angle = 0f; - float palletX3_line = 0f; - float palletY3_row = 0f; - float palletA3_angle = 0f; - float pressCribX1_line = 0f; - float pressCribY1_row = 0f; - float pressCribA1_angle = 0f; - float pressCribX2_line = 0f; - float pressCribY2_row = 0f; - float pressCribA2_angle = 0f; - float pressCribX3_line = 0f; - float pressCribY3_row = 0f; - float pressCribA3_angle = 0f; - float Zoffset = 0f; - int pallet_layerQty = 0; - int pressCrib_layerQty = 0; - float codeLayerX1_interval = 0f; - float codeLayerY1_interval = 0f; - float codeLayerX2_interval = 0f; - float codeLayerY2_interval = 0f; - float codeLayerX3_interval = 0f; - float codeLayerY3_interval = 0f; - float codeLayerX1_offset = 0f; - float codeLayerY1_offset = 0f; - float codeLayerX2_offset = 0f; - float codeLayerY2_offset = 0f; - float codeLayerX3_offset = 0f; - float codeLayerY3_offset = 0f; - float pressLayerX1_interval = 0f; - float pressLayerY1_interval = 0f; - float pressLayerX2_interval = 0f; - float pressLayerY2_interval = 0f; - float pressLayerX3_interval = 0f; - float pressLayerY3_interval = 0f; - float pressLayerX1_offset = 0f; - float pressLayerY1_offset = 0f; - float pressLayerX2_offset = 0f; - float pressLayerY2_offset = 0f; - float pressLayerX3_offset = 0f; - float pressLayerY3_offset = 0f; - int one_cribTotal = 0; - int two_cribTotal = 0; - int one_qty = 0; - int two_qty = 0; - int tool_coordinate = 0; + //开关机状态 0关机 1开机 + int onoff_status = 0; + int last_onoff_status = 0; - int last_product_code = 0; - int last_AlongSide = 0; - int last_BshortSide = 0; - int last_Htrapezoidal = 0; - int last_Wthickness = 0; - int last_tray_qty = 0; - int last_tray_high = 0; - int last_crib_category = 0; - float last_palletX1_line = 0f; - float last_palletY1_row = 0f; - float last_palletA1_angle = 0f; - float last_palletX2_line = 0f; - float last_palletY2_row = 0f; - float last_palletA2_angle = 0f; - float last_palletX3_line = 0f; - float last_palletY3_row = 0f; - float last_palletA3_angle = 0f; - float last_pressCribX1_line = 0f; - float last_pressCribY1_row = 0f; - float last_pressCribA1_angle = 0f; - float last_pressCribX2_line = 0f; - float last_pressCribY2_row = 0f; - float last_pressCribA2_angle = 0f; - float last_pressCribX3_line = 0f; - float last_pressCribY3_row = 0f; - float last_pressCribA3_angle = 0f; - float last_Zoffset = 0f; - int last_pallet_layerQty = 0; - int last_pressCrib_layerQty = 0; - float last_codeLayerX1_interval = 0f; - float last_codeLayerY1_interval = 0f; - float last_codeLayerX2_interval = 0f; - float last_codeLayerY2_interval = 0f; - float last_codeLayerX3_interval = 0f; - float last_codeLayerY3_interval = 0f; - float last_codeLayerX1_offset = 0f; - float last_codeLayerY1_offset = 0f; - float last_codeLayerX2_offset = 0f; - float last_codeLayerY2_offset = 0f; - float last_codeLayerX3_offset = 0f; - float last_codeLayerY3_offset = 0f; - float last_pressLayerX1_interval = 0f; - float last_pressLayerY1_interval = 0f; - float last_pressLayerX2_interval = 0f; - float last_pressLayerY2_interval = 0f; - float last_pressLayerX3_interval = 0f; - float last_pressLayerY3_interval = 0f; - float last_pressLayerX1_offset = 0f; - float last_pressLayerY1_offset = 0f; - float last_pressLayerX2_offset = 0f; - float last_pressLayerY2_offset = 0f; - float last_pressLayerX3_offset = 0f; - float last_pressLayerY3_offset = 0f; - int last_one_cribTotal = 0; - int last_two_cribTotal = 0; - int last_one_qty = 0; - int last_two_qty = 0; - int last_tool_coordinate = 0; + int batch = 0; + int last_batch = 0; + String specifications = ""; + String last_specifications = ""; @Override public Device getDevice() { @@ -249,65 +139,9 @@ public class LnshSplitManipulatorDeviceDriver extends AbstractOpcDeviceDriver im production_time = this.itemProtocol.getProduction_time(); error_time = this.itemProtocol.getError_time(); total_split = this.itemProtocol.getTotal_split(); - - 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(); - one_cribTotal = this.itemProtocol.getOne_cribTotal(); - two_cribTotal = this.itemProtocol.getTwo_cribTotal(); - one_qty = this.itemProtocol.getOne_qty(); - two_qty = this.itemProtocol.getTwo_qty(); - tool_coordinate = this.itemProtocol.getTool_coordinate(); + onoff_status = this.itemProtocol.getOnoff_status(); + batch = this.itemProtocol.getBatch(); + specifications = this.itemProtocol.getSpecifications(); if (mode != last_mode) { this.setRequireSucess(false); @@ -322,6 +156,10 @@ public class LnshSplitManipulatorDeviceDriver extends AbstractOpcDeviceDriver im logServer.deviceLog(this.device_code,"error" ,String.valueOf(error)); logServer.deviceLogToacs(this.device_code,"","","信号error:" + last_error + "->" + error); } + if (onoff_status != last_onoff_status) { + logServer.deviceLog(this.device_code,"onoff_status" ,String.valueOf(onoff_status)); + logServer.deviceLogToacs(this.device_code,"","","信号onoff_status:" + last_onoff_status + "->" + onoff_status); + } if (open_time != last_open_time) { logServer.deviceLog(this.device_code,"open_time" ,String.valueOf(open_time)); logServer.deviceLogToacs(this.device_code,"","","信号open_time:" + last_open_time + "->" + open_time); @@ -350,237 +188,13 @@ public class LnshSplitManipulatorDeviceDriver extends AbstractOpcDeviceDriver im logServer.deviceLog(this.device_code,"total_split" ,String.valueOf(total_split)); logServer.deviceLogToacs(this.device_code,"","","信号total_split:" + last_total_split + "->" + total_split); } - if (product_code != last_product_code) { - logServer.deviceLog(this.device_code,"product_code" ,String.valueOf(product_code)); - logServer.deviceLogToacs(this.device_code,"","","信号product_code:" + last_product_code + "->" + product_code); + if (batch != last_batch) { + logServer.deviceLog(this.device_code,"batch" ,String.valueOf(batch)); + logServer.deviceLogToacs(this.device_code,"","","信号batch:" + last_batch + "->" + batch); } - if (AlongSide != last_AlongSide) { - logServer.deviceLog(this.device_code,"AlongSide" ,String.valueOf(AlongSide)); - logServer.deviceLogToacs(this.device_code,"","","信号AlongSide:" + last_AlongSide + "->" + AlongSide); - } - if (BshortSide != last_BshortSide) { - logServer.deviceLog(this.device_code,"BshortSide" ,String.valueOf(BshortSide)); - logServer.deviceLogToacs(this.device_code,"","","信号BshortSide:" + last_BshortSide + "->" + BshortSide); - } - if (Htrapezoidal != last_Htrapezoidal) { - logServer.deviceLog(this.device_code,"Htrapezoidal" ,String.valueOf(Htrapezoidal)); - logServer.deviceLogToacs(this.device_code,"","","信号Htrapezoidal:" + last_Htrapezoidal + "->" + Htrapezoidal); - } - if (Wthickness != last_Wthickness) { - logServer.deviceLog(this.device_code,"Wthickness" ,String.valueOf(Wthickness)); - logServer.deviceLogToacs(this.device_code,"","","信号Wthickness:" + last_Wthickness + "->" + Wthickness); - } - if (tray_qty != last_tray_qty) { - logServer.deviceLog(this.device_code,"tray_qty" ,String.valueOf(tray_qty)); - logServer.deviceLogToacs(this.device_code,"","","信号tray_qty:" + last_tray_qty + "->" + tray_qty); - } - if (tray_high != last_tray_high) { - logServer.deviceLog(this.device_code,"tray_high" ,String.valueOf(tray_high)); - logServer.deviceLogToacs(this.device_code,"","","信号tray_high:" + last_tray_high + "->" + tray_high); - } - if (crib_category != last_crib_category) { - logServer.deviceLog(this.device_code,"crib_category" ,String.valueOf(crib_category)); - logServer.deviceLogToacs(this.device_code,"","","信号crib_category:" + last_crib_category + "->" + crib_category); - } - if (palletX1_line != last_palletX1_line) { - logServer.deviceLog(this.device_code,"palletX1_line" ,String.valueOf(palletX1_line)); - logServer.deviceLogToacs(this.device_code,"","","信号palletX1_line:" + last_palletX1_line + "->" + palletX1_line); - } - if (palletY1_row != last_palletY1_row) { - logServer.deviceLog(this.device_code,"palletY1_row" ,String.valueOf(palletY1_row)); - logServer.deviceLogToacs(this.device_code,"","","信号palletY1_row:" + last_palletY1_row + "->" + palletY1_row); - } - if (palletA1_angle != last_palletA1_angle) { - logServer.deviceLog(this.device_code,"palletA1_angle" ,String.valueOf(palletA1_angle)); - logServer.deviceLogToacs(this.device_code,"","","信号palletA1_angle:" + last_palletA1_angle + "->" + palletA1_angle); - } - if (palletX2_line != last_palletX2_line) { - logServer.deviceLog(this.device_code,"palletX2_line" ,String.valueOf(palletX2_line)); - logServer.deviceLogToacs(this.device_code,"","","信号palletX2_line:" + last_palletX2_line + "->" + palletX2_line); - } - if (palletY2_row != last_palletY2_row) { - logServer.deviceLog(this.device_code,"palletY2_row" ,String.valueOf(palletY2_row)); - logServer.deviceLogToacs(this.device_code,"","","信号palletY2_row:" + last_palletY2_row + "->" + palletY2_row); - } - if (palletA2_angle != last_palletA2_angle) { - logServer.deviceLog(this.device_code,"palletA2_angle" ,String.valueOf(palletA2_angle)); - logServer.deviceLogToacs(this.device_code,"","","信号palletA2_angle:" + last_palletA2_angle + "->" + palletA2_angle); - } - if (palletX3_line != last_palletX3_line) { - logServer.deviceLog(this.device_code,"palletX3_line" ,String.valueOf(palletX3_line)); - logServer.deviceLogToacs(this.device_code,"","","信号palletX3_line:" + last_palletX3_line + "->" + palletX3_line); - } - if (palletY3_row != last_palletY3_row) { - logServer.deviceLog(this.device_code,"palletY3_row" ,String.valueOf(palletY3_row)); - logServer.deviceLogToacs(this.device_code,"","","信号palletY3_row:" + last_palletY3_row + "->" + palletY3_row); - } - if (palletA3_angle != last_palletA3_angle) { - logServer.deviceLog(this.device_code,"palletA3_angle" ,String.valueOf(palletA3_angle)); - logServer.deviceLogToacs(this.device_code,"","","信号palletA3_angle:" + last_palletA3_angle + "->" + palletA3_angle); - } - if (pressCribX1_line != last_pressCribX1_line) { - logServer.deviceLog(this.device_code,"pressCribX1_line" ,String.valueOf(pressCribX1_line)); - logServer.deviceLogToacs(this.device_code,"","","信号pressCribX1_line:" + last_pressCribX1_line + "->" + pressCribX1_line); - } - if (pressCribY1_row != last_pressCribY1_row) { - logServer.deviceLog(this.device_code,"pressCribY1_row" ,String.valueOf(pressCribY1_row)); - logServer.deviceLogToacs(this.device_code,"","","信号pressCribY1_row:" + last_pressCribY1_row + "->" + pressCribY1_row); - } - if (pressCribA1_angle != last_pressCribA1_angle) { - logServer.deviceLog(this.device_code,"pressCribA1_angle" ,String.valueOf(pressCribA1_angle)); - logServer.deviceLogToacs(this.device_code,"","","信号pressCribA1_angle:" + last_pressCribA1_angle + "->" + pressCribA1_angle); - } - if (pressCribX2_line != last_pressCribX2_line) { - logServer.deviceLog(this.device_code,"pressCribX2_line" ,String.valueOf(pressCribX2_line)); - logServer.deviceLogToacs(this.device_code,"","","信号pressCribX2_line:" + last_pressCribX2_line + "->" + pressCribX2_line); - } - if (pressCribY2_row != last_pressCribY2_row) { - logServer.deviceLog(this.device_code,"pressCribY2_row" ,String.valueOf(pressCribY2_row)); - logServer.deviceLogToacs(this.device_code,"","","信号pressCribY2_row:" + last_pressCribY2_row + "->" + pressCribY2_row); - } - if (pressCribA2_angle != last_pressCribA2_angle) { - logServer.deviceLog(this.device_code,"pressCribA2_angle" ,String.valueOf(pressCribA2_angle)); - logServer.deviceLogToacs(this.device_code,"","","信号pressCribA2_angle:" + last_pressCribA2_angle + "->" + pressCribA2_angle); - } - if (pressCribX3_line != last_pressCribX3_line) { - logServer.deviceLog(this.device_code,"pressCribX3_line" ,String.valueOf(pressCribX3_line)); - logServer.deviceLogToacs(this.device_code,"","","信号pressCribX3_line:" + last_pressCribX3_line + "->" + pressCribX3_line); - } - if (pressCribY3_row != last_pressCribY3_row) { - logServer.deviceLog(this.device_code,"pressCribY3_row" ,String.valueOf(pressCribY3_row)); - logServer.deviceLogToacs(this.device_code,"","","信号pressCribY3_row:" + last_pressCribY3_row + "->" + pressCribY3_row); - } - if (pressCribA3_angle != last_pressCribA3_angle) { - logServer.deviceLog(this.device_code,"pressCribA3_angle" ,String.valueOf(pressCribA3_angle)); - logServer.deviceLogToacs(this.device_code,"","","信号pressCribA3_angle:" + last_pressCribA3_angle + "->" + pressCribA3_angle); - } - if (Zoffset != last_Zoffset) { - logServer.deviceLog(this.device_code,"Zoffset" ,String.valueOf(Zoffset)); - logServer.deviceLogToacs(this.device_code,"","","信号Zoffset:" + last_Zoffset + "->" + Zoffset); - } - if (pallet_layerQty != last_pallet_layerQty) { - logServer.deviceLog(this.device_code,"pallet_layerQty" ,String.valueOf(pallet_layerQty)); - logServer.deviceLogToacs(this.device_code,"","","信号pallet_layerQty:" + last_pallet_layerQty + "->" + pallet_layerQty); - } - if (pressCrib_layerQty != last_pressCrib_layerQty) { - logServer.deviceLog(this.device_code,"pressCrib_layerQty" ,String.valueOf(pressCrib_layerQty)); - logServer.deviceLogToacs(this.device_code,"","","信号pressCrib_layerQty:" + last_pressCrib_layerQty + "->" + pressCrib_layerQty); - } - if (codeLayerX1_interval != last_codeLayerX1_interval) { - logServer.deviceLog(this.device_code,"codeLayerX1_interval" ,String.valueOf(codeLayerX1_interval)); - logServer.deviceLogToacs(this.device_code,"","","信号codeLayerX1_interval:" + last_codeLayerX1_interval + "->" + codeLayerX1_interval); - } - if (codeLayerY1_interval != last_codeLayerY1_interval) { - logServer.deviceLog(this.device_code,"codeLayerY1_interval" ,String.valueOf(codeLayerY1_interval)); - logServer.deviceLogToacs(this.device_code,"","","信号codeLayerY1_interval:" + last_codeLayerY1_interval + "->" + codeLayerY1_interval); - } - if (codeLayerX2_interval != last_codeLayerX2_interval) { - logServer.deviceLog(this.device_code,"codeLayerX2_interval" ,String.valueOf(codeLayerX2_interval)); - logServer.deviceLogToacs(this.device_code,"","","信号codeLayerX2_interval:" + last_codeLayerX2_interval + "->" + codeLayerX2_interval); - } - if (codeLayerY2_interval != last_codeLayerY2_interval) { - logServer.deviceLog(this.device_code,"codeLayerY2_interval" ,String.valueOf(codeLayerY2_interval)); - logServer.deviceLogToacs(this.device_code,"","","信号codeLayerY2_interval:" + last_codeLayerY2_interval + "->" + codeLayerY2_interval); - } - if (codeLayerX3_interval != last_codeLayerX3_interval) { - logServer.deviceLog(this.device_code,"codeLayerX3_interval" ,String.valueOf(codeLayerX3_interval)); - logServer.deviceLogToacs(this.device_code,"","","信号codeLayerX3_interval:" + last_codeLayerX3_interval + "->" + codeLayerX3_interval); - } - if (codeLayerY3_interval != last_codeLayerY3_interval) { - logServer.deviceLog(this.device_code,"codeLayerY3_interval" ,String.valueOf(codeLayerY3_interval)); - logServer.deviceLogToacs(this.device_code,"","","信号codeLayerY3_interval:" + last_codeLayerY3_interval + "->" + codeLayerY3_interval); - } - if (codeLayerX1_offset != last_codeLayerX1_offset) { - logServer.deviceLog(this.device_code,"codeLayerX1_offset" ,String.valueOf(codeLayerX1_offset)); - logServer.deviceLogToacs(this.device_code,"","","信号codeLayerX1_offset:" + last_codeLayerX1_offset + "->" + codeLayerX1_offset); - } - if (codeLayerY1_offset != last_codeLayerY1_offset) { - logServer.deviceLog(this.device_code,"codeLayerY1_offset" ,String.valueOf(codeLayerY1_offset)); - logServer.deviceLogToacs(this.device_code,"","","信号codeLayerY1_offset:" + last_codeLayerY1_offset + "->" + codeLayerY1_offset); - } - if (codeLayerX2_offset != last_codeLayerX2_offset) { - logServer.deviceLog(this.device_code,"codeLayerX2_offset" ,String.valueOf(codeLayerX2_offset)); - logServer.deviceLogToacs(this.device_code,"","","信号codeLayerX2_offset:" + last_codeLayerX2_offset + "->" + codeLayerX2_offset); - } - if (codeLayerY2_offset != last_codeLayerY2_offset) { - logServer.deviceLog(this.device_code,"codeLayerY2_offset" ,String.valueOf(codeLayerY2_offset)); - logServer.deviceLogToacs(this.device_code,"","","信号codeLayerY2_offset:" + last_codeLayerY2_offset + "->" + codeLayerY2_offset); - } - if (codeLayerX3_offset != last_codeLayerX3_offset) { - logServer.deviceLog(this.device_code,"codeLayerX3_offset" ,String.valueOf(codeLayerX3_offset)); - logServer.deviceLogToacs(this.device_code,"","","信号codeLayerX3_offset:" + last_codeLayerX3_offset + "->" + codeLayerX3_offset); - } - if (codeLayerY3_offset != last_codeLayerY3_offset) { - logServer.deviceLog(this.device_code,"codeLayerY3_offset" ,String.valueOf(codeLayerY3_offset)); - logServer.deviceLogToacs(this.device_code,"","","信号codeLayerY3_offset:" + last_codeLayerY3_offset + "->" + codeLayerY3_offset); - } - if (pressLayerX1_interval != last_pressLayerX1_interval) { - logServer.deviceLog(this.device_code,"pressLayerX1_interval" ,String.valueOf(pressLayerX1_interval)); - logServer.deviceLogToacs(this.device_code,"","","信号pressLayerX1_interval:" + last_pressLayerX1_interval + "->" + pressLayerX1_interval); - } - if (pressLayerY1_interval != last_pressLayerY1_interval) { - logServer.deviceLog(this.device_code,"pressLayerY1_interval" ,String.valueOf(pressLayerY1_interval)); - logServer.deviceLogToacs(this.device_code,"","","信号pressLayerY1_interval:" + last_pressLayerY1_interval + "->" + pressLayerY1_interval); - } - if (pressLayerX2_interval != last_pressLayerX2_interval) { - logServer.deviceLog(this.device_code,"pressLayerX2_interval" ,String.valueOf(pressLayerX2_interval)); - logServer.deviceLogToacs(this.device_code,"","","信号pressLayerX2_interval:" + last_pressLayerX2_interval + "->" + pressLayerX2_interval); - } - if (pressLayerY2_interval != last_pressLayerY2_interval) { - logServer.deviceLog(this.device_code,"pressLayerY2_interval" ,String.valueOf(pressLayerY2_interval)); - logServer.deviceLogToacs(this.device_code,"","","信号pressLayerY2_interval:" + last_pressLayerY2_interval + "->" + pressLayerY2_interval); - } - if (pressLayerX3_interval != last_pressLayerX3_interval) { - logServer.deviceLog(this.device_code,"pressLayerX3_interval" ,String.valueOf(pressLayerX3_interval)); - logServer.deviceLogToacs(this.device_code,"","","信号pressLayerX3_interval:" + last_pressLayerX3_interval + "->" + pressLayerX3_interval); - } - if (pressLayerY3_interval != last_pressLayerY3_interval) { - logServer.deviceLog(this.device_code,"pressLayerY3_interval" ,String.valueOf(pressLayerY3_interval)); - logServer.deviceLogToacs(this.device_code,"","","信号pressLayerY3_interval:" + last_pressLayerY3_interval + "->" + pressLayerY3_interval); - } - if (pressLayerX1_offset != last_pressLayerX1_offset) { - logServer.deviceLog(this.device_code,"pressLayerX1_offset" ,String.valueOf(pressLayerX1_offset)); - logServer.deviceLogToacs(this.device_code,"","","信号pressLayerX1_offset:" + last_pressLayerX1_offset + "->" + pressLayerX1_offset); - } - if (pressLayerY1_offset != last_pressLayerY1_offset) { - logServer.deviceLog(this.device_code,"pressLayerY1_offset" ,String.valueOf(pressLayerY1_offset)); - logServer.deviceLogToacs(this.device_code,"","","信号pressLayerY1_offset:" + last_pressLayerY1_offset + "->" + pressLayerY1_offset); - } - if (pressLayerX2_offset != last_pressLayerX2_offset) { - logServer.deviceLog(this.device_code,"pressLayerX2_offset" ,String.valueOf(pressLayerX2_offset)); - logServer.deviceLogToacs(this.device_code,"","","信号pressLayerX2_offset:" + last_pressLayerX2_offset + "->" + pressLayerX2_offset); - } - if (pressLayerY2_offset != last_pressLayerY2_offset) { - logServer.deviceLog(this.device_code,"pressLayerY2_offset" ,String.valueOf(pressLayerY2_offset)); - logServer.deviceLogToacs(this.device_code,"","","信号pressLayerY2_offset:" + last_pressLayerY2_offset + "->" + pressLayerY2_offset); - } - if (pressLayerX3_offset != last_pressLayerX3_offset) { - logServer.deviceLog(this.device_code,"pressLayerX3_offset" ,String.valueOf(pressLayerX3_offset)); - logServer.deviceLogToacs(this.device_code,"","","信号pressLayerX3_offset:" + last_pressLayerX3_offset + "->" + pressLayerX3_offset); - } - if (pressLayerY3_offset != last_pressLayerY3_offset) { - logServer.deviceLog(this.device_code,"pressLayerY3_offset" ,String.valueOf(pressLayerY3_offset)); - logServer.deviceLogToacs(this.device_code,"","","信号pressLayerY3_offset:" + last_pressLayerY3_offset + "->" + pressLayerY3_offset); - } - if (one_cribTotal != last_one_cribTotal) { - logServer.deviceLog(this.device_code,"one_cribTotal" ,String.valueOf(one_cribTotal)); - logServer.deviceLogToacs(this.device_code,"","","信号one_cribTotal:" + last_one_cribTotal + "->" + one_cribTotal); - } - if (two_cribTotal != last_two_cribTotal) { - logServer.deviceLog(this.device_code,"two_cribTotal" ,String.valueOf(two_cribTotal)); - logServer.deviceLogToacs(this.device_code,"","","信号two_cribTotal:" + last_two_cribTotal + "->" + two_cribTotal); - } - if (one_qty != last_one_qty) { - logServer.deviceLog(this.device_code,"one_qty" ,String.valueOf(one_qty)); - logServer.deviceLogToacs(this.device_code,"","","信号one_qty:" + last_one_qty + "->" + one_qty); - } - if (two_qty != last_two_qty) { - logServer.deviceLog(this.device_code,"two_qty" ,String.valueOf(two_qty)); - logServer.deviceLogToacs(this.device_code,"","","信号two_qty:" + last_two_qty + "->" + two_qty); - } - if (tool_coordinate != last_tool_coordinate) { - logServer.deviceLog(this.device_code,"tool_coordinate" ,String.valueOf(tool_coordinate)); - logServer.deviceLogToacs(this.device_code,"","","信号tool_coordinate:" + last_tool_coordinate + "->" + tool_coordinate); + if (!StrUtil.equals(specifications,last_specifications)) { + logServer.deviceLog(this.device_code,"specifications" ,specifications); + logServer.deviceLogToacs(this.device_code,"","","信号specifications:" + last_specifications + "->" + specifications); } } catch (Exception var17) { @@ -657,65 +271,9 @@ public class LnshSplitManipulatorDeviceDriver extends AbstractOpcDeviceDriver im last_production_time = production_time; last_error_time = error_time; last_total_split = total_split; - - last_product_code = product_code; - last_AlongSide = AlongSide; - last_BshortSide = BshortSide; - last_Htrapezoidal = Htrapezoidal; - last_Wthickness = Wthickness; - last_tray_qty = tray_qty; - last_tray_high = tray_high; - last_crib_category = crib_category; - last_palletX1_line = palletX1_line; - last_palletY1_row = palletY1_row; - last_palletA1_angle = palletA1_angle; - last_palletX2_line = palletX2_line; - last_palletY2_row = palletY2_row; - last_palletA2_angle = palletA2_angle; - last_palletX3_line = palletX3_line; - last_palletY3_row = palletY3_row; - last_palletA3_angle = palletA3_angle; - last_pressCribX1_line = pressCribX1_line; - last_pressCribY1_row = pressCribY1_row; - last_pressCribA1_angle = pressCribA1_angle; - last_pressCribX2_line = pressCribX2_line; - last_pressCribY2_row = pressCribY2_row; - last_pressCribA2_angle = pressCribA2_angle; - last_pressCribX3_line = pressCribX3_line; - last_pressCribY3_row = pressCribY3_row; - last_pressCribA3_angle = pressCribA3_angle; - last_Zoffset = Zoffset; - last_pallet_layerQty = pallet_layerQty; - last_pressCrib_layerQty = pressCrib_layerQty; - last_codeLayerX1_interval = codeLayerX1_interval; - last_codeLayerY1_interval = codeLayerY1_interval; - last_codeLayerX2_interval = codeLayerX2_interval; - last_codeLayerY2_interval = codeLayerY2_interval; - last_codeLayerX3_interval = codeLayerX3_interval; - last_codeLayerY3_interval = codeLayerY3_interval; - last_codeLayerX1_offset = codeLayerX1_offset; - last_codeLayerY1_offset = codeLayerY1_offset; - last_codeLayerX2_offset = codeLayerX2_offset; - last_codeLayerY2_offset = codeLayerY2_offset; - last_codeLayerX3_offset = codeLayerX3_offset; - last_codeLayerY3_offset = codeLayerY3_offset; - last_pressLayerX1_interval = pressLayerX1_interval; - last_pressLayerY1_interval = pressLayerY1_interval; - last_pressLayerX2_interval = pressLayerX2_interval; - last_pressLayerY2_interval = pressLayerY2_interval; - last_pressLayerX3_interval = pressLayerX3_interval; - last_pressLayerY3_interval = pressLayerY3_interval; - last_pressLayerX1_offset = pressLayerX1_offset; - last_pressLayerY1_offset = pressLayerY1_offset; - last_pressLayerX2_offset = pressLayerX2_offset; - last_pressLayerY2_offset = pressLayerY2_offset; - last_pressLayerX3_offset = pressLayerX3_offset; - last_pressLayerY3_offset = pressLayerY3_offset; - last_one_cribTotal = one_cribTotal; - last_two_cribTotal = two_cribTotal; - last_one_qty = one_qty; - last_two_qty = two_qty; - last_tool_coordinate = tool_coordinate; + last_onoff_status = onoff_status; + last_batch = batch; + last_specifications = specifications; } @@ -750,125 +308,9 @@ public class LnshSplitManipulatorDeviceDriver extends AbstractOpcDeviceDriver im String qty = content.getString("qty"); String material_code = content.getString("material_code"); String material_name = content.getString("material_name"); - String product_code = content.getString("product_code"); - String AlongSide = content.getString("AlongSide"); - String BshortSide = content.getString("BshortSide"); - String Htrapezoidal = content.getString("Htrapezoidal"); - String Wthickness = content.getString("Wthickness"); - String tray_qty = content.getString("tray_qty"); - String tray_high = content.getString("tray_high"); - String crib_category = content.getString("crib_category"); - String palletX1_line = content.getString("palletX1_line"); - String palletY1_row = content.getString("palletY1_row"); - String palletA1_angle = content.getString("palletA1_angle"); - String palletX2_line = content.getString("palletX2_line"); - String palletY2_row = content.getString("palletY2_row"); - String palletA2_angle = content.getString("palletA2_angle"); - String palletX3_line = content.getString("palletX3_line"); - String palletY3_row = content.getString("palletY3_row"); - String palletA3_angle = content.getString("palletA3_angle"); - String pressCribX1_line = content.getString("pressCribX1_line"); - String pressCribY1_row = content.getString("pressCribY1_row"); - String pressCribA1_angle = content.getString("pressCribA1_angle"); - String pressCribX2_line = content.getString("pressCribX2_line"); - String pressCribY2_row = content.getString("pressCribY2_row"); - String pressCribA2_angle = content.getString("pressCribA2_angle"); - String pressCribX3_line = content.getString("pressCribX3_line"); - String pressCribY3_row = content.getString("pressCribY3_row"); - String pressCribA3_angle = content.getString("pressCribA3_angle"); - 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 one_cribTotal = content.getString("one_cribTotal"); - String two_cribTotal = content.getString("two_cribTotal"); - String one_qty = content.getString("one_qty"); - String two_qty = content.getString("two_qty"); - String tool_coordinate = content.getString("tool_coordinate"); this.writing(this.mode); this.writing("to_material",material_code); - this.writing("to_AlongSide",AlongSide); - this.writing("to_BshortSide",BshortSide); - this.writing("to_Htrapezoidal",Htrapezoidal); - this.writing("to_Wthickness",Wthickness); - this.writing("to_tray_qty",tray_qty); - this.writing("to_tray_high",tray_high); - this.writing("to_crib_category",crib_category); - this.writing("to_palletX1_line",palletX1_line); - this.writing("to_palletY1_row",palletY1_row); - this.writing("to_palletA1_angle",palletA1_angle); - this.writing("to_palletX2_line",palletX2_line); - this.writing("to_palletY2_row",palletY2_row); - this.writing("to_palletA2_angle",palletA2_angle); - this.writing("to_palletX3_line",palletX3_line); - this.writing("to_palletY3_row",palletY3_row); - this.writing("to_palletA3_angle",palletA3_angle); - this.writing("to_pressCribX1_line",pressCribX1_line); - this.writing("to_pressCribY1_row",pressCribY1_row); - this.writing("to_pressCribA1_angle",pressCribA1_angle); - this.writing("to_pressCribX2_line",pressCribX2_line); - this.writing("to_pressCribY2_row",pressCribY2_row); - this.writing("to_pressCribA2_angle",pressCribA2_angle); - this.writing("to_pressCribX3_line",pressCribX3_line); - this.writing("to_pressCribY3_row",pressCribY3_row); - this.writing("to_pressCribA3_angle",pressCribA3_angle); - this.writing("to_Zoffset",Zoffset); - this.writing("to_pallet_layerQty",pallet_layerQty); - this.writing("to_pressCrib_layerQty",pressCrib_layerQty); - this.writing("to_codeLayerX1_interval",codeLayerX1_interval); - this.writing("to_codeLayerY1_interval",codeLayerY1_interval); - this.writing("to_codeLayerX2_interval",codeLayerX2_interval); - this.writing("to_codeLayerY2_interval",codeLayerY2_interval); - this.writing("to_codeLayerX3_interval",codeLayerX3_interval); - this.writing("to_codeLayerY3_interval",codeLayerY3_interval); - this.writing("to_codeLayerX1_offset",codeLayerX1_offset); - this.writing("to_codeLayerY1_offset",codeLayerY1_offset); - this.writing("to_codeLayerX2_offset",codeLayerX2_offset); - this.writing("to_codeLayerY2_offset",codeLayerY2_offset); - this.writing("to_codeLayerX3_offset",codeLayerX3_offset); - this.writing("to_codeLayerY3_offset",codeLayerY3_offset); - this.writing("to_pressLayerX1_interval",pressLayerX1_interval); - this.writing("to_pressLayerY1_interval",pressLayerY1_interval); - this.writing("to_pressLayerX2_interval",pressLayerX2_interval); - this.writing("to_pressLayerY2_interval",pressLayerY2_interval); - this.writing("to_pressLayerX3_interval",pressLayerX3_interval); - this.writing("to_pressLayerY3_interval",pressLayerY3_interval); - this.writing("to_pressLayerX1_offset",pressLayerX1_offset); - this.writing("to_pressLayerY1_offset",pressLayerY1_offset); - this.writing("to_pressLayerX2_offset",pressLayerX2_offset); - this.writing("to_pressLayerY2_offset",pressLayerY2_offset); - this.writing("to_pressLayerX3_offset",pressLayerX3_offset); - this.writing("to_pressLayerY3_offset",pressLayerY3_offset); - this.writing("to_one_cribTotal",one_cribTotal); - this.writing("to_two_cribTotal",two_cribTotal); - this.writing("to_one_qty",one_qty); - this.writing("to_two_qty",two_qty); - this.writing("to_tool_coordinate",tool_coordinate); - } requireSucess = true; return true; @@ -892,64 +334,6 @@ public class LnshSplitManipulatorDeviceDriver extends AbstractOpcDeviceDriver im json.put("qty",total_split); json.put("vehicle_code",barcode); json.put("is_full","1"); - json.put("product_code",product_code); - json.put("AlongSide",AlongSide); - json.put("BshortSide",BshortSide); - json.put("Htrapezoidal",Htrapezoidal); - json.put("Wthickness",Wthickness); - json.put("tray_qty",tray_qty); - json.put("tray_high",tray_high); - json.put("crib_category",crib_category); - json.put("palletX1_line",palletX1_line); - json.put("palletY1_row",palletY1_row); - json.put("palletA1_angle",palletA1_angle); - json.put("palletX2_line",palletX2_line); - json.put("palletY2_row",palletY2_row); - json.put("palletA2_angle",palletA2_angle); - json.put("palletX3_line",palletX3_line); - json.put("palletY3_row",palletY3_row); - json.put("palletA3_angle",palletA3_angle); - json.put("pressCribX1_line",pressCribX1_line); - json.put("pressCribY1_row",pressCribY1_row); - json.put("pressCribA1_angle",pressCribA1_angle); - json.put("pressCribX2_line",pressCribX2_line); - json.put("pressCribY2_row",pressCribY2_row); - json.put("pressCribA2_angle",pressCribA2_angle); - json.put("pressCribX3_line",pressCribX3_line); - json.put("pressCribY3_row",pressCribY3_row); - json.put("pressCribA3_angle",pressCribA3_angle); - 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("one_cribTotal",one_cribTotal); - json.put("two_cribTotal",two_cribTotal); - json.put("one_qty",one_qty); - json.put("two_qty",two_qty); - json.put("tool_coordinate",tool_coordinate); HttpResponse result = acsToWmsService.applyTaskManipulatorToWms(json); if (result.getStatus() == 200) { diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/ItemProtocol.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/ItemProtocol.java index 76608a7..38a0a93 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/ItemProtocol.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/ItemProtocol.java @@ -24,9 +24,13 @@ public class ItemProtocol { public static String item_weight = "weight"; public static String item_material = "material"; public static String item_barcode = "barcode"; + public static String item_specifications = "specifications"; + public static String item_batch = "batch"; + 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_barcode = "to_barcode"; Boolean isonline; @@ -77,6 +81,14 @@ public class ItemProtocol { return this.getOpcStringValue(item_barcode); } + public String getSpecifications() { + return this.getOpcStringValue(item_specifications); + } + + public int getBatch() { + return this.getOpcIntegerValue(item_batch); + } + public int getToCommand() { return this.getOpcIntegerValue(item_to_command); } @@ -89,6 +101,10 @@ public class ItemProtocol { return this.getOpcIntegerValue(item_to_task); } + public int getTo_barcode() { + return this.getOpcIntegerValue(item_to_barcode); + } + //是否有货 public int hasGoods(int move) { return move; @@ -126,8 +142,10 @@ public class ItemProtocol { list.add(new ItemDto(item_error, "报警信号", "DB4.B5")); list.add(new ItemDto(item_task, "任务号", "DB4.D6")); list.add(new ItemDto(item_weight, "重量", "DB4.D10")); - list.add(new ItemDto(item_material, "物料", "DB4.S14")); - list.add(new ItemDto(item_barcode, "条码", "DB4.S270")); + list.add(new ItemDto(item_batch, "批次", "DB4.D14")); + list.add(new ItemDto(item_material, "物料", "DB4.S18")); + list.add(new ItemDto(item_barcode, "条码", "DB4.S274")); + list.add(new ItemDto(item_specifications, "规格", "DB4.S530")); return list; } @@ -136,6 +154,7 @@ public class ItemProtocol { list.add(new ItemDto(item_to_command, "作业命令", "DB5.W0", Boolean.valueOf(true))); list.add(new ItemDto(item_to_target, "目标站", "DB5.W2")); list.add(new ItemDto(item_to_task, "任务号", "DB5.D4")); + list.add(new ItemDto(item_to_barcode, "条码", "DB5.S8")); return list; } diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDefination.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDefination.java index 65b0310..8d1aa4f 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDefination.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDefination.java @@ -65,8 +65,10 @@ public class LnshStationDefination implements OpcDeviceDriverDefination { list.add(new ItemDto(ItemProtocol.item_error, "报警信号", "DB4.B5")); list.add(new ItemDto(ItemProtocol.item_task, "任务号", "DB4.D6")); list.add(new ItemDto(ItemProtocol.item_weight, "重量", "DB4.D10")); - list.add(new ItemDto(ItemProtocol.item_material, "物料", "DB4.S14")); - list.add(new ItemDto(ItemProtocol.item_barcode, "条码", "DB4.S270")); + list.add(new ItemDto(ItemProtocol.item_batch, "批次", "DB4.D14")); + list.add(new ItemDto(ItemProtocol.item_material, "物料", "DB4.S18")); + list.add(new ItemDto(ItemProtocol.item_barcode, "条码", "DB4.S274")); + list.add(new ItemDto(ItemProtocol.item_specifications, "规格", "DB4.S530")); return list; } diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDeviceDriver.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDeviceDriver.java index 2e6e37d..878979a 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDeviceDriver.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDeviceDriver.java @@ -111,6 +111,10 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements String last_material; String barcode; String last_barcode; + String specifications = ""; + String last_specifications = ""; + int batch = 0; + int last_batch = 0; @Override public Device getDevice() { @@ -134,6 +138,8 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements weight = this.itemProtocol.getWeight(); material = this.itemProtocol.getMaterial(); barcode = this.itemProtocol.getBarcode(); + batch = this.itemProtocol.getBatch(); + specifications = this.itemProtocol.getSpecifications(); if (mode != last_mode) { this.setRequireSucess(false); @@ -164,6 +170,10 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements logServer.deviceLog(this.device_code,"weight",String.valueOf(weight)); logServer.deviceLogToacs(this.device_code,"","","信号weight: " + last_weight + "->" + weight); } + if (batch != last_batch) { + logServer.deviceLog(this.device_code,"batch",String.valueOf(batch)); + logServer.deviceLogToacs(this.device_code,"","","信号batch: " + last_batch + "->" + batch); + } if (!StrUtil.equals(material,last_material)) { logServer.deviceLog(this.device_code,"material", material); logServer.deviceLogToacs(this.device_code,"","","信号material:" + last_material + "->" + material); @@ -172,6 +182,10 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements logServer.deviceLog(this.device_code,"barcode", barcode); logServer.deviceLogToacs(this.device_code,"","","信号barcode:" + last_barcode + "->" + barcode); } + if (!StrUtil.equals(specifications,last_specifications)) { + logServer.deviceLog(this.device_code,"specifications", specifications); + logServer.deviceLogToacs(this.device_code,"","","信号specifications:" + last_specifications + "->" + specifications); + } } catch (Exception var17) { return; @@ -238,6 +252,8 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements last_weight = weight; last_material = material; last_barcode = barcode; + last_specifications = specifications; + last_batch = batch; } diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/rljn_package_palletSplit_manipulator/ItemProtocol.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/rljn_package_palletSplit_manipulator/ItemProtocol.java new file mode 100644 index 0000000..195776c --- /dev/null +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/rljn_package_palletSplit_manipulator/ItemProtocol.java @@ -0,0 +1,926 @@ +package org.nl.acs.device_driver.lnsh.rljn_package_palletSplit_manipulator; + +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import lombok.Data; +import lombok.extern.slf4j.Slf4j; +import org.nl.acs.device.device_driver.standard_inspect.ItemDto; + +import java.util.ArrayList; +import java.util.List; + +@Slf4j +@Data +public class ItemProtocol { + + public static String item_heartbeat = "heartbeat"; + public static String item_mode = "mode"; + public static String item_status = "status"; + public static String item_error = "error"; + public static String item_onoff_status = "onoff_status"; + public static String item_putStation = "putStation"; + public static String item_getStation = "getStation"; + public static String item_barcode = "barcode"; + public static String item_material = "material"; + public static String item_qty = "qty"; + public static String item_batch = "batch"; + public static String item_specifications = "specifications"; + public static String item_open_time = "open_time"; + public static String item_standby_time = "standby_time "; + 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_total_split = "total_split"; + + 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_one_cribTotal = "one_cribTotal"; + public static String item_two_cribTotal = "two_cribTotal"; + public static String item_one_qty = "one_qty"; + public static String item_two_qty = "two_qty"; + public static String item_tool_coordinate = "tool_coordinate"; + + public static String item_to_feedback = "to_feedback"; + public static String item_to_error = "to_error"; + public static String item_to_material_qty = "to_material_qty"; + public static String item_to_allow_pallet_qty = "to_allow_pallet_qty"; + public static String item_to_material_type = "to_material_type"; + public static String item_to_material_code = "to_material_code"; + public static String item_to_order_No = "to_order_No"; + + 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_one_cribTotal = "to_one_cribTotal"; + public static String item_to_two_cribTotal = "to_two_cribTotal"; + public static String item_to_one_qty = "to_one_qty"; + public static String item_to_two_qty = "to_two_qty"; + public static String item_to_tool_coordinate = "to_tool_coordinate"; + + + private RljnPackagePalletSplitManipulatorDeviceDriver driver; + + public ItemProtocol(RljnPackagePalletSplitManipulatorDeviceDriver driver) { + this.driver = driver; + } + + public int getHeartbeat() { + return this.getOpcIntegerValue(item_heartbeat); + } + + public int getMode() { + return this.getOpcIntegerValue(item_mode); + } + + public int getStatus() { + return this.getOpcIntegerValue(item_status); + } + + public int getError() { + return this.getOpcIntegerValue(item_error); + } + + public int getOnoff_status() { + return this.getOpcIntegerValue(item_onoff_status); + } + + public int getPutStation() { + return this.getOpcIntegerValue(item_putStation); + } + + public int getGetStation() { + return this.getOpcIntegerValue(item_getStation); + } + + public String getBarcode() { + return this.getOpcStringValue(item_barcode); + } + + public String getMaterial() { + return this.getOpcStringValue(item_material); + } + + public int getQty() { + return this.getOpcIntegerValue(item_qty); + } + + public String getSpecifications() { + return this.getOpcStringValue(item_specifications); + } + public int getBatch() { + return this.getOpcIntegerValue(item_batch); + } + + public int getOpen_time() { + return this.getOpcIntegerValue(item_open_time); + } + + public int getStandby_time() { + return this.getOpcIntegerValue(item_standby_time); + } + + public int getProduction_time() { + return this.getOpcIntegerValue(item_production_time); + } + + public int getError_time() { + return this.getOpcIntegerValue(item_error_time); + } + + public int getOrder_No() { + return this.getOpcIntegerValue(item_order_No); + } + + public int getTotal_split() { + return this.getOpcIntegerValue(item_total_split); + } + + + 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 Float getPalletX1_line() { + return this.getOpcFloatValue(item_palletX1_line); + } + + public Float getPalletY1_row() { + return this.getOpcFloatValue(item_palletY1_row); + } + + public Float getPalletA1_angle() { + return this.getOpcFloatValue(item_palletA1_angle); + } + + public Float getPalletX2_line() { + return this.getOpcFloatValue(item_palletX2_line); + } + + public Float getPalletY2_row() { + return this.getOpcFloatValue(item_palletY2_row); + } + + public Float getPalletA2_angle() { + return this.getOpcFloatValue(item_palletA2_angle); + } + + public Float getPalletX3_line() { + return this.getOpcFloatValue(item_palletX3_line); + } + + public Float getPalletY3_row() { + return this.getOpcFloatValue(item_palletY3_row); + } + + public Float getPalletA3_angle() { + return this.getOpcFloatValue(item_palletA3_angle); + } + + public Float getPressCribX1_line() { + return this.getOpcFloatValue(item_pressCribX1_line); + } + + public Float getPressCribY1_row() { + return this.getOpcFloatValue(item_pressCribY1_row); + } + + public Float getPressCribA1_angle() { + return this.getOpcFloatValue(item_pressCribA1_angle); + } + + public Float getPressCribX2_line() { + return this.getOpcFloatValue(item_pressCribX2_line); + } + + public Float getPressCribY2_row() { + return this.getOpcFloatValue(item_pressCribY2_row); + } + + public Float getPressCribA2_angle() { + return this.getOpcFloatValue(item_pressCribA2_angle); + } + + public Float getPressCribX3_line() { + return this.getOpcFloatValue(item_pressCribX3_line); + } + + public Float getPressCribY3_row() { + return this.getOpcFloatValue(item_pressCribY3_row); + } + + public Float getPressCribA3_angle() { + return this.getOpcFloatValue(item_pressCribA3_angle); + } + + public Float getZoffset() { + return this.getOpcFloatValue(item_Zoffset); + } + + public int getPallet_layerQty() { + return this.getOpcIntegerValue(item_pallet_layerQty); + } + + public int getPressCrib_layerQty() { + return this.getOpcIntegerValue(item_pressCrib_layerQty); + } + + public Float getCodeLayerX1_interval() { + return this.getOpcFloatValue(item_codeLayerX1_interval); + } + + public Float getCodeLayerY1_interval() { + return this.getOpcFloatValue(item_codeLayerY1_interval); + } + + public Float getCodeLayerX2_interval() { + return this.getOpcFloatValue(item_codeLayerX2_interval); + } + + public Float getCodeLayerY2_interval() { + return this.getOpcFloatValue(item_codeLayerY2_interval); + } + + public Float getCodeLayerX3_interval() { + return this.getOpcFloatValue(item_codeLayerX3_interval); + } + + public Float getcodeLayerY3_interval() { + return this.getOpcFloatValue(item_codeLayerY3_interval); + } + + public Float getCodeLayerX1_offset() { + return this.getOpcFloatValue(item_codeLayerX1_offset); + } + + public Float getCodeLayerY1_offset() { + return this.getOpcFloatValue(item_codeLayerY1_offset); + } + + public Float getCodeLayerX2_offset() { + return this.getOpcFloatValue(item_codeLayerX2_offset); + } + + public Float getCodeLayerY2_offset() { + return this.getOpcFloatValue(item_codeLayerY2_offset); + } + + public Float getCodeLayerX3_offset() { + return this.getOpcFloatValue(item_codeLayerX3_offset); + } + + public Float getCodeLayerY3_offset() { + return this.getOpcFloatValue(item_codeLayerY3_offset); + } + + public Float getPressLayerX1_interval() { + return this.getOpcFloatValue(item_pressLayerX1_interval); + } + + public Float getPressLayerY1_interval() { + return this.getOpcFloatValue(item_pressLayerY1_interval); + } + + public Float getPressLayerX2_interval() { + return this.getOpcFloatValue(item_pressLayerX2_interval); + } + + public Float getPressLayerY2_interval() { + return this.getOpcFloatValue(item_pressLayerY2_interval); + } + + public Float getPressLayerX3_interval() { + return this.getOpcFloatValue(item_pressLayerX3_interval); + } + + public Float getPressLayerY3_interval() { + return this.getOpcFloatValue(item_pressLayerY3_interval); + } + + public Float getPressLayerX1_offset() { + return this.getOpcFloatValue(item_pressLayerX1_offset); + } + + public Float getPressLayerY1_offset() { + return this.getOpcFloatValue(item_pressLayerY1_offset); + } + + public Float getPressLayerX2_offset() { + return this.getOpcFloatValue(item_pressLayerX2_offset); + } + + public Float getPressLayerY2_offset() { + return this.getOpcFloatValue(item_pressLayerY2_offset); + } + + public Float getPressLayerX3_offset() { + return this.getOpcFloatValue(item_pressLayerX3_offset); + } + + public Float getPressLayerY3_offset() { + return this.getOpcFloatValue(item_pressLayerY3_offset); + } + + public int getOne_cribTotal() { + return this.getOpcIntegerValue(item_one_cribTotal); + } + + public int getTwo_cribTotal() { + return this.getOpcIntegerValue(item_two_cribTotal); + } + + public int getOne_qty() { + return this.getOpcIntegerValue(item_one_qty); + } + + public int getTwo_qty() { + return this.getOpcIntegerValue(item_two_qty); + } + + public int getTool_coordinate() { + return this.getOpcIntegerValue(item_tool_coordinate); + } + + public int getTo_feedback() { + return this.getOpcIntegerValue(item_to_feedback); + } + + public int getTo_error() { + return this.getOpcIntegerValue(item_to_error); + } + + public int getTo_material_qty() { + return this.getOpcIntegerValue(item_to_material_qty); + } + + public int getTo_allow_pallet_qty() { + return this.getOpcIntegerValue(item_to_allow_pallet_qty); + } + + public int getTo_material_type() { + return this.getOpcIntegerValue(item_to_material_type); + } + + public int getTo_material_code() { + return this.getOpcIntegerValue(item_to_material_code); + } + + public int getTo_order_No() { + return this.getOpcIntegerValue(item_to_order_No); + } + + public int getToProduct_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 Float getToPalletX1_line() { + return this.getOpcFloatValue(item_to_palletX1_line); + } + + public Float getToPalletY1_row() { + return this.getOpcFloatValue(item_to_palletY1_row); + } + + public Float getToPalletA1_angle() { + return this.getOpcFloatValue(item_to_palletA1_angle); + } + + public Float getToPalletX2_line() { + return this.getOpcFloatValue(item_to_palletX2_line); + } + + public Float getToPalletY2_row() { + return this.getOpcFloatValue(item_to_palletY2_row); + } + + public Float getToPalletA2_angle() { + return this.getOpcFloatValue(item_to_palletA2_angle); + } + + public Float getToPalletX3_line() { + return this.getOpcFloatValue(item_to_palletX3_line); + } + + public Float getToPalletY3_row() { + return this.getOpcFloatValue(item_to_palletY3_row); + } + + public Float getToPalletA3_angle() { + return this.getOpcFloatValue(item_to_palletA3_angle); + } + + public Float getToPressCribX1_line() { + return this.getOpcFloatValue(item_to_pressCribX1_line); + } + + public Float getToPressCribY1_row() { + return this.getOpcFloatValue(item_to_pressCribY1_row); + } + + public Float getToPressCribA1_angle() { + return this.getOpcFloatValue(item_to_pressCribA1_angle); + } + + public Float getToPressCribX2_line() { + return this.getOpcFloatValue(item_to_pressCribX2_line); + } + + public Float getToPressCribY2_row() { + return this.getOpcFloatValue(item_to_pressCribY2_row); + } + + public Float getToPressCribA2_angle() { + return this.getOpcFloatValue(item_to_pressCribA2_angle); + } + + public Float getToPressCribX3_line() { + return this.getOpcFloatValue(item_to_pressCribX3_line); + } + + public Float getToPressCribY3_row() { + return this.getOpcFloatValue(item_to_pressCribY3_row); + } + + public Float getToPressCribA3_angle() { + return this.getOpcFloatValue(item_to_pressCribA3_angle); + } + + public Float getToZoffset() { + return this.getOpcFloatValue(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 Float getToCodeLayerX1_interval() { + return this.getOpcFloatValue(item_to_codeLayerX1_interval); + } + + public Float getToCodeLayerY1_interval() { + return this.getOpcFloatValue(item_to_codeLayerY1_interval); + } + + public Float getToCodeLayerX2_interval() { + return this.getOpcFloatValue(item_to_codeLayerX2_interval); + } + + public Float getToCodeLayerY2_interval() { + return this.getOpcFloatValue(item_to_codeLayerY2_interval); + } + + public Float getToCodeLayerX3_interval() { + return this.getOpcFloatValue(item_to_codeLayerX3_interval); + } + + public Float getTocodeLayerY3_interval() { + return this.getOpcFloatValue(item_to_codeLayerY3_interval); + } + + public Float getToCodeLayerX1_offset() { + return this.getOpcFloatValue(item_to_codeLayerX1_offset); + } + + public Float getToCodeLayerY1_offset() { + return this.getOpcFloatValue(item_to_codeLayerY1_offset); + } + + public Float getToCodeLayerX2_offset() { + return this.getOpcFloatValue(item_to_codeLayerX2_offset); + } + + public Float getToCodeLayerY2_offset() { + return this.getOpcFloatValue(item_to_codeLayerY2_offset); + } + + public Float getToCodeLayerX3_offset() { + return this.getOpcFloatValue(item_to_codeLayerX3_offset); + } + + public Float getToCodeLayerY3_offset() { + return this.getOpcFloatValue(item_to_codeLayerY3_offset); + } + + public Float getToPressLayerX1_interval() { + return this.getOpcFloatValue(item_to_pressLayerX1_interval); + } + + public Float getToPressLayerY1_interval() { + return this.getOpcFloatValue(item_to_pressLayerY1_interval); + } + + public Float getToPressLayerX2_interval() { + return this.getOpcFloatValue(item_to_pressLayerX2_interval); + } + + public Float getToPressLayerY2_interval() { + return this.getOpcFloatValue(item_to_pressLayerY2_interval); + } + + public Float getToPressLayerX3_interval() { + return this.getOpcFloatValue(item_to_pressLayerX3_interval); + } + + public Float getToPressLayerY3_interval() { + return this.getOpcFloatValue(item_to_pressLayerY3_interval); + } + + public Float getToPressLayerX1_offset() { + return this.getOpcFloatValue(item_to_pressLayerX1_offset); + } + + public Float getToPressLayerY1_offset() { + return this.getOpcFloatValue(item_to_pressLayerY1_offset); + } + + public Float getToPressLayerX2_offset() { + return this.getOpcFloatValue(item_to_pressLayerX2_offset); + } + + public Float getToPressLayerY2_offset() { + return this.getOpcFloatValue(item_to_pressLayerY2_offset); + } + + public Float getToPressLayerX3_offset() { + return this.getOpcFloatValue(item_to_pressLayerX3_offset); + } + + public Float getToPressLayerY3_offset() { + return this.getOpcFloatValue(item_to_pressLayerY3_offset); + } + + public int getToOne_cribTotal() { + return this.getOpcIntegerValue(item_to_one_cribTotal); + } + + public int getToTwo_cribTotal() { + return this.getOpcIntegerValue(item_to_two_cribTotal); + } + + public int getToOne_qty() { + return this.getOpcIntegerValue(item_to_one_qty); + } + + public int getToTwo_qty() { + return this.getOpcIntegerValue(item_to_two_qty); + } + + public int getToTool_coordinate() { + return this.getOpcIntegerValue(item_to_tool_coordinate); + } + + //是否有货 + public int hasGoods(int move) { + return move; + } + + Boolean isonline; + + 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 Float getOpcFloatValue(String protocol) { + Float value = this.driver.getFloatValue(protocol); + if (ObjectUtil.isEmpty(value)) { + log.error("读取错误!"); + } else { + return value; + } + return 0.0f; + } + + public String getOpcStringValue(String protocol) { + String value = this.driver.getStringValue(protocol); + if (StrUtil.isEmpty(value)) { + log.error("读取错误!"); + } else { + return value; + } + return "0"; + } + + public static List getReadableItemDtos() { + ArrayList list = new ArrayList(); + list.add(new ItemDto(item_heartbeat, "心跳", "DB1.B0")); + list.add(new ItemDto(item_mode, "工作状态", "DB1.B1", Boolean.valueOf(true))); + list.add(new ItemDto(item_status, "设备状态", "DB1.B2")); + list.add(new ItemDto(item_error, "故障代码", "DB1.B3")); + list.add(new ItemDto(item_onoff_status, "开关机状态", "DB1.B3")); + list.add(new ItemDto(item_putStation, "当前码盘工位", "DB1.D4")); + list.add(new ItemDto(item_getStation, "当前抓取工位", "DB1.D4")); + list.add(new ItemDto(item_barcode, "当前码盘工位条码", "DB1.S8")); + list.add(new ItemDto(item_material, "码盘工位当前物料", "DB1.S264")); + list.add(new ItemDto(item_specifications, "规格", "DB1.S264")); + list.add(new ItemDto(item_batch, "批次", "DB1.S264")); + list.add(new ItemDto(item_qty, "数量", "DB1.D520")); + list.add(new ItemDto(item_open_time, "开机时间", "DB1.D524")); + list.add(new ItemDto(item_standby_time, "待机时间", "DB1.D528")); + list.add(new ItemDto(item_production_time, "生产时间", "DB1.D532")); + list.add(new ItemDto(item_error_time, "故障时间", "DB1.D536")); + list.add(new ItemDto(item_order_No, "工单号", "DB1.S540")); + list.add(new ItemDto(item_total_split, "累计拆垛数量", "DB1.S540")); + + list.add(new ItemDto(item_product_code, "产品编号", "DB1.D796")); + list.add(new ItemDto(item_AlongSide, "A长边", "DB1.D800")); + list.add(new ItemDto(item_BshortSide, "B短边", "DB1.D804")); + list.add(new ItemDto(item_Htrapezoidal, "H梯形高", "DB1.D808")); + list.add(new ItemDto(item_Wthickness, "W厚度", "DB1.D812")); + list.add(new ItemDto(item_tray_qty, "当前垛盘数", "DB1.D816")); + list.add(new ItemDto(item_tray_high, "垛盘高度", "DB1.D820")); + list.add(new ItemDto(item_crib_category, "垛型类别", "DB1.D824")); + list.add(new ItemDto(item_palletX1_line, "码垛X1行", "DB1.REAL828")); + list.add(new ItemDto(item_palletY1_row, "码垛Y1列", "DB1.REAL832")); + list.add(new ItemDto(item_palletA1_angle, "码垛A1角度", "DB1.REAL836")); + list.add(new ItemDto(item_palletX2_line, "码垛X2行", "DB1.REAL840")); + list.add(new ItemDto(item_palletY2_row, "码垛Y2列", "DB1.REAL844")); + list.add(new ItemDto(item_palletA2_angle, "码垛A2角度", "DB1.REAL848")); + list.add(new ItemDto(item_palletX3_line, "码垛X3行", "DB1.REAL852")); + list.add(new ItemDto(item_palletY3_row, "码垛Y3列", "DB1.REAL856")); + list.add(new ItemDto(item_palletA3_angle, "码垛A3角度", "DB1.REAL860")); + list.add(new ItemDto(item_pressCribX1_line, "压垛X1行", "DB1.REAL864")); + list.add(new ItemDto(item_pressCribY1_row, "压垛Y1列", "DB1.REAL868")); + list.add(new ItemDto(item_pressCribA1_angle, "压垛A1角度", "DB1.REAL872")); + list.add(new ItemDto(item_pressCribX2_line, "压垛X2行", "DB1.REAL876")); + list.add(new ItemDto(item_pressCribY2_row, "压垛Y2列", "DB1.REAL880")); + list.add(new ItemDto(item_pressCribA2_angle, "压垛A2角度", "DB1.REAL884")); + list.add(new ItemDto(item_pressCribX3_line, "压垛X3行", "DB1.REAL888")); + list.add(new ItemDto(item_pressCribY3_row, "压垛Y3列", "DB1.REAL892")); + list.add(new ItemDto(item_pressCribA3_angle, "压垛A3角度", "DB1.REAL896")); + list.add(new ItemDto(item_Zoffset, "Z轴偏移", "DB1.REAL900")); + list.add(new ItemDto(item_pallet_layerQty, "码垛层数", "DB1.D904")); + list.add(new ItemDto(item_pressCrib_layerQty, "压垛层数", "DB1.D908")); + list.add(new ItemDto(item_codeLayerX1_interval, "码层X1间隔", "DB1.REAL912")); + list.add(new ItemDto(item_codeLayerY1_interval, "码层Y1间隔", "DB1.REAL916")); + list.add(new ItemDto(item_codeLayerX2_interval, "码层X2间隔", "DB1.REAL920")); + list.add(new ItemDto(item_codeLayerY2_interval, "码层Y2间隔", "DB1.REAL924")); + list.add(new ItemDto(item_codeLayerX3_interval, "码层X3间隔", "DB1.REAL928")); + list.add(new ItemDto(item_codeLayerY3_interval, "码层Y3间隔", "DB1.REAL932")); + list.add(new ItemDto(item_codeLayerX1_offset, "码层X1偏移", "DB1.REAL936")); + list.add(new ItemDto(item_codeLayerY1_offset, "码层Y1偏移", "DB1.REAL940")); + list.add(new ItemDto(item_codeLayerX2_offset, "码层X2偏移", "DB1.REAL944")); + list.add(new ItemDto(item_codeLayerY2_offset, "码层Y2偏移", "DB1.REAL948")); + list.add(new ItemDto(item_codeLayerX3_offset, "码层X3偏移", "DB1.REAL952")); + list.add(new ItemDto(item_codeLayerY3_offset, "码层Y3偏移", "DB1.REAL956")); + list.add(new ItemDto(item_pressLayerX1_interval, "压层X1间隔", "DB1.REAL960")); + list.add(new ItemDto(item_pressLayerY1_interval, "压层Y1间隔", "DB1.REAL964")); + list.add(new ItemDto(item_pressLayerX2_interval, "压层X2间隔", "DB1.REAL968")); + list.add(new ItemDto(item_pressLayerY2_interval, "压层Y2间隔", "DB1.REAL972")); + list.add(new ItemDto(item_pressLayerX3_interval, "压层X3间隔", "DB1.REAL976")); + list.add(new ItemDto(item_pressLayerY3_interval, "压层Y3间隔", "DB1.REAL980")); + list.add(new ItemDto(item_pressLayerX1_offset, "压层X1偏移", "DB1.REAL984")); + list.add(new ItemDto(item_pressLayerY1_offset, "压层Y1偏移", "DB1.REAL988")); + list.add(new ItemDto(item_pressLayerX2_offset, "压层X2偏移", "DB1.REAL992")); + list.add(new ItemDto(item_pressLayerY2_offset, "压层Y2偏移", "DB1.REAL996")); + list.add(new ItemDto(item_pressLayerX3_offset, "压层X3偏移", "DB1.REAL1000")); + list.add(new ItemDto(item_pressLayerY3_offset, "压层Y3偏移", "DB1.REAL1004")); + list.add(new ItemDto(item_one_cribTotal, "1#垛总数", "DB1.D1008")); + list.add(new ItemDto(item_two_cribTotal, "2#垛总数", "DB1.D1012")); + list.add(new ItemDto(item_one_qty, "1#垛当前数", "DB1.D1016")); + list.add(new ItemDto(item_two_qty, "2#垛当前数", "DB1.D1020")); + list.add(new ItemDto(item_tool_coordinate, "工具坐标", "DB1.D1024")); + return list; + } + + public static List getWriteableItemDtos() { + ArrayList list = new ArrayList(); + list.add(new ItemDto(item_to_feedback, "机器人动作反馈", "DB2.B0")); + list.add(new ItemDto(item_to_error, "故障代码", "DB2.B1")); + list.add(new ItemDto(item_to_material_qty, "托盘上数量", "DB2.W2")); + list.add(new ItemDto(item_to_allow_pallet_qty, "允许码垛数量", "DB2.W4")); + list.add(new ItemDto(item_to_material_type, "托盘类型", "DB2.D6")); + list.add(new ItemDto(item_to_material_code, "下发物料编号", "DB2.D10")); + list.add(new ItemDto(item_to_order_No, "工单号", "DB2.S14")); + + list.add(new ItemDto(item_to_product_code, "产品编号", "DB2.D270")); + list.add(new ItemDto(item_to_AlongSide, "A长边", "DB2.D274")); + list.add(new ItemDto(item_to_BshortSide, "B短边", "DB2.D278")); + list.add(new ItemDto(item_to_Htrapezoidal, "H梯形高", "DB2.D282")); + list.add(new ItemDto(item_to_Wthickness, "W厚度", "DB2.D286")); + list.add(new ItemDto(item_to_tray_qty, "当前垛盘数", "DB2.D290")); + list.add(new ItemDto(item_to_tray_high, "垛盘高度", "DB2.D294")); + list.add(new ItemDto(item_to_crib_category, "垛型类别", "DB2.D298")); + list.add(new ItemDto(item_to_palletX1_line, "码垛X1行", "DB2.REAL302")); + list.add(new ItemDto(item_to_palletY1_row, "码垛Y1列", "DB2.REAL306")); + list.add(new ItemDto(item_to_palletA1_angle, "码垛A1角度", "DB2.REAL310")); + list.add(new ItemDto(item_to_palletX2_line, "码垛X2行", "DB2.REAL314")); + list.add(new ItemDto(item_to_palletY2_row, "码垛Y2列", "DB2.REAL318")); + list.add(new ItemDto(item_to_palletA2_angle, "码垛A2角度", "DB2.REAL322")); + list.add(new ItemDto(item_to_palletX3_line, "码垛X3行", "DB2.REAL326")); + list.add(new ItemDto(item_to_palletY3_row, "码垛Y3列", "DB2.REAL330")); + list.add(new ItemDto(item_to_palletA3_angle, "码垛A3角度", "DB2.REAL334")); + list.add(new ItemDto(item_to_pressCribX1_line, "压垛X1行", "DB2.REAL338")); + list.add(new ItemDto(item_to_pressCribY1_row, "压垛Y1列", "DB2.REAL342")); + list.add(new ItemDto(item_to_pressCribA1_angle, "压垛A1角度", "DB2.REAL346")); + list.add(new ItemDto(item_to_pressCribX2_line, "压垛X2行", "DB2.REAL350")); + list.add(new ItemDto(item_to_pressCribY2_row, "压垛Y2列", "DB2.REAL354")); + list.add(new ItemDto(item_to_pressCribA2_angle, "压垛A2角度", "DB2.REAL358")); + list.add(new ItemDto(item_to_pressCribX3_line, "压垛X3行", "DB2.REAL362")); + list.add(new ItemDto(item_to_pressCribY3_row, "压垛Y3列", "DB2.REAL366")); + list.add(new ItemDto(item_to_pressCribA3_angle, "压垛A3角度", "DB2.REAL370")); + list.add(new ItemDto(item_to_Zoffset, "Z轴偏移", "DB2.REAL374")); + list.add(new ItemDto(item_to_pallet_layerQty, "码垛层数", "DB2.D378")); + list.add(new ItemDto(item_to_pressCrib_layerQty, "压垛层数", "DB2.D382")); + list.add(new ItemDto(item_to_codeLayerX1_interval, "码层X1间隔", "DB2.REAL386")); + list.add(new ItemDto(item_to_codeLayerY1_interval, "码层Y1间隔", "DB2.REAL390")); + list.add(new ItemDto(item_to_codeLayerX2_interval, "码层X2间隔", "DB2.REAL394")); + list.add(new ItemDto(item_to_codeLayerY2_interval, "码层Y2间隔", "DB2.REAL398")); + list.add(new ItemDto(item_to_codeLayerX3_interval, "码层X3间隔", "DB2.REAL402")); + list.add(new ItemDto(item_to_codeLayerY3_interval, "码层Y3间隔", "DB2.REAL406")); + list.add(new ItemDto(item_to_codeLayerX1_offset, "码层X1偏移", "DB2.REAL410")); + list.add(new ItemDto(item_to_codeLayerY1_offset, "码层Y1偏移", "DB2.REAL414")); + list.add(new ItemDto(item_to_codeLayerX2_offset, "码层X2偏移", "DB2.REAL418")); + list.add(new ItemDto(item_to_codeLayerY2_offset, "码层Y2偏移", "DB2.REAL422")); + list.add(new ItemDto(item_to_codeLayerX3_offset, "码层X3偏移", "DB2.REAL426")); + list.add(new ItemDto(item_to_codeLayerY3_offset, "码层Y3偏移", "DB2.REAL430")); + list.add(new ItemDto(item_to_pressLayerX1_interval, "压层X1间隔", "DB2.REAL434")); + list.add(new ItemDto(item_to_pressLayerY1_interval, "压层Y1间隔", "DB2.REAL438")); + list.add(new ItemDto(item_to_pressLayerX2_interval, "压层X2间隔", "DB2.REAL442")); + list.add(new ItemDto(item_to_pressLayerY2_interval, "压层Y2间隔", "DB2.REAL446")); + list.add(new ItemDto(item_to_pressLayerX3_interval, "压层X3间隔", "DB2.REAL450")); + list.add(new ItemDto(item_to_pressLayerY3_interval, "压层Y3间隔", "DB2.REAL454")); + list.add(new ItemDto(item_to_pressLayerX1_offset, "压层X1偏移", "DB2.REAL458")); + list.add(new ItemDto(item_to_pressLayerY1_offset, "压层Y1偏移", "DB2.REAL462")); + list.add(new ItemDto(item_to_pressLayerX2_offset, "压层X2偏移", "DB2.REAL466")); + list.add(new ItemDto(item_to_pressLayerY2_offset, "压层Y2偏移", "DB2.REAL470")); + list.add(new ItemDto(item_to_pressLayerX3_offset, "压层X3偏移", "DB2.REAL474")); + list.add(new ItemDto(item_to_pressLayerY3_offset, "压层Y3偏移", "DB2.REAL478")); + list.add(new ItemDto(item_to_one_cribTotal, "1#垛总数", "DB2.D482")); + list.add(new ItemDto(item_to_two_cribTotal, "2#垛总数", "DB2.D486")); + list.add(new ItemDto(item_to_one_qty, "1#垛当前数", "DB2.D490")); + list.add(new ItemDto(item_to_two_qty, "2#垛当前数", "DB2.D494")); + list.add(new ItemDto(item_to_tool_coordinate, "工具坐标", "DB2. D498")); + return list; + } + +} + diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/rljn_package_palletSplit_manipulator/RljnPackagePalletSplitManipulatorDefination.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/rljn_package_palletSplit_manipulator/RljnPackagePalletSplitManipulatorDefination.java new file mode 100644 index 0000000..b8d0b7c --- /dev/null +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/rljn_package_palletSplit_manipulator/RljnPackagePalletSplitManipulatorDefination.java @@ -0,0 +1,145 @@ +package org.nl.acs.device_driver.lnsh.rljn_package_palletSplit_manipulator; + +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.ArrayList; +import java.util.LinkedList; +import java.util.List; + +/** + * 荣力嘉耐-包装码拆垛机械手 + * + */ +@Service +public class RljnPackagePalletSplitManipulatorDefination implements OpcDeviceDriverDefination { + @Override + public String getDriverCode() { + return "lnsh_package_palletSplit_manipulator"; + } + + @Override + public String getDriverName() { + return "荣力嘉耐-包装码拆垛机械手"; + } + + @Override + public String getDriverDescription() { + return "荣力嘉耐-包装码拆垛机械手"; + } + + @Override + public DeviceDriver getDriverInstance(Device device) { + return (new RljnPackagePalletSplitManipulatorDeviceDriver()).setDevice(device).setDriverDefination(this); + + } + + @Override + public Class getDeviceDriverType() { + return RljnPackagePalletSplitManipulatorDeviceDriver.class; + } + + @Override + public List getFitDeviceTypes() { + List types = new LinkedList(); + types.add(DeviceType.station); + return types; + } + + @Override + public List getReadableItemDtos() { + return getReadableItemDtos2(); + } + + public static List getReadableItemDtos2() { + ArrayList list = new ArrayList(); + list.add(new ItemDto(ItemProtocol.item_heartbeat, "心跳", "DB1.B0")); + list.add(new ItemDto(ItemProtocol.item_mode, "工作状态", "DB1.B1", Boolean.valueOf(true))); + list.add(new ItemDto(ItemProtocol.item_status, "设备状态", "DB1.B2")); + list.add(new ItemDto(ItemProtocol.item_error, "故障代码", "DB1.B3")); + list.add(new ItemDto(ItemProtocol.item_onoff_status, "开关机状态", "DB1.B3")); + list.add(new ItemDto(ItemProtocol.item_putStation, "当前码盘工位", "DB1.D4")); + list.add(new ItemDto(ItemProtocol.item_getStation, "当前抓取工位", "DB1.D4")); + list.add(new ItemDto(ItemProtocol.item_barcode, "当前码盘工位条码", "DB1.S8")); + list.add(new ItemDto(ItemProtocol.item_material, "码盘工位当前物料", "DB1.S264")); + list.add(new ItemDto(ItemProtocol.item_specifications, "规格", "DB1.S264")); + list.add(new ItemDto(ItemProtocol.item_batch, "批次", "DB1.D264")); + list.add(new ItemDto(ItemProtocol.item_qty, "数量", "DB1.D520")); + list.add(new ItemDto(ItemProtocol.item_open_time, "开机时间", "DB1.D524")); + list.add(new ItemDto(ItemProtocol.item_standby_time, "待机时间", "DB1.D528")); + list.add(new ItemDto(ItemProtocol.item_production_time, "生产时间", "DB1.D532")); + list.add(new ItemDto(ItemProtocol.item_error_time, "故障时间", "DB1.D536")); + list.add(new ItemDto(ItemProtocol.item_order_No, "工单号", "DB1.S540")); + list.add(new ItemDto(ItemProtocol.item_total_split, "累计拆垛数量", "DB1.S540")); + + list.add(new ItemDto(ItemProtocol.item_product_code, "产品编号", "DB1.D796")); + list.add(new ItemDto(ItemProtocol.item_AlongSide, "A长边", "DB1.D800")); + list.add(new ItemDto(ItemProtocol.item_BshortSide, "B短边", "DB1.D804")); + list.add(new ItemDto(ItemProtocol.item_Htrapezoidal, "H梯形高", "DB1.D808")); + list.add(new ItemDto(ItemProtocol.item_Wthickness, "W厚度", "DB1.D812")); + list.add(new ItemDto(ItemProtocol.item_tray_qty, "当前垛盘数", "DB1.D816")); + list.add(new ItemDto(ItemProtocol.item_tray_high, "垛盘高度", "DB1.D820")); + list.add(new ItemDto(ItemProtocol.item_crib_category, "垛型类别", "DB1.D824")); + list.add(new ItemDto(ItemProtocol.item_palletX1_line, "码垛X1行", "DB1.REAL828")); + list.add(new ItemDto(ItemProtocol.item_palletY1_row, "码垛Y1列", "DB1.REAL832")); + list.add(new ItemDto(ItemProtocol.item_palletA1_angle, "码垛A1角度", "DB1.REAL836")); + list.add(new ItemDto(ItemProtocol.item_palletX2_line, "码垛X2行", "DB1.REAL840")); + list.add(new ItemDto(ItemProtocol.item_palletY2_row, "码垛Y2列", "DB1.REAL844")); + list.add(new ItemDto(ItemProtocol.item_palletA2_angle, "码垛A2角度", "DB1.REAL848")); + list.add(new ItemDto(ItemProtocol.item_palletX3_line, "码垛X3行", "DB1.REAL852")); + list.add(new ItemDto(ItemProtocol.item_palletY3_row, "码垛Y3列", "DB1.REAL856")); + list.add(new ItemDto(ItemProtocol.item_palletA3_angle, "码垛A3角度", "DB1.REAL860")); + list.add(new ItemDto(ItemProtocol.item_pressCribX1_line, "压垛X1行", "DB1.REAL864")); + list.add(new ItemDto(ItemProtocol.item_pressCribY1_row, "压垛Y1列", "DB1.REAL868")); + list.add(new ItemDto(ItemProtocol.item_pressCribA1_angle, "压垛A1角度", "DB1.REAL872")); + list.add(new ItemDto(ItemProtocol.item_pressCribX2_line, "压垛X2行", "DB1.REAL876")); + list.add(new ItemDto(ItemProtocol.item_pressCribY2_row, "压垛Y2列", "DB1.REAL880")); + list.add(new ItemDto(ItemProtocol.item_pressCribA2_angle, "压垛A2角度", "DB1.REAL884")); + list.add(new ItemDto(ItemProtocol.item_pressCribX3_line, "压垛X3行", "DB1.REAL888")); + list.add(new ItemDto(ItemProtocol.item_pressCribY3_row, "压垛Y3列", "DB1.REAL892")); + list.add(new ItemDto(ItemProtocol.item_pressCribA3_angle, "压垛A3角度", "DB1.REAL896")); + list.add(new ItemDto(ItemProtocol.item_Zoffset, "Z轴偏移", "DB1.REAL900")); + list.add(new ItemDto(ItemProtocol.item_pallet_layerQty, "码垛层数", "DB1.D904")); + list.add(new ItemDto(ItemProtocol.item_pressCrib_layerQty, "压垛层数", "DB1.D908")); + list.add(new ItemDto(ItemProtocol.item_codeLayerX1_interval, "码层X1间隔", "DB1.REAL912")); + list.add(new ItemDto(ItemProtocol.item_codeLayerY1_interval, "码层Y1间隔", "DB1.REAL916")); + list.add(new ItemDto(ItemProtocol.item_codeLayerX2_interval, "码层X2间隔", "DB1.REAL920")); + list.add(new ItemDto(ItemProtocol.item_codeLayerY2_interval, "码层Y2间隔", "DB1.REAL924")); + list.add(new ItemDto(ItemProtocol.item_codeLayerX3_interval, "码层X3间隔", "DB1.REAL928")); + list.add(new ItemDto(ItemProtocol.item_codeLayerY3_interval, "码层Y3间隔", "DB1.REAL932")); + list.add(new ItemDto(ItemProtocol.item_codeLayerX1_offset, "码层X1偏移", "DB1.REAL936")); + list.add(new ItemDto(ItemProtocol.item_codeLayerY1_offset, "码层Y1偏移", "DB1.REAL940")); + list.add(new ItemDto(ItemProtocol.item_codeLayerX2_offset, "码层X2偏移", "DB1.REAL944")); + list.add(new ItemDto(ItemProtocol.item_codeLayerY2_offset, "码层Y2偏移", "DB1.REAL948")); + list.add(new ItemDto(ItemProtocol.item_codeLayerX3_offset, "码层X3偏移", "DB1.REAL952")); + list.add(new ItemDto(ItemProtocol.item_codeLayerY3_offset, "码层Y3偏移", "DB1.REAL956")); + list.add(new ItemDto(ItemProtocol.item_pressLayerX1_interval, "压层X1间隔", "DB1.REAL960")); + list.add(new ItemDto(ItemProtocol.item_pressLayerY1_interval, "压层Y1间隔", "DB1.REAL964")); + list.add(new ItemDto(ItemProtocol.item_pressLayerX2_interval, "压层X2间隔", "DB1.REAL968")); + list.add(new ItemDto(ItemProtocol.item_pressLayerY2_interval, "压层Y2间隔", "DB1.REAL972")); + list.add(new ItemDto(ItemProtocol.item_pressLayerX3_interval, "压层X3间隔", "DB1.REAL976")); + list.add(new ItemDto(ItemProtocol.item_pressLayerY3_interval, "压层Y3间隔", "DB1.REAL980")); + list.add(new ItemDto(ItemProtocol.item_pressLayerX1_offset, "压层X1偏移", "DB1.REAL984")); + list.add(new ItemDto(ItemProtocol.item_pressLayerY1_offset, "压层Y1偏移", "DB1.REAL988")); + list.add(new ItemDto(ItemProtocol.item_pressLayerX2_offset, "压层X2偏移", "DB1.REAL992")); + list.add(new ItemDto(ItemProtocol.item_pressLayerY2_offset, "压层Y2偏移", "DB1.REAL996")); + list.add(new ItemDto(ItemProtocol.item_pressLayerX3_offset, "压层X3偏移", "DB1.REAL1000")); + list.add(new ItemDto(ItemProtocol.item_pressLayerY3_offset, "压层Y3偏移", "DB1.REAL1004")); + list.add(new ItemDto(ItemProtocol.item_one_cribTotal, "1#垛总数", "DB1.D1008")); + list.add(new ItemDto(ItemProtocol.item_two_cribTotal, "2#垛总数", "DB1.D1012")); + list.add(new ItemDto(ItemProtocol.item_one_qty, "1#垛当前数", "DB1.D1016")); + list.add(new ItemDto(ItemProtocol.item_two_qty, "2#垛当前数", "DB1.D1020")); + list.add(new ItemDto(ItemProtocol.item_tool_coordinate, "工具坐标", "DB1.D1024")); + return list; + } + + @Override + public List getWriteableItemDtos() { + return ItemProtocol.getWriteableItemDtos(); + } + +} diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/rljn_package_palletSplit_manipulator/RljnPackagePalletSplitManipulatorDeviceDriver.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/rljn_package_palletSplit_manipulator/RljnPackagePalletSplitManipulatorDeviceDriver.java new file mode 100644 index 0000000..07443de --- /dev/null +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/rljn_package_palletSplit_manipulator/RljnPackagePalletSplitManipulatorDeviceDriver.java @@ -0,0 +1,1220 @@ +package org.nl.acs.device_driver.lnsh.rljn_package_palletSplit_manipulator; + +import cn.hutool.core.util.StrUtil; +import cn.hutool.http.HttpResponse; +import com.alibaba.fastjson.JSONObject; +import lombok.Data; +import lombok.RequiredArgsConstructor; +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.RouteableDeviceDriver; +import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver; +import org.nl.acs.device_driver.driver.ExecutableDeviceDriver; +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.LogServer; +import org.nl.acs.opc.Device; +import org.nl.acs.order.service.ProduceshiftorderService; +import org.nl.acs.order.service.dto.ProduceshiftorderDto; +import org.nl.acs.route.service.RouteLineService; +import org.nl.acs.task.service.TaskService; +import org.nl.utils.SpringContextHolder; +import org.openscada.opc.lib.da.Server; +import org.springframework.beans.factory.annotation.Autowired; + +import java.lang.reflect.Field; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 荣力嘉耐-包装码拆垛机械手 + */ +@Slf4j +@Data +@RequiredArgsConstructor +public class RljnPackagePalletSplitManipulatorDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver { + protected ItemProtocol itemProtocol = new ItemProtocol(this); + @Autowired + InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl"); + @Autowired + DeviceService deviceservice = SpringContextHolder.getBean("deviceServiceImpl"); + @Autowired + RouteLineService routelineserver = SpringContextHolder.getBean("routeLineServiceImpl"); + @Autowired + TaskService taskserver = SpringContextHolder.getBean("taskServiceImpl"); + @Autowired + LogServer logServer = SpringContextHolder.getBean("logServerImpl"); + @Autowired + AcsToWmsService acsToWmsService = SpringContextHolder.getBean("acsToWmsServiceImpl"); + @Autowired + ProduceshiftorderService produceshiftorderService = SpringContextHolder.getBean("produceshiftorderServiceImpl"); + + int mode = 0; + int error = 0; + int last_mode = 0; + int last_error = 0; + Boolean isonline = true; + int hasGoods = 0; + String message = null; + Boolean iserror = false; + + private Date instruction_require_time = new Date(); + private Date instruction_finished_time = new Date(); + + private int instruction_require_time_out; + boolean requireSucess = false; + + private int instruction_finished_time_out; + + int branchProtocol = 0; + //当前指令 + Instruction inst = null; + //上次指令 + Instruction last_inst = null; + + + //暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域 + int flag; + + String device_code; + int status = 0; + int last_status = 0; + //开机时间 + int open_time = 0; + int last_open_time = 0; + //待机时间 + int standby_time = 0; + int last_standby_time = 0; + //生产时间 + int production_time = 0; + int last_production_time = 0; + //故障时间 + int error_time = 0; + int last_error_time = 0; + int put_station = 0; + int last_put_station = 0; + String barcode; + String last_barcode; + String material; + String last_material; + int order_No = 0; + int last_order_No = 0; + int qty = 0; + int last_qty = 0; + //开关机状态 + int onoff_status = 0; + int last_onoff_status = 0; + //当前抓取工位 + int getStation = 0; + int last_getStation = 0; + //批次 + int batch = 0; + int last_batch = 0; + //规格 + String specifications = ""; + String last_specifications = ""; + //累计拆垛数量 + int total_split = 0; + int last_total_split = 0; + + //垛型参数 + int product_code = 0; + int AlongSide = 0; + int BshortSide = 0; + int Htrapezoidal = 0; + int Wthickness = 0; + int tray_qty = 0; + int tray_high = 0; + int crib_category = 0; + float palletX1_line = 0f; + float palletY1_row = 0f; + float palletA1_angle = 0f; + float palletX2_line = 0f; + float palletY2_row = 0f; + float palletA2_angle = 0f; + float palletX3_line = 0f; + float palletY3_row = 0f; + float palletA3_angle = 0f; + float pressCribX1_line = 0f; + float pressCribY1_row = 0f; + float pressCribA1_angle = 0f; + float pressCribX2_line = 0f; + float pressCribY2_row = 0f; + float pressCribA2_angle = 0f; + float pressCribX3_line = 0f; + float pressCribY3_row = 0f; + float pressCribA3_angle = 0f; + float Zoffset = 0f; + int pallet_layerQty = 0; + int pressCrib_layerQty = 0; + float codeLayerX1_interval = 0f; + float codeLayerY1_interval = 0f; + float codeLayerX2_interval = 0f; + float codeLayerY2_interval = 0f; + float codeLayerX3_interval = 0f; + float codeLayerY3_interval = 0f; + float codeLayerX1_offset = 0f; + float codeLayerY1_offset = 0f; + float codeLayerX2_offset = 0f; + float codeLayerY2_offset = 0f; + float codeLayerX3_offset = 0f; + float codeLayerY3_offset = 0f; + float pressLayerX1_interval = 0f; + float pressLayerY1_interval = 0f; + float pressLayerX2_interval = 0f; + float pressLayerY2_interval = 0f; + float pressLayerX3_interval = 0f; + float pressLayerY3_interval = 0f; + float pressLayerX1_offset = 0f; + float pressLayerY1_offset = 0f; + float pressLayerX2_offset = 0f; + float pressLayerY2_offset = 0f; + float pressLayerX3_offset = 0f; + float pressLayerY3_offset = 0f; + int one_cribTotal = 0; + int two_cribTotal = 0; + int one_qty = 0; + int two_qty = 0; + int tool_coordinate = 0; + + int last_product_code = 0; + int last_AlongSide = 0; + int last_BshortSide = 0; + int last_Htrapezoidal = 0; + int last_Wthickness = 0; + int last_tray_qty = 0; + int last_tray_high = 0; + int last_crib_category = 0; + float last_palletX1_line = 0f; + float last_palletY1_row = 0f; + float last_palletA1_angle = 0f; + float last_palletX2_line = 0f; + float last_palletY2_row = 0f; + float last_palletA2_angle = 0f; + float last_palletX3_line = 0f; + float last_palletY3_row = 0f; + float last_palletA3_angle = 0f; + float last_pressCribX1_line = 0f; + float last_pressCribY1_row = 0f; + float last_pressCribA1_angle = 0f; + float last_pressCribX2_line = 0f; + float last_pressCribY2_row = 0f; + float last_pressCribA2_angle = 0f; + float last_pressCribX3_line = 0f; + float last_pressCribY3_row = 0f; + float last_pressCribA3_angle = 0f; + float last_Zoffset = 0f; + int last_pallet_layerQty = 0; + int last_pressCrib_layerQty = 0; + float last_codeLayerX1_interval = 0f; + float last_codeLayerY1_interval = 0f; + float last_codeLayerX2_interval = 0f; + float last_codeLayerY2_interval = 0f; + float last_codeLayerX3_interval = 0f; + float last_codeLayerY3_interval = 0f; + float last_codeLayerX1_offset = 0f; + float last_codeLayerY1_offset = 0f; + float last_codeLayerX2_offset = 0f; + float last_codeLayerY2_offset = 0f; + float last_codeLayerX3_offset = 0f; + float last_codeLayerY3_offset = 0f; + float last_pressLayerX1_interval = 0f; + float last_pressLayerY1_interval = 0f; + float last_pressLayerX2_interval = 0f; + float last_pressLayerY2_interval = 0f; + float last_pressLayerX3_interval = 0f; + float last_pressLayerY3_interval = 0f; + float last_pressLayerX1_offset = 0f; + float last_pressLayerY1_offset = 0f; + float last_pressLayerX2_offset = 0f; + float last_pressLayerY2_offset = 0f; + float last_pressLayerX3_offset = 0f; + float last_pressLayerY3_offset = 0f; + int last_one_cribTotal = 0; + int last_two_cribTotal = 0; + int last_one_qty = 0; + int last_two_qty = 0; + int last_tool_coordinate = 0; + + @Override + public Device getDevice() { + return this.device; + } + + + @Override + public void execute() { + String message = null; + try { + device_code = this.getDeviceCode(); + mode = this.itemProtocol.getMode(); + status = this.itemProtocol.getStatus(); + error = this.itemProtocol.getError(); + put_station = this.itemProtocol.getPutStation(); + barcode = this.itemProtocol.getBarcode(); + material = this.itemProtocol.getMaterial(); + open_time = this.itemProtocol.getOpen_time(); + standby_time = this.itemProtocol.getStandby_time(); + production_time = this.itemProtocol.getProduction_time(); + error_time = this.itemProtocol.getError_time(); + order_No = this.itemProtocol.getOrder_No(); + qty = this.itemProtocol.getQty(); + onoff_status = this.itemProtocol.getOnoff_status(); + getStation = this.itemProtocol.getGetStation(); + specifications = this.itemProtocol.getSpecifications(); + batch = this.itemProtocol.getBatch(); + total_split = this.itemProtocol.getTotal_split(); + + 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(); + one_cribTotal = this.itemProtocol.getOne_cribTotal(); + two_cribTotal = this.itemProtocol.getTwo_cribTotal(); + one_qty = this.itemProtocol.getOne_qty(); + two_qty = this.itemProtocol.getTwo_qty(); + tool_coordinate = this.itemProtocol.getTool_coordinate(); + + if (mode != last_mode) { + this.setRequireSucess(false); + logServer.deviceLog(this.device_code,"mode" ,String.valueOf(mode)); + logServer.deviceLogToacs(this.device_code,"","","信号mode:" + last_mode + "->" + mode); + } + if (status != last_status) { + logServer.deviceLog(this.device_code,"status" ,String.valueOf(status)); + logServer.deviceLogToacs(this.device_code,"","","信号status:" + last_status + "->" + status); + } + if (onoff_status != last_onoff_status) { + logServer.deviceLog(this.device_code,"onoff_status" ,String.valueOf(onoff_status)); + logServer.deviceLogToacs(this.device_code,"","","信号onoff_status:" + last_onoff_status + "->" + onoff_status); + } + if (put_station != last_put_station) { + logServer.deviceLog(this.device_code,"put_station" ,String.valueOf(put_station)); + logServer.deviceLogToacs(this.device_code,"","","信号put_station:" + last_put_station + "->" + put_station); + } + if (getStation != last_getStation) { + logServer.deviceLog(this.device_code,"getStation" ,String.valueOf(getStation)); + logServer.deviceLogToacs(this.device_code,"","","信号getStation:" + last_getStation + "->" + getStation); + } + if (error != last_error) { + logServer.deviceLog(this.device_code,"error" ,String.valueOf(error)); + logServer.deviceLogToacs(this.device_code,"","","信号error:" + last_error + "->" + error); + } + if (open_time != last_open_time) { + logServer.deviceLog(this.device_code,"open_time" ,String.valueOf(open_time)); + logServer.deviceLogToacs(this.device_code,"","","信号open_time:" + last_open_time + "->" + open_time); + } + if (standby_time != last_standby_time) { + logServer.deviceLog(this.device_code,"standby_time" ,String.valueOf(standby_time)); + logServer.deviceLogToacs(this.device_code,"","","信号standby_time:" + last_standby_time + "->" + standby_time); + } + if (production_time != last_production_time) { + logServer.deviceLog(this.device_code,"production_time" ,String.valueOf(production_time)); + logServer.deviceLogToacs(this.device_code,"","","信号production_time:" + last_production_time + "->" + production_time); + } + if (error_time != last_error_time) { + logServer.deviceLog(this.device_code,"error_time" ,String.valueOf(error_time)); + logServer.deviceLogToacs(this.device_code,"","","信号error_time:" + last_error_time + "->" + error_time); + } + if (!StrUtil.equals(barcode,last_barcode)) { + logServer.deviceLog(this.device_code,"barcode", barcode); + logServer.deviceLogToacs(this.device_code,"","","信号barcode:" + last_barcode + "->" + barcode); + } + if (!StrUtil.equals(material,last_material)) { + logServer.deviceLog(this.device_code,"material", material); + logServer.deviceLogToacs(this.device_code,"","","信号material:" + last_material + "->" + material); + } + if (qty != last_qty) { + logServer.deviceLog(this.device_code,"qty" ,String.valueOf(qty)); + logServer.deviceLogToacs(this.device_code,"","","信号qty:" + last_qty + "->" + qty); + } + if (!StrUtil.equals(specifications,last_specifications)) { + logServer.deviceLog(this.device_code,"specifications" ,specifications); + logServer.deviceLogToacs(this.device_code,"","","信号specifications:" + last_specifications + "->" + specifications); + } + if (batch != last_batch) { + logServer.deviceLog(this.device_code,"batch" ,String.valueOf(batch)); + logServer.deviceLogToacs(this.device_code,"","","信号batch:" + last_batch + "->" + batch); + } + if (order_No != last_order_No) { + logServer.deviceLog(this.device_code,"order_No" ,String.valueOf(order_No)); + logServer.deviceLogToacs(this.device_code,"","","信号order_No:" + last_order_No + "->" + order_No); + } + if (total_split != last_total_split) { + logServer.deviceLog(this.device_code,"total_split" ,String.valueOf(total_split)); + logServer.deviceLogToacs(this.device_code,"","","信号total_split:" + last_total_split + "->" + total_split); + } + if (product_code != last_product_code) { + logServer.deviceLog(this.device_code,"product_code" ,String.valueOf(product_code)); + logServer.deviceLogToacs(this.device_code,"","","信号product_code:" + last_product_code + "->" + product_code); + } + if (AlongSide != last_AlongSide) { + logServer.deviceLog(this.device_code,"AlongSide" ,String.valueOf(AlongSide)); + logServer.deviceLogToacs(this.device_code,"","","信号AlongSide:" + last_AlongSide + "->" + AlongSide); + } + if (BshortSide != last_BshortSide) { + logServer.deviceLog(this.device_code,"BshortSide" ,String.valueOf(BshortSide)); + logServer.deviceLogToacs(this.device_code,"","","信号BshortSide:" + last_BshortSide + "->" + BshortSide); + } + if (Htrapezoidal != last_Htrapezoidal) { + logServer.deviceLog(this.device_code,"Htrapezoidal" ,String.valueOf(Htrapezoidal)); + logServer.deviceLogToacs(this.device_code,"","","信号Htrapezoidal:" + last_Htrapezoidal + "->" + Htrapezoidal); + } + if (Wthickness != last_Wthickness) { + logServer.deviceLog(this.device_code,"Wthickness" ,String.valueOf(Wthickness)); + logServer.deviceLogToacs(this.device_code,"","","信号Wthickness:" + last_Wthickness + "->" + Wthickness); + } + if (tray_qty != last_tray_qty) { + logServer.deviceLog(this.device_code,"tray_qty" ,String.valueOf(tray_qty)); + logServer.deviceLogToacs(this.device_code,"","","信号tray_qty:" + last_tray_qty + "->" + tray_qty); + } + if (tray_high != last_tray_high) { + logServer.deviceLog(this.device_code,"tray_high" ,String.valueOf(tray_high)); + logServer.deviceLogToacs(this.device_code,"","","信号tray_high:" + last_tray_high + "->" + tray_high); + } + if (crib_category != last_crib_category) { + logServer.deviceLog(this.device_code,"crib_category" ,String.valueOf(crib_category)); + logServer.deviceLogToacs(this.device_code,"","","信号crib_category:" + last_crib_category + "->" + crib_category); + } + if (palletX1_line != last_palletX1_line) { + logServer.deviceLog(this.device_code,"palletX1_line" ,String.valueOf(palletX1_line)); + logServer.deviceLogToacs(this.device_code,"","","信号palletX1_line:" + last_palletX1_line + "->" + palletX1_line); + } + if (palletY1_row != last_palletY1_row) { + logServer.deviceLog(this.device_code,"palletY1_row" ,String.valueOf(palletY1_row)); + logServer.deviceLogToacs(this.device_code,"","","信号palletY1_row:" + last_palletY1_row + "->" + palletY1_row); + } + if (palletA1_angle != last_palletA1_angle) { + logServer.deviceLog(this.device_code,"palletA1_angle" ,String.valueOf(palletA1_angle)); + logServer.deviceLogToacs(this.device_code,"","","信号palletA1_angle:" + last_palletA1_angle + "->" + palletA1_angle); + } + if (palletX2_line != last_palletX2_line) { + logServer.deviceLog(this.device_code,"palletX2_line" ,String.valueOf(palletX2_line)); + logServer.deviceLogToacs(this.device_code,"","","信号palletX2_line:" + last_palletX2_line + "->" + palletX2_line); + } + if (palletY2_row != last_palletY2_row) { + logServer.deviceLog(this.device_code,"palletY2_row" ,String.valueOf(palletY2_row)); + logServer.deviceLogToacs(this.device_code,"","","信号palletY2_row:" + last_palletY2_row + "->" + palletY2_row); + } + if (palletA2_angle != last_palletA2_angle) { + logServer.deviceLog(this.device_code,"palletA2_angle" ,String.valueOf(palletA2_angle)); + logServer.deviceLogToacs(this.device_code,"","","信号palletA2_angle:" + last_palletA2_angle + "->" + palletA2_angle); + } + if (palletX3_line != last_palletX3_line) { + logServer.deviceLog(this.device_code,"palletX3_line" ,String.valueOf(palletX3_line)); + logServer.deviceLogToacs(this.device_code,"","","信号palletX3_line:" + last_palletX3_line + "->" + palletX3_line); + } + if (palletY3_row != last_palletY3_row) { + logServer.deviceLog(this.device_code,"palletY3_row" ,String.valueOf(palletY3_row)); + logServer.deviceLogToacs(this.device_code,"","","信号palletY3_row:" + last_palletY3_row + "->" + palletY3_row); + } + if (palletA3_angle != last_palletA3_angle) { + logServer.deviceLog(this.device_code,"palletA3_angle" ,String.valueOf(palletA3_angle)); + logServer.deviceLogToacs(this.device_code,"","","信号palletA3_angle:" + last_palletA3_angle + "->" + palletA3_angle); + } + if (pressCribX1_line != last_pressCribX1_line) { + logServer.deviceLog(this.device_code,"pressCribX1_line" ,String.valueOf(pressCribX1_line)); + logServer.deviceLogToacs(this.device_code,"","","信号pressCribX1_line:" + last_pressCribX1_line + "->" + pressCribX1_line); + } + if (pressCribY1_row != last_pressCribY1_row) { + logServer.deviceLog(this.device_code,"pressCribY1_row" ,String.valueOf(pressCribY1_row)); + logServer.deviceLogToacs(this.device_code,"","","信号pressCribY1_row:" + last_pressCribY1_row + "->" + pressCribY1_row); + } + if (pressCribA1_angle != last_pressCribA1_angle) { + logServer.deviceLog(this.device_code,"pressCribA1_angle" ,String.valueOf(pressCribA1_angle)); + logServer.deviceLogToacs(this.device_code,"","","信号pressCribA1_angle:" + last_pressCribA1_angle + "->" + pressCribA1_angle); + } + if (pressCribX2_line != last_pressCribX2_line) { + logServer.deviceLog(this.device_code,"pressCribX2_line" ,String.valueOf(pressCribX2_line)); + logServer.deviceLogToacs(this.device_code,"","","信号pressCribX2_line:" + last_pressCribX2_line + "->" + pressCribX2_line); + } + if (pressCribY2_row != last_pressCribY2_row) { + logServer.deviceLog(this.device_code,"pressCribY2_row" ,String.valueOf(pressCribY2_row)); + logServer.deviceLogToacs(this.device_code,"","","信号pressCribY2_row:" + last_pressCribY2_row + "->" + pressCribY2_row); + } + if (pressCribA2_angle != last_pressCribA2_angle) { + logServer.deviceLog(this.device_code,"pressCribA2_angle" ,String.valueOf(pressCribA2_angle)); + logServer.deviceLogToacs(this.device_code,"","","信号pressCribA2_angle:" + last_pressCribA2_angle + "->" + pressCribA2_angle); + } + if (pressCribX3_line != last_pressCribX3_line) { + logServer.deviceLog(this.device_code,"pressCribX3_line" ,String.valueOf(pressCribX3_line)); + logServer.deviceLogToacs(this.device_code,"","","信号pressCribX3_line:" + last_pressCribX3_line + "->" + pressCribX3_line); + } + if (pressCribY3_row != last_pressCribY3_row) { + logServer.deviceLog(this.device_code,"pressCribY3_row" ,String.valueOf(pressCribY3_row)); + logServer.deviceLogToacs(this.device_code,"","","信号pressCribY3_row:" + last_pressCribY3_row + "->" + pressCribY3_row); + } + if (pressCribA3_angle != last_pressCribA3_angle) { + logServer.deviceLog(this.device_code,"pressCribA3_angle" ,String.valueOf(pressCribA3_angle)); + logServer.deviceLogToacs(this.device_code,"","","信号pressCribA3_angle:" + last_pressCribA3_angle + "->" + pressCribA3_angle); + } + if (Zoffset != last_Zoffset) { + logServer.deviceLog(this.device_code,"Zoffset" ,String.valueOf(Zoffset)); + logServer.deviceLogToacs(this.device_code,"","","信号Zoffset:" + last_Zoffset + "->" + Zoffset); + } + if (pallet_layerQty != last_pallet_layerQty) { + logServer.deviceLog(this.device_code,"pallet_layerQty" ,String.valueOf(pallet_layerQty)); + logServer.deviceLogToacs(this.device_code,"","","信号pallet_layerQty:" + last_pallet_layerQty + "->" + pallet_layerQty); + } + if (pressCrib_layerQty != last_pressCrib_layerQty) { + logServer.deviceLog(this.device_code,"pressCrib_layerQty" ,String.valueOf(pressCrib_layerQty)); + logServer.deviceLogToacs(this.device_code,"","","信号pressCrib_layerQty:" + last_pressCrib_layerQty + "->" + pressCrib_layerQty); + } + if (codeLayerX1_interval != last_codeLayerX1_interval) { + logServer.deviceLog(this.device_code,"codeLayerX1_interval" ,String.valueOf(codeLayerX1_interval)); + logServer.deviceLogToacs(this.device_code,"","","信号codeLayerX1_interval:" + last_codeLayerX1_interval + "->" + codeLayerX1_interval); + } + if (codeLayerY1_interval != last_codeLayerY1_interval) { + logServer.deviceLog(this.device_code,"codeLayerY1_interval" ,String.valueOf(codeLayerY1_interval)); + logServer.deviceLogToacs(this.device_code,"","","信号codeLayerY1_interval:" + last_codeLayerY1_interval + "->" + codeLayerY1_interval); + } + if (codeLayerX2_interval != last_codeLayerX2_interval) { + logServer.deviceLog(this.device_code,"codeLayerX2_interval" ,String.valueOf(codeLayerX2_interval)); + logServer.deviceLogToacs(this.device_code,"","","信号codeLayerX2_interval:" + last_codeLayerX2_interval + "->" + codeLayerX2_interval); + } + if (codeLayerY2_interval != last_codeLayerY2_interval) { + logServer.deviceLog(this.device_code,"codeLayerY2_interval" ,String.valueOf(codeLayerY2_interval)); + logServer.deviceLogToacs(this.device_code,"","","信号codeLayerY2_interval:" + last_codeLayerY2_interval + "->" + codeLayerY2_interval); + } + if (codeLayerX3_interval != last_codeLayerX3_interval) { + logServer.deviceLog(this.device_code,"codeLayerX3_interval" ,String.valueOf(codeLayerX3_interval)); + logServer.deviceLogToacs(this.device_code,"","","信号codeLayerX3_interval:" + last_codeLayerX3_interval + "->" + codeLayerX3_interval); + } + if (codeLayerY3_interval != last_codeLayerY3_interval) { + logServer.deviceLog(this.device_code,"codeLayerY3_interval" ,String.valueOf(codeLayerY3_interval)); + logServer.deviceLogToacs(this.device_code,"","","信号codeLayerY3_interval:" + last_codeLayerY3_interval + "->" + codeLayerY3_interval); + } + if (codeLayerX1_offset != last_codeLayerX1_offset) { + logServer.deviceLog(this.device_code,"codeLayerX1_offset" ,String.valueOf(codeLayerX1_offset)); + logServer.deviceLogToacs(this.device_code,"","","信号codeLayerX1_offset:" + last_codeLayerX1_offset + "->" + codeLayerX1_offset); + } + if (codeLayerY1_offset != last_codeLayerY1_offset) { + logServer.deviceLog(this.device_code,"codeLayerY1_offset" ,String.valueOf(codeLayerY1_offset)); + logServer.deviceLogToacs(this.device_code,"","","信号codeLayerY1_offset:" + last_codeLayerY1_offset + "->" + codeLayerY1_offset); + } + if (codeLayerX2_offset != last_codeLayerX2_offset) { + logServer.deviceLog(this.device_code,"codeLayerX2_offset" ,String.valueOf(codeLayerX2_offset)); + logServer.deviceLogToacs(this.device_code,"","","信号codeLayerX2_offset:" + last_codeLayerX2_offset + "->" + codeLayerX2_offset); + } + if (codeLayerY2_offset != last_codeLayerY2_offset) { + logServer.deviceLog(this.device_code,"codeLayerY2_offset" ,String.valueOf(codeLayerY2_offset)); + logServer.deviceLogToacs(this.device_code,"","","信号codeLayerY2_offset:" + last_codeLayerY2_offset + "->" + codeLayerY2_offset); + } + if (codeLayerX3_offset != last_codeLayerX3_offset) { + logServer.deviceLog(this.device_code,"codeLayerX3_offset" ,String.valueOf(codeLayerX3_offset)); + logServer.deviceLogToacs(this.device_code,"","","信号codeLayerX3_offset:" + last_codeLayerX3_offset + "->" + codeLayerX3_offset); + } + if (codeLayerY3_offset != last_codeLayerY3_offset) { + logServer.deviceLog(this.device_code,"codeLayerY3_offset" ,String.valueOf(codeLayerY3_offset)); + logServer.deviceLogToacs(this.device_code,"","","信号codeLayerY3_offset:" + last_codeLayerY3_offset + "->" + codeLayerY3_offset); + } + if (pressLayerX1_interval != last_pressLayerX1_interval) { + logServer.deviceLog(this.device_code,"pressLayerX1_interval" ,String.valueOf(pressLayerX1_interval)); + logServer.deviceLogToacs(this.device_code,"","","信号pressLayerX1_interval:" + last_pressLayerX1_interval + "->" + pressLayerX1_interval); + } + if (pressLayerY1_interval != last_pressLayerY1_interval) { + logServer.deviceLog(this.device_code,"pressLayerY1_interval" ,String.valueOf(pressLayerY1_interval)); + logServer.deviceLogToacs(this.device_code,"","","信号pressLayerY1_interval:" + last_pressLayerY1_interval + "->" + pressLayerY1_interval); + } + if (pressLayerX2_interval != last_pressLayerX2_interval) { + logServer.deviceLog(this.device_code,"pressLayerX2_interval" ,String.valueOf(pressLayerX2_interval)); + logServer.deviceLogToacs(this.device_code,"","","信号pressLayerX2_interval:" + last_pressLayerX2_interval + "->" + pressLayerX2_interval); + } + if (pressLayerY2_interval != last_pressLayerY2_interval) { + logServer.deviceLog(this.device_code,"pressLayerY2_interval" ,String.valueOf(pressLayerY2_interval)); + logServer.deviceLogToacs(this.device_code,"","","信号pressLayerY2_interval:" + last_pressLayerY2_interval + "->" + pressLayerY2_interval); + } + if (pressLayerX3_interval != last_pressLayerX3_interval) { + logServer.deviceLog(this.device_code,"pressLayerX3_interval" ,String.valueOf(pressLayerX3_interval)); + logServer.deviceLogToacs(this.device_code,"","","信号pressLayerX3_interval:" + last_pressLayerX3_interval + "->" + pressLayerX3_interval); + } + if (pressLayerY3_interval != last_pressLayerY3_interval) { + logServer.deviceLog(this.device_code,"pressLayerY3_interval" ,String.valueOf(pressLayerY3_interval)); + logServer.deviceLogToacs(this.device_code,"","","信号pressLayerY3_interval:" + last_pressLayerY3_interval + "->" + pressLayerY3_interval); + } + if (pressLayerX1_offset != last_pressLayerX1_offset) { + logServer.deviceLog(this.device_code,"pressLayerX1_offset" ,String.valueOf(pressLayerX1_offset)); + logServer.deviceLogToacs(this.device_code,"","","信号pressLayerX1_offset:" + last_pressLayerX1_offset + "->" + pressLayerX1_offset); + } + if (pressLayerY1_offset != last_pressLayerY1_offset) { + logServer.deviceLog(this.device_code,"pressLayerY1_offset" ,String.valueOf(pressLayerY1_offset)); + logServer.deviceLogToacs(this.device_code,"","","信号pressLayerY1_offset:" + last_pressLayerY1_offset + "->" + pressLayerY1_offset); + } + if (pressLayerX2_offset != last_pressLayerX2_offset) { + logServer.deviceLog(this.device_code,"pressLayerX2_offset" ,String.valueOf(pressLayerX2_offset)); + logServer.deviceLogToacs(this.device_code,"","","信号pressLayerX2_offset:" + last_pressLayerX2_offset + "->" + pressLayerX2_offset); + } + if (pressLayerY2_offset != last_pressLayerY2_offset) { + logServer.deviceLog(this.device_code,"pressLayerY2_offset" ,String.valueOf(pressLayerY2_offset)); + logServer.deviceLogToacs(this.device_code,"","","信号pressLayerY2_offset:" + last_pressLayerY2_offset + "->" + pressLayerY2_offset); + } + if (pressLayerX3_offset != last_pressLayerX3_offset) { + logServer.deviceLog(this.device_code,"pressLayerX3_offset" ,String.valueOf(pressLayerX3_offset)); + logServer.deviceLogToacs(this.device_code,"","","信号pressLayerX3_offset:" + last_pressLayerX3_offset + "->" + pressLayerX3_offset); + } + if (pressLayerY3_offset != last_pressLayerY3_offset) { + logServer.deviceLog(this.device_code,"pressLayerY3_offset" ,String.valueOf(pressLayerY3_offset)); + logServer.deviceLogToacs(this.device_code,"","","信号pressLayerY3_offset:" + last_pressLayerY3_offset + "->" + pressLayerY3_offset); + } + if (one_cribTotal != last_one_cribTotal) { + logServer.deviceLog(this.device_code,"one_cribTotal" ,String.valueOf(one_cribTotal)); + logServer.deviceLogToacs(this.device_code,"","","信号one_cribTotal:" + last_one_cribTotal + "->" + one_cribTotal); + } + if (two_cribTotal != last_two_cribTotal) { + logServer.deviceLog(this.device_code,"two_cribTotal" ,String.valueOf(two_cribTotal)); + logServer.deviceLogToacs(this.device_code,"","","信号two_cribTotal:" + last_two_cribTotal + "->" + two_cribTotal); + } + if (one_qty != last_one_qty) { + logServer.deviceLog(this.device_code,"one_qty" ,String.valueOf(one_qty)); + logServer.deviceLogToacs(this.device_code,"","","信号one_qty:" + last_one_qty + "->" + one_qty); + } + if (two_qty != last_two_qty) { + logServer.deviceLog(this.device_code,"two_qty" ,String.valueOf(two_qty)); + logServer.deviceLogToacs(this.device_code,"","","信号two_qty:" + last_two_qty + "->" + two_qty); + } + if (tool_coordinate != last_tool_coordinate) { + logServer.deviceLog(this.device_code,"tool_coordinate" ,String.valueOf(tool_coordinate)); + logServer.deviceLogToacs(this.device_code,"","","信号tool_coordinate:" + last_tool_coordinate + "->" + tool_coordinate); + } + + } catch (Exception var17) { + return; + } + + if (!this.itemProtocol.getIsonline()) { + this.setIsonline(false); + this.setIserror(true); + message = "信号量同步异常"; + //未联机 + } 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; + switch (mode) { + case 1: + log.debug("设备运转模式:等待工作"); + return; + case 2: + break; + case 4: + //排产单确认 + if (!requireSucess && order_No != 0) { + JSONObject json = new JSONObject(); + json.put("producetask_code",order_No); + json.put("device_code",this.device_code); + json.put("material_code",material); + json.put("qty",qty); + json.put("type","1"); + enterProduction(json); + } + break; + case 5: + //获取托盘信息 + if (!requireSucess) { + getVehicle(); + } + break; + case 6: + //码垛完成 + if (!requireSucess) { + palletizing(); + } + break; + case 7: + //码垛强制完成 + if (!requireSucess) { + mandatoryPalletizing(); + } + break; + case 8: + //申请空盘 + if (!requireSucess) { + applyEmpty(); + } + break; + } + + switch (flag) { + //取货完成 + case 1: + return; + //放货完成 + case 2: + return; + + } + + } + last_mode = mode; + last_status = status; + last_error = error; + last_onoff_status = onoff_status; + last_put_station = put_station; + last_getStation = getStation; + last_barcode = barcode; + last_material = material; + last_specifications = specifications; + last_batch = batch; + last_qty = qty; + last_open_time = open_time; + last_standby_time = standby_time; + last_production_time = production_time; + last_error_time = error_time; + last_order_No = order_No; + last_total_split = total_split; + + last_product_code = product_code; + last_AlongSide = AlongSide; + last_BshortSide = BshortSide; + last_Htrapezoidal = Htrapezoidal; + last_Wthickness = Wthickness; + last_tray_qty = tray_qty; + last_tray_high = tray_high; + last_crib_category = crib_category; + last_palletX1_line = palletX1_line; + last_palletY1_row = palletY1_row; + last_palletA1_angle = palletA1_angle; + last_palletX2_line = palletX2_line; + last_palletY2_row = palletY2_row; + last_palletA2_angle = palletA2_angle; + last_palletX3_line = palletX3_line; + last_palletY3_row = palletY3_row; + last_palletA3_angle = palletA3_angle; + last_pressCribX1_line = pressCribX1_line; + last_pressCribY1_row = pressCribY1_row; + last_pressCribA1_angle = pressCribA1_angle; + last_pressCribX2_line = pressCribX2_line; + last_pressCribY2_row = pressCribY2_row; + last_pressCribA2_angle = pressCribA2_angle; + last_pressCribX3_line = pressCribX3_line; + last_pressCribY3_row = pressCribY3_row; + last_pressCribA3_angle = pressCribA3_angle; + last_Zoffset = Zoffset; + last_pallet_layerQty = pallet_layerQty; + last_pressCrib_layerQty = pressCrib_layerQty; + last_codeLayerX1_interval = codeLayerX1_interval; + last_codeLayerY1_interval = codeLayerY1_interval; + last_codeLayerX2_interval = codeLayerX2_interval; + last_codeLayerY2_interval = codeLayerY2_interval; + last_codeLayerX3_interval = codeLayerX3_interval; + last_codeLayerY3_interval = codeLayerY3_interval; + last_codeLayerX1_offset = codeLayerX1_offset; + last_codeLayerY1_offset = codeLayerY1_offset; + last_codeLayerX2_offset = codeLayerX2_offset; + last_codeLayerY2_offset = codeLayerY2_offset; + last_codeLayerX3_offset = codeLayerX3_offset; + last_codeLayerY3_offset = codeLayerY3_offset; + last_pressLayerX1_interval = pressLayerX1_interval; + last_pressLayerY1_interval = pressLayerY1_interval; + last_pressLayerX2_interval = pressLayerX2_interval; + last_pressLayerY2_interval = pressLayerY2_interval; + last_pressLayerX3_interval = pressLayerX3_interval; + last_pressLayerY3_interval = pressLayerY3_interval; + last_pressLayerX1_offset = pressLayerX1_offset; + last_pressLayerY1_offset = pressLayerY1_offset; + last_pressLayerX2_offset = pressLayerX2_offset; + last_pressLayerY2_offset = pressLayerY2_offset; + last_pressLayerX3_offset = pressLayerX3_offset; + last_pressLayerY3_offset = pressLayerY3_offset; + last_one_cribTotal = one_cribTotal; + last_two_cribTotal = two_cribTotal; + last_one_qty = one_qty; + last_two_qty = two_qty; + last_tool_coordinate = tool_coordinate; + + } + + + public boolean exe_error() { + if (this.error == 0) { + return true; + } else { + log.debug("设备报警"); + return false; + } + } + + /** + * 排产单确认 + * + * @param + */ + public synchronized boolean enterProduction(JSONObject json) { + 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; + HttpResponse result = acsToWmsService.enterOrder(json); + if (result.getStatus() == 200) { + this.writing(this.mode); + ProduceshiftorderDto dto = produceshiftorderService.findByCode(String.valueOf(order_No)); + dto.setOrder_status("0"); + produceshiftorderService.update(dto); + } + requireSucess = true; + return true; + } + } + + /** + * 获取托盘信息 + * + * @param + */ + public synchronized boolean getVehicle() { + 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; + JSONObject json = new JSONObject(); + json.put("device_code",this.device_code); + json.put("vehicle_code",barcode); + JSONObject jo = acsToWmsService.getVehicle(json); + + if (jo.getInteger("status") == 200) { + JSONObject content = jo.getJSONObject("content"); + String qty = content.getString("qty"); + String material_code = content.getString("material_code"); + String material_name = content.getString("material_name"); + String product_code = content.getString("product_code"); + String AlongSide = content.getString("AlongSide"); + String BshortSide = content.getString("BshortSide"); + String Htrapezoidal = content.getString("Htrapezoidal"); + String Wthickness = content.getString("Wthickness"); + String tray_qty = content.getString("tray_qty"); + String tray_high = content.getString("tray_high"); + String crib_category = content.getString("crib_category"); + String palletX1_line = content.getString("palletX1_line"); + String palletY1_row = content.getString("palletY1_row"); + String palletA1_angle = content.getString("palletA1_angle"); + String palletX2_line = content.getString("palletX2_line"); + String palletY2_row = content.getString("palletY2_row"); + String palletA2_angle = content.getString("palletA2_angle"); + String palletX3_line = content.getString("palletX3_line"); + String palletY3_row = content.getString("palletY3_row"); + String palletA3_angle = content.getString("palletA3_angle"); + String pressCribX1_line = content.getString("pressCribX1_line"); + String pressCribY1_row = content.getString("pressCribY1_row"); + String pressCribA1_angle = content.getString("pressCribA1_angle"); + String pressCribX2_line = content.getString("pressCribX2_line"); + String pressCribY2_row = content.getString("pressCribY2_row"); + String pressCribA2_angle = content.getString("pressCribA2_angle"); + String pressCribX3_line = content.getString("pressCribX3_line"); + String pressCribY3_row = content.getString("pressCribY3_row"); + String pressCribA3_angle = content.getString("pressCribA3_angle"); + 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 one_cribTotal = content.getString("one_cribTotal"); + String two_cribTotal = content.getString("two_cribTotal"); + String one_qty = content.getString("one_qty"); + String two_qty = content.getString("two_qty"); + String tool_coordinate = content.getString("tool_coordinate"); + + this.writing(this.mode); + this.writing("to_material_qty",qty); + this.writing("to_material_code",material_code); + this.writing("to_AlongSide",AlongSide); + this.writing("to_BshortSide",BshortSide); + this.writing("to_Htrapezoidal",Htrapezoidal); + this.writing("to_Wthickness",Wthickness); + this.writing("to_tray_qty",tray_qty); + this.writing("to_tray_high",tray_high); + this.writing("to_crib_category",crib_category); + this.writing("to_palletX1_line",palletX1_line); + this.writing("to_palletY1_row",palletY1_row); + this.writing("to_palletA1_angle",palletA1_angle); + this.writing("to_palletX2_line",palletX2_line); + this.writing("to_palletY2_row",palletY2_row); + this.writing("to_palletA2_angle",palletA2_angle); + this.writing("to_palletX3_line",palletX3_line); + this.writing("to_palletY3_row",palletY3_row); + this.writing("to_palletA3_angle",palletA3_angle); + this.writing("to_pressCribX1_line",pressCribX1_line); + this.writing("to_pressCribY1_row",pressCribY1_row); + this.writing("to_pressCribA1_angle",pressCribA1_angle); + this.writing("to_pressCribX2_line",pressCribX2_line); + this.writing("to_pressCribY2_row",pressCribY2_row); + this.writing("to_pressCribA2_angle",pressCribA2_angle); + this.writing("to_pressCribX3_line",pressCribX3_line); + this.writing("to_pressCribY3_row",pressCribY3_row); + this.writing("to_pressCribA3_angle",pressCribA3_angle); + this.writing("to_Zoffset",Zoffset); + this.writing("to_pallet_layerQty",pallet_layerQty); + this.writing("to_pressCrib_layerQty",pressCrib_layerQty); + this.writing("to_codeLayerX1_interval",codeLayerX1_interval); + this.writing("to_codeLayerY1_interval",codeLayerY1_interval); + this.writing("to_codeLayerX2_interval",codeLayerX2_interval); + this.writing("to_codeLayerY2_interval",codeLayerY2_interval); + this.writing("to_codeLayerX3_interval",codeLayerX3_interval); + this.writing("to_codeLayerY3_interval",codeLayerY3_interval); + this.writing("to_codeLayerX1_offset",codeLayerX1_offset); + this.writing("to_codeLayerY1_offset",codeLayerY1_offset); + this.writing("to_codeLayerX2_offset",codeLayerX2_offset); + this.writing("to_codeLayerY2_offset",codeLayerY2_offset); + this.writing("to_codeLayerX3_offset",codeLayerX3_offset); + this.writing("to_codeLayerY3_offset",codeLayerY3_offset); + this.writing("to_pressLayerX1_interval",pressLayerX1_interval); + this.writing("to_pressLayerY1_interval",pressLayerY1_interval); + this.writing("to_pressLayerX2_interval",pressLayerX2_interval); + this.writing("to_pressLayerY2_interval",pressLayerY2_interval); + this.writing("to_pressLayerX3_interval",pressLayerX3_interval); + this.writing("to_pressLayerY3_interval",pressLayerY3_interval); + this.writing("to_pressLayerX1_offset",pressLayerX1_offset); + this.writing("to_pressLayerY1_offset",pressLayerY1_offset); + this.writing("to_pressLayerX2_offset",pressLayerX2_offset); + this.writing("to_pressLayerY2_offset",pressLayerY2_offset); + this.writing("to_pressLayerX3_offset",pressLayerX3_offset); + this.writing("to_pressLayerY3_offset",pressLayerY3_offset); + this.writing("to_one_cribTotal",one_cribTotal); + this.writing("to_two_cribTotal",two_cribTotal); + this.writing("to_one_qty",one_qty); + this.writing("to_two_qty",two_qty); + this.writing("to_tool_coordinate",tool_coordinate); + + } + requireSucess = true; + return true; + } + } + + /** + * 码垛完成 + * + * @param + */ + public synchronized boolean palletizing() { + 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; + JSONObject json = new JSONObject(); + json.put("device_code",this.device_code); + json.put("qty",qty); + json.put("vehicle_code",barcode); + json.put("is_full","1"); + json.put("product_code",product_code); + json.put("AlongSide",AlongSide); + json.put("BshortSide",BshortSide); + json.put("Htrapezoidal",Htrapezoidal); + json.put("Wthickness",Wthickness); + json.put("tray_qty",tray_qty); + json.put("tray_high",tray_high); + json.put("crib_category",crib_category); + json.put("palletX1_line",palletX1_line); + json.put("palletY1_row",palletY1_row); + json.put("palletA1_angle",palletA1_angle); + json.put("palletX2_line",palletX2_line); + json.put("palletY2_row",palletY2_row); + json.put("palletA2_angle",palletA2_angle); + json.put("palletX3_line",palletX3_line); + json.put("palletY3_row",palletY3_row); + json.put("palletA3_angle",palletA3_angle); + json.put("pressCribX1_line",pressCribX1_line); + json.put("pressCribY1_row",pressCribY1_row); + json.put("pressCribA1_angle",pressCribA1_angle); + json.put("pressCribX2_line",pressCribX2_line); + json.put("pressCribY2_row",pressCribY2_row); + json.put("pressCribA2_angle",pressCribA2_angle); + json.put("pressCribX3_line",pressCribX3_line); + json.put("pressCribY3_row",pressCribY3_row); + json.put("pressCribA3_angle",pressCribA3_angle); + 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("one_cribTotal",one_cribTotal); + json.put("two_cribTotal",two_cribTotal); + json.put("one_qty",one_qty); + json.put("two_qty",two_qty); + json.put("tool_coordinate",tool_coordinate); + + HttpResponse result = acsToWmsService.applyTaskManipulatorToWms(json); + if (result.getStatus() == 200) { + this.writing(this.mode); + } + requireSucess = true; + return true; + } + } + + /** + * 码垛强制完成 + * + * @param + */ + public synchronized boolean mandatoryPalletizing() { + 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; + JSONObject json = new JSONObject(); + json.put("device_code",this.device_code); + json.put("qty",qty); + json.put("vehicle_code",barcode); + json.put("is_full","0"); + json.put("product_code",product_code); + json.put("AlongSide",AlongSide); + json.put("BshortSide",BshortSide); + json.put("Htrapezoidal",Htrapezoidal); + json.put("Wthickness",Wthickness); + json.put("tray_qty",tray_qty); + json.put("tray_high",tray_high); + json.put("crib_category",crib_category); + json.put("palletX1_line",palletX1_line); + json.put("palletY1_row",palletY1_row); + json.put("palletA1_angle",palletA1_angle); + json.put("palletX2_line",palletX2_line); + json.put("palletY2_row",palletY2_row); + json.put("palletA2_angle",palletA2_angle); + json.put("palletX3_line",palletX3_line); + json.put("palletY3_row",palletY3_row); + json.put("palletA3_angle",palletA3_angle); + json.put("pressCribX1_line",pressCribX1_line); + json.put("pressCribY1_row",pressCribY1_row); + json.put("pressCribA1_angle",pressCribA1_angle); + json.put("pressCribX2_line",pressCribX2_line); + json.put("pressCribY2_row",pressCribY2_row); + json.put("pressCribA2_angle",pressCribA2_angle); + json.put("pressCribX3_line",pressCribX3_line); + json.put("pressCribY3_row",pressCribY3_row); + json.put("pressCribA3_angle",pressCribA3_angle); + 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("one_cribTotal",one_cribTotal); + json.put("two_cribTotal",two_cribTotal); + json.put("one_qty",one_qty); + json.put("two_qty",two_qty); + json.put("tool_coordinate",tool_coordinate); + + HttpResponse result = acsToWmsService.applyTaskManipulatorToWms(json); + if (result.getStatus() == 200) { + this.writing(this.mode); + } + requireSucess = true; + return true; + } + } + + /** + * 申请空盘 + * + * @param + */ + public synchronized boolean applyEmpty() { + 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; + JSONObject json = new JSONObject(); + json.put("device_code",this.device_code); + json.put("type","4"); + json.put("qty",qty); + json.put("vehicle_code",barcode); + HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json); + if (result.getStatus() == 200) { + this.writing(this.mode); + } + + requireSucess = true; + return true; + } + } + + public boolean exe_business() { + return true; + } + + public void executing(Server server, Map itemMap) { + ReadUtil.write(itemMap, server); + } + + public static Boolean isExistFieldName(String fieldName, Object obj) throws NoSuchFieldException { + if (obj == null || StrUtil.isEmpty(fieldName)) { + return null; + } + //获取这个类的所有属性 + Field[] fields = obj.getClass().getDeclaredFields(); + boolean flag = false; + //循环遍历所有的fields + for (int i = 0; i < fields.length; i++) { + if (fields[i].getName().equals("item_" + fieldName)) { + flag = true; + break; + } + } + return flag; + } + + public void writing(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_fold_disc_site.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); + + } + + 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(); + itemMap.put(to_param, value); + + ReadUtil.write(itemMap, server); + } +} diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java index 096be69..15b65d1 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java @@ -26,6 +26,7 @@ import org.nl.acs.device_driver.lnsh.lnsh_press.LnshPressDeviceDriver; import org.nl.acs.device_driver.lnsh.lnsh_rgv.LnshRGVDeviceDriver; import org.nl.acs.device_driver.lnsh.lnsh_split_manipulator.LnshSplitManipulatorDeviceDriver; import org.nl.acs.device_driver.lnsh.lnsh_station.LnshStationDeviceDriver; +import org.nl.acs.device_driver.lnsh.rljn_package_palletSplit_manipulator.RljnPackagePalletSplitManipulatorDeviceDriver; import org.nl.acs.device_driver.machines_site.MachinesSiteDeviceDriver; import org.nl.acs.device_driver.non_line_inspect_site.NonLineInspectSiteDeviceDriver; import org.nl.acs.device_driver.non_line_manipulator_inspect_site.NonLineManipulatorInspectSiteDeviceDriver; @@ -526,10 +527,12 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { LnshPackageLineDeviceDriver lnshPackageLineDeviceDriver; //晟华-工位(交互模板) LnshStationDeviceDriver lnshStationDeviceDriver; - //晟华-覆膜机 + //晟华-缓存货架 LnshLaminatingMachineDeviceDriver lnshLaminatingMachineDeviceDriver; //晟华-包装线工位 LnshPackageSiteDeviceDriver lnshPackageSiteDeviceDriver; + //荣力嘉耐-包装码拆垛机械手 + RljnPackagePalletSplitManipulatorDeviceDriver rljnPackagePalletSplitManipulatorDeviceDriver; if (datas.size() == 0) { List list = DeviceService.findCacheDevice(); @@ -789,6 +792,8 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { jo.put("weight", lnshStationDeviceDriver.getWeight()); jo.put("material", lnshStationDeviceDriver.getMaterial()); jo.put("barcode", lnshStationDeviceDriver.getBarcode()); + jo.put("specifications", lnshStationDeviceDriver.getSpecifications()); + jo.put("batch", lnshStationDeviceDriver.getBatch()); } else if (device.getDeviceDriver() instanceof LnshPackageSiteDeviceDriver) { lnshPackageSiteDeviceDriver = (LnshPackageSiteDeviceDriver) device.getDeviceDriver(); jo.put("device_code", device.getDevice_code()); @@ -852,13 +857,10 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { jo.put("isOnline", lnshPalletizingManipulatorDeviceDriver.getIsonline()); jo.put("error", lnshPalletizingManipulatorDeviceDriver.getError()); jo.put("put_station", lnshPalletizingManipulatorDeviceDriver.getPut_station()); - jo.put("barcode", lnshPalletizingManipulatorDeviceDriver.getBarcode()); jo.put("material", lnshPalletizingManipulatorDeviceDriver.getMaterial()); jo.put("encoder_qty", lnshPalletizingManipulatorDeviceDriver.getEncoder_qty()); - jo.put("open_time", lnshPalletizingManipulatorDeviceDriver.getOpen_time()); - jo.put("standby_time", lnshPalletizingManipulatorDeviceDriver.getStandby_time()); - jo.put("production_time", lnshPalletizingManipulatorDeviceDriver.getProduction_time()); - jo.put("error_time", lnshPalletizingManipulatorDeviceDriver.getError_time()); + jo.put("batch", lnshPalletizingManipulatorDeviceDriver.getBatch()); + jo.put("specifications", lnshPalletizingManipulatorDeviceDriver.getSpecifications()); jo.put("isError", lnshPalletizingManipulatorDeviceDriver.getIserror()); jo.put("message", lnshPalletizingManipulatorDeviceDriver.getMessage()); } @@ -962,6 +964,30 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { jo.put("isError", lnshPackagePalletManipulatorDeviceDriver.getIserror()); jo.put("message", lnshPackagePalletManipulatorDeviceDriver.getMessage()); } + else if (device.getDeviceDriver() instanceof RljnPackagePalletSplitManipulatorDeviceDriver) { + rljnPackagePalletSplitManipulatorDeviceDriver = (RljnPackagePalletSplitManipulatorDeviceDriver) device.getDeviceDriver(); + jo.put("device_code", device.getDevice_code()); + jo.put("mode", rljnPackagePalletSplitManipulatorDeviceDriver.getMode()); + jo.put("status", rljnPackagePalletSplitManipulatorDeviceDriver.getStatus()); + jo.put("isOnline", rljnPackagePalletSplitManipulatorDeviceDriver.getIsonline()); + jo.put("error", rljnPackagePalletSplitManipulatorDeviceDriver.getError()); + jo.put("putStation", rljnPackagePalletSplitManipulatorDeviceDriver.getPut_station()); + jo.put("barcode", rljnPackagePalletSplitManipulatorDeviceDriver.getBarcode()); + jo.put("material", rljnPackagePalletSplitManipulatorDeviceDriver.getMaterial()); + jo.put("qty", rljnPackagePalletSplitManipulatorDeviceDriver.getQty()); + jo.put("open_time", rljnPackagePalletSplitManipulatorDeviceDriver.getOpen_time()); + jo.put("standby_time", rljnPackagePalletSplitManipulatorDeviceDriver.getStandby_time()); + jo.put("production_time", rljnPackagePalletSplitManipulatorDeviceDriver.getProduction_time()); + jo.put("error_time", rljnPackagePalletSplitManipulatorDeviceDriver.getError_time()); + jo.put("order_No", rljnPackagePalletSplitManipulatorDeviceDriver.getOrder_No()); + jo.put("onoff_status", rljnPackagePalletSplitManipulatorDeviceDriver.getOnoff_status()); + jo.put("getStation", rljnPackagePalletSplitManipulatorDeviceDriver.getGetStation()); + jo.put("specifications", rljnPackagePalletSplitManipulatorDeviceDriver.getSpecifications()); + jo.put("batch", rljnPackagePalletSplitManipulatorDeviceDriver.getBatch()); + jo.put("total_split", rljnPackagePalletSplitManipulatorDeviceDriver.getTotal_split()); + jo.put("isError", rljnPackagePalletSplitManipulatorDeviceDriver.getIserror()); + jo.put("message", rljnPackagePalletSplitManipulatorDeviceDriver.getMessage()); + } else if (device.getDeviceDriver() instanceof LnshLabelingMachineDeviceDriver) { lnshLabelingMachineDeviceDriver = (LnshLabelingMachineDeviceDriver) device.getDeviceDriver(); jo.put("device_code", device.getDevice_code()); @@ -1014,6 +1040,8 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { jo.put("mode", lnshLaminatingMachineDeviceDriver.getMode()); jo.put("move", lnshLaminatingMachineDeviceDriver.getMove()); jo.put("container_type", lnshLaminatingMachineDeviceDriver.getContainer_type()); + jo.put("barcode", lnshLaminatingMachineDeviceDriver.getBarcode()); + jo.put("task", lnshLaminatingMachineDeviceDriver.getTask()); jo.put("error", lnshLaminatingMachineDeviceDriver.getError()); jo.put("isOnline", lnshLaminatingMachineDeviceDriver.getIsonline()); jo.put("isError", lnshLaminatingMachineDeviceDriver.getIserror()); @@ -1302,6 +1330,8 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { jo.put("weight", lnshStationDeviceDriver.getWeight()); jo.put("material", lnshStationDeviceDriver.getMaterial()); jo.put("barcode", lnshStationDeviceDriver.getBarcode()); + jo.put("specifications", lnshStationDeviceDriver.getSpecifications()); + jo.put("batch", lnshStationDeviceDriver.getBatch()); } else if (device.getDeviceDriver() instanceof LnshPackageSiteDeviceDriver) { lnshPackageSiteDeviceDriver = (LnshPackageSiteDeviceDriver) device.getDeviceDriver(); jo.put("device_code", device.getDevice_code()); @@ -1365,13 +1395,10 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { jo.put("isOnline", lnshPalletizingManipulatorDeviceDriver.getIsonline()); jo.put("error", lnshPalletizingManipulatorDeviceDriver.getError()); jo.put("put_station", lnshPalletizingManipulatorDeviceDriver.getPut_station()); - jo.put("barcode", lnshPalletizingManipulatorDeviceDriver.getBarcode()); jo.put("material", lnshPalletizingManipulatorDeviceDriver.getMaterial()); jo.put("encoder_qty", lnshPalletizingManipulatorDeviceDriver.getEncoder_qty()); - jo.put("open_time", lnshPalletizingManipulatorDeviceDriver.getOpen_time()); - jo.put("standby_time", lnshPalletizingManipulatorDeviceDriver.getStandby_time()); - jo.put("production_time", lnshPalletizingManipulatorDeviceDriver.getProduction_time()); - jo.put("error_time", lnshPalletizingManipulatorDeviceDriver.getError_time()); + jo.put("batch", lnshPalletizingManipulatorDeviceDriver.getBatch()); + jo.put("specifications", lnshPalletizingManipulatorDeviceDriver.getSpecifications()); jo.put("isError", lnshPalletizingManipulatorDeviceDriver.getIserror()); jo.put("message", lnshPalletizingManipulatorDeviceDriver.getMessage()); } @@ -1475,6 +1502,30 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { jo.put("isError", lnshPackagePalletManipulatorDeviceDriver.getIserror()); jo.put("message", lnshPackagePalletManipulatorDeviceDriver.getMessage()); } + else if (device.getDeviceDriver() instanceof RljnPackagePalletSplitManipulatorDeviceDriver) { + rljnPackagePalletSplitManipulatorDeviceDriver = (RljnPackagePalletSplitManipulatorDeviceDriver) device.getDeviceDriver(); + jo.put("device_code", device.getDevice_code()); + jo.put("mode", rljnPackagePalletSplitManipulatorDeviceDriver.getMode()); + jo.put("status", rljnPackagePalletSplitManipulatorDeviceDriver.getStatus()); + jo.put("isOnline", rljnPackagePalletSplitManipulatorDeviceDriver.getIsonline()); + jo.put("error", rljnPackagePalletSplitManipulatorDeviceDriver.getError()); + jo.put("putStation", rljnPackagePalletSplitManipulatorDeviceDriver.getPut_station()); + jo.put("barcode", rljnPackagePalletSplitManipulatorDeviceDriver.getBarcode()); + jo.put("material", rljnPackagePalletSplitManipulatorDeviceDriver.getMaterial()); + jo.put("qty", rljnPackagePalletSplitManipulatorDeviceDriver.getQty()); + jo.put("open_time", rljnPackagePalletSplitManipulatorDeviceDriver.getOpen_time()); + jo.put("standby_time", rljnPackagePalletSplitManipulatorDeviceDriver.getStandby_time()); + jo.put("production_time", rljnPackagePalletSplitManipulatorDeviceDriver.getProduction_time()); + jo.put("error_time", rljnPackagePalletSplitManipulatorDeviceDriver.getError_time()); + jo.put("order_No", rljnPackagePalletSplitManipulatorDeviceDriver.getOrder_No()); + jo.put("onoff_status", rljnPackagePalletSplitManipulatorDeviceDriver.getOnoff_status()); + jo.put("getStation", rljnPackagePalletSplitManipulatorDeviceDriver.getGetStation()); + jo.put("specifications", rljnPackagePalletSplitManipulatorDeviceDriver.getSpecifications()); + jo.put("batch", rljnPackagePalletSplitManipulatorDeviceDriver.getBatch()); + jo.put("total_split", rljnPackagePalletSplitManipulatorDeviceDriver.getTotal_split()); + jo.put("isError", rljnPackagePalletSplitManipulatorDeviceDriver.getIserror()); + jo.put("message", rljnPackagePalletSplitManipulatorDeviceDriver.getMessage()); + } else if (device.getDeviceDriver() instanceof LnshLabelingMachineDeviceDriver) { lnshLabelingMachineDeviceDriver = (LnshLabelingMachineDeviceDriver) device.getDeviceDriver(); jo.put("device_code", device.getDevice_code()); @@ -1527,6 +1578,8 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { jo.put("mode", lnshLaminatingMachineDeviceDriver.getMode()); jo.put("move", lnshLaminatingMachineDeviceDriver.getMove()); jo.put("container_type", lnshLaminatingMachineDeviceDriver.getContainer_type()); + jo.put("barcode", lnshLaminatingMachineDeviceDriver.getBarcode()); + jo.put("task", lnshLaminatingMachineDeviceDriver.getTask()); jo.put("error", lnshLaminatingMachineDeviceDriver.getError()); jo.put("isOnline", lnshLaminatingMachineDeviceDriver.getIsonline()); jo.put("isError", lnshLaminatingMachineDeviceDriver.getIserror()); diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/stage/service/impl/StageActorServiceImpl.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/stage/service/impl/StageActorServiceImpl.java index 0fc832a..ec4e28b 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/stage/service/impl/StageActorServiceImpl.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/stage/service/impl/StageActorServiceImpl.java @@ -29,6 +29,7 @@ import org.nl.acs.device_driver.lnsh.lnsh_press.LnshPressDeviceDriver; import org.nl.acs.device_driver.lnsh.lnsh_rgv.LnshRGVDeviceDriver; import org.nl.acs.device_driver.lnsh.lnsh_split_manipulator.LnshSplitManipulatorDeviceDriver; import org.nl.acs.device_driver.lnsh.lnsh_station.LnshStationDeviceDriver; +import org.nl.acs.device_driver.lnsh.rljn_package_palletSplit_manipulator.RljnPackagePalletSplitManipulatorDeviceDriver; import org.nl.acs.device_driver.machines_site.MachinesSiteDeviceDriver; import org.nl.acs.device_driver.non_line_inspect_site.NonLineInspectSiteDeviceDriver; import org.nl.acs.device_driver.non_line_manipulator_inspect_site.NonLineManipulatorInspectSiteDeviceDriver; @@ -369,10 +370,12 @@ public class StageActorServiceImpl implements StageActorService { LnshPackageLineDeviceDriver lnshPackageLineDeviceDriver; //晟华-工位(交互模板) LnshStationDeviceDriver lnshStationDeviceDriver; - //晟华-覆膜机 + //晟华-缓存货架 LnshLaminatingMachineDeviceDriver lnshLaminatingMachineDeviceDriver; //晟华-包装线工位 LnshPackageSiteDeviceDriver lnshPackageSiteDeviceDriver; + //荣力嘉耐-包装码拆垛机械手 + RljnPackagePalletSplitManipulatorDeviceDriver rljnPackagePalletSplitManipulatorDeviceDriver; if (device.getDeviceDriver() instanceof StandardCoveyorControlDeviceDriver) { standardCoveyorControlDeviceDriver = (StandardCoveyorControlDeviceDriver) device.getDeviceDriver(); @@ -1017,6 +1020,8 @@ public class StageActorServiceImpl implements StageActorService { jo.put("weight", lnshStationDeviceDriver.getWeight()); jo.put("material", lnshStationDeviceDriver.getMaterial()); jo.put("barcode", lnshStationDeviceDriver.getBarcode()); + jo.put("specifications", lnshStationDeviceDriver.getSpecifications()); + jo.put("batch", lnshStationDeviceDriver.getBatch()); } else if (device.getDeviceDriver() instanceof LnshPackageSiteDeviceDriver) { lnshPackageSiteDeviceDriver = (LnshPackageSiteDeviceDriver) device.getDeviceDriver(); if (lnshPackageSiteDeviceDriver.getMode() == 0) { @@ -1196,13 +1201,10 @@ public class StageActorServiceImpl implements StageActorService { jo.put("isOnline", lnshPalletizingManipulatorDeviceDriver.getIsonline()); jo.put("error", lnshPalletizingManipulatorDeviceDriver.getError()); jo.put("put_station", lnshPalletizingManipulatorDeviceDriver.getPut_station()); - jo.put("barcode", lnshPalletizingManipulatorDeviceDriver.getBarcode()); jo.put("material", lnshPalletizingManipulatorDeviceDriver.getMaterial()); jo.put("encoder_qty", lnshPalletizingManipulatorDeviceDriver.getEncoder_qty()); - jo.put("open_time", lnshPalletizingManipulatorDeviceDriver.getOpen_time()); - jo.put("standby_time", lnshPalletizingManipulatorDeviceDriver.getStandby_time()); - jo.put("production_time", lnshPalletizingManipulatorDeviceDriver.getProduction_time()); - jo.put("error_time", lnshPalletizingManipulatorDeviceDriver.getError_time()); + jo.put("specifications", lnshPalletizingManipulatorDeviceDriver.getSpecifications()); + jo.put("batch", lnshPalletizingManipulatorDeviceDriver.getBatch()); jo.put("isError", lnshPalletizingManipulatorDeviceDriver.getIserror()); jo.put("message", lnshPalletizingManipulatorDeviceDriver.getMessage()); } @@ -1422,6 +1424,30 @@ public class StageActorServiceImpl implements StageActorService { jo.put("isError", lnshPackagePalletManipulatorDeviceDriver.getIserror()); jo.put("message", lnshPackagePalletManipulatorDeviceDriver.getMessage()); } + else if (device.getDeviceDriver() instanceof RljnPackagePalletSplitManipulatorDeviceDriver) { + rljnPackagePalletSplitManipulatorDeviceDriver = (RljnPackagePalletSplitManipulatorDeviceDriver) device.getDeviceDriver(); + jo.put("device_code", device.getDevice_code()); + jo.put("mode", rljnPackagePalletSplitManipulatorDeviceDriver.getMode()); + jo.put("status", rljnPackagePalletSplitManipulatorDeviceDriver.getStatus()); + jo.put("isOnline", rljnPackagePalletSplitManipulatorDeviceDriver.getIsonline()); + jo.put("error", rljnPackagePalletSplitManipulatorDeviceDriver.getError()); + jo.put("putStation", rljnPackagePalletSplitManipulatorDeviceDriver.getPut_station()); + jo.put("barcode", rljnPackagePalletSplitManipulatorDeviceDriver.getBarcode()); + jo.put("material", rljnPackagePalletSplitManipulatorDeviceDriver.getMaterial()); + jo.put("qty", rljnPackagePalletSplitManipulatorDeviceDriver.getQty()); + jo.put("open_time", rljnPackagePalletSplitManipulatorDeviceDriver.getOpen_time()); + jo.put("standby_time", rljnPackagePalletSplitManipulatorDeviceDriver.getStandby_time()); + jo.put("production_time", rljnPackagePalletSplitManipulatorDeviceDriver.getProduction_time()); + jo.put("error_time", rljnPackagePalletSplitManipulatorDeviceDriver.getError_time()); + jo.put("order_No", rljnPackagePalletSplitManipulatorDeviceDriver.getOrder_No()); + jo.put("onoff_status", rljnPackagePalletSplitManipulatorDeviceDriver.getOnoff_status()); + jo.put("getStation", rljnPackagePalletSplitManipulatorDeviceDriver.getGetStation()); + jo.put("specifications", rljnPackagePalletSplitManipulatorDeviceDriver.getSpecifications()); + jo.put("batch", rljnPackagePalletSplitManipulatorDeviceDriver.getBatch()); + jo.put("total_split", rljnPackagePalletSplitManipulatorDeviceDriver.getTotal_split()); + jo.put("isError", rljnPackagePalletSplitManipulatorDeviceDriver.getIserror()); + jo.put("message", rljnPackagePalletSplitManipulatorDeviceDriver.getMessage()); + } else if (device.getDeviceDriver() instanceof LnshLabelingMachineDeviceDriver) { lnshLabelingMachineDeviceDriver = (LnshLabelingMachineDeviceDriver) device.getDeviceDriver(); if (lnshLabelingMachineDeviceDriver.getMode() == 0) { @@ -1473,6 +1499,12 @@ public class StageActorServiceImpl implements StageActorService { mode = "申请空盘"; } + String onoff_status = ""; + if (lnshSplitManipulatorDeviceDriver.getOnoff_status() == 0) { + onoff_status = "关机"; + } else if (lnshSplitManipulatorDeviceDriver.getOnoff_status() == 1) { + onoff_status = "开机"; + } obj.put("device_name", lnshSplitManipulatorDeviceDriver.getDevice().getDevice_name()); jo.put("mode", mode); jo.put("isOnline", lnshSplitManipulatorDeviceDriver.getIsonline()); @@ -1485,6 +1517,9 @@ public class StageActorServiceImpl implements StageActorService { jo.put("standby_time", lnshSplitManipulatorDeviceDriver.getStandby_time()); jo.put("production_time", lnshSplitManipulatorDeviceDriver.getProduction_time()); jo.put("error_time", lnshSplitManipulatorDeviceDriver.getError_time()); + jo.put("batch", lnshSplitManipulatorDeviceDriver.getBatch()); + jo.put("specifications", lnshSplitManipulatorDeviceDriver.getSpecifications()); + jo.put("onoff_status", onoff_status); jo.put("isError", lnshSplitManipulatorDeviceDriver.getIserror()); jo.put("message", lnshSplitManipulatorDeviceDriver.getMessage()); } @@ -1536,6 +1571,8 @@ public class StageActorServiceImpl implements StageActorService { jo.put("mode", mode); jo.put("move", move); jo.put("container_type", lnshLaminatingMachineDeviceDriver.getContainer_type()); + jo.put("barcode", lnshLaminatingMachineDeviceDriver.getBarcode()); + jo.put("task", lnshLaminatingMachineDeviceDriver.getTask()); jo.put("error", lnshLaminatingMachineDeviceDriver.getError()); jo.put("isOnline", lnshLaminatingMachineDeviceDriver.getIsonline()); jo.put("isError", lnshLaminatingMachineDeviceDriver.getIserror()); diff --git a/acs/qd/src/views/acs/device/config.vue b/acs/qd/src/views/acs/device/config.vue index b6cf969..20334a9 100644 --- a/acs/qd/src/views/acs/device/config.vue +++ b/acs/qd/src/views/acs/device/config.vue @@ -118,6 +118,7 @@ import lnsh_package_pallet_manipulator from '@/views/acs/device/driver/lnsh/lnsh import lnsh_station from '@/views/acs/device/driver/lnsh/lnsh_station' import lnsh_Laminating_machine from '@/views/acs/device/driver/lnsh/lnsh_Laminating_machine' import lnsh_package_site from '@/views/acs/device/driver/lnsh/lnsh_package_site' +import rljn_package_palletSplit_manipulator from '@/views/acs/device/driver/lnsh/rljn_package_palletSplit_manipulator' export default { name: 'DeviceConfig', @@ -129,7 +130,7 @@ export default { standard_photoelectric_inspect_site, ndxy_special, hailiang_labeling, ndxy_special_two, whxr_storage_conveyor, whxr_ball_mill, whxr_spary_tower, whxr_weight, electric_fence, lnsh_mixing_mill, lnsh_press, lnsh_palletizing_manipulator, lnsh_fold_disc_site, lnsh_kiln_lane, lnsh_kiln_truss, lnsh_package_line, lnsh_out_kiln_truss, lnsh_package_pallet_manipulator, lnsh_pallet_storage, lnsh_labeling_machine, lnsh_split_manipulator, lnsh_rgv, - lnsh_station, lnsh_Laminating_machine, lnsh_package_site }, + lnsh_station, lnsh_Laminating_machine, lnsh_package_site, rljn_package_palletSplit_manipulator }, dicts: ['device_type'], mixins: [crud], data() { diff --git a/acs/qd/src/views/acs/device/driver/lnsh/lnsh_Laminating_machine.vue b/acs/qd/src/views/acs/device/driver/lnsh/lnsh_Laminating_machine.vue index ebde637..e343a8e 100644 --- a/acs/qd/src/views/acs/device/driver/lnsh/lnsh_Laminating_machine.vue +++ b/acs/qd/src/views/acs/device/driver/lnsh/lnsh_Laminating_machine.vue @@ -1,5 +1,5 @@