From 9ff71aa996b68720623d1e4cf0b7fecc7f1ccc86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B1=9F=E7=8E=AE?= Date: Wed, 8 Feb 2023 19:30:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../standard_inspect_site/ItemProtocol.java | 6 ++-- .../StandardInspectSiteDefination.java | 10 +++--- .../lnsh_Laminating_machine/ItemProtocol.java | 8 ++--- .../LnshLaminatingMachineDefination.java | 12 +++---- .../driver/lnsh/lnsh_Laminating_machine.vue | 17 +++++----- .../acs/device/driver/lnsh/lnsh_press.vue | 31 ++++++++++++++++--- .../device/driver/standard_inspect_site.vue | 13 +++++--- 7 files changed, 62 insertions(+), 35 deletions(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_inspect_site/ItemProtocol.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_inspect_site/ItemProtocol.java index 7b189c7..749628c 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_inspect_site/ItemProtocol.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_inspect_site/ItemProtocol.java @@ -96,9 +96,9 @@ public class ItemProtocol { public static List getWriteableItemDtos() { ArrayList list = new ArrayList(); - list.add(new ItemDto(item_to_command, "作业命令", "DB601.W2", Boolean.valueOf(true))); - list.add(new ItemDto(item_to_target, "目标站", "DB601.W4")); - list.add(new ItemDto(item_to_task, "任务号", "DB601.D8")); + list.add(new ItemDto(item_to_command, "作业命令", "DB.W0", Boolean.valueOf(true))); + list.add(new ItemDto(item_to_target, "目标站", "DB.W2")); + list.add(new ItemDto(item_to_task, "任务号", "DB.D4")); return list; } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_inspect_site/StandardInspectSiteDefination.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_inspect_site/StandardInspectSiteDefination.java index 4299036..dd2e8d7 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_inspect_site/StandardInspectSiteDefination.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_inspect_site/StandardInspectSiteDefination.java @@ -57,11 +57,11 @@ public class StandardInspectSiteDefination implements OpcDeviceDriverDefination public static List getReadableItemDtos2() { List list = new ArrayList(); - list.add(new ItemDto(ItemProtocol.item_heartbeat, "心跳", "DB600.B0")); - list.add(new ItemDto(ItemProtocol.item_mode, "工作状态", "DB600.B1", true)); - list.add(new ItemDto(ItemProtocol.item_move, "光电开关信号", "DB600.B2")); - list.add(new ItemDto(ItemProtocol.item_error, "报警信号", "DB600.B6")); - list.add(new ItemDto(ItemProtocol.item_task, "任务号", "DB600.D8")); + list.add(new ItemDto(ItemProtocol.item_heartbeat, "心跳", "DB.B0")); + list.add(new ItemDto(ItemProtocol.item_mode, "工作状态", "DB.B1", true)); + list.add(new ItemDto(ItemProtocol.item_move, "光电开关信号", "DB.B2")); + list.add(new ItemDto(ItemProtocol.item_error, "报警信号", "DB.B3")); + list.add(new ItemDto(ItemProtocol.item_task, "任务号", "DB.D4")); return list; } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_Laminating_machine/ItemProtocol.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_Laminating_machine/ItemProtocol.java index c2f7287..3eafb84 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_Laminating_machine/ItemProtocol.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_Laminating_machine/ItemProtocol.java @@ -111,10 +111,10 @@ public class ItemProtocol { 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, "作业命令", "DB.W0", Boolean.valueOf(true))); + list.add(new ItemDto(item_to_target, "目标站", "DB.W2")); + list.add(new ItemDto(item_to_task, "任务号", "DB.D4")); + list.add(new ItemDto(item_to_barcode, "条码", "DB.W8")); return list; } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_Laminating_machine/LnshLaminatingMachineDefination.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_Laminating_machine/LnshLaminatingMachineDefination.java index 22ec6e8..43be0fd 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_Laminating_machine/LnshLaminatingMachineDefination.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_Laminating_machine/LnshLaminatingMachineDefination.java @@ -57,12 +57,12 @@ 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, "心跳", "DB.B0")); + list.add(new ItemDto(ItemProtocol.item_mode, "工作状态", "DB.B1", true)); + list.add(new ItemDto(ItemProtocol.item_move, "光电开关信号", "DB.B2")); + list.add(new ItemDto(ItemProtocol.item_container_type, "托盘类型", "DB.B3")); + list.add(new ItemDto(ItemProtocol.item_error, "报警信号", "DB.B4")); + list.add(new ItemDto(ItemProtocol.item_task, "任务号", "DB.D5")); return list; } diff --git a/acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_Laminating_machine.vue b/acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_Laminating_machine.vue index 8d7b59b..c244801 100644 --- a/acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_Laminating_machine.vue +++ b/acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_Laminating_machine.vue @@ -360,17 +360,20 @@ export default { return } for (const val in this.data1) { + if (this.data1[val].code.indexOf('heartbeat') !== -1) { + this.data1[val].db = beforeStr + '.B0' + } if (this.data1[val].code.indexOf('move') !== -1) { - this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 1) + this.data1[val].db = beforeStr + '.B2' } if (this.data1[val].code.indexOf('container_type') !== -1) { - this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 2) + this.data1[val].db = beforeStr + '.B3' } if (this.data1[val].code.indexOf('error') !== -1) { - this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 3) + this.data1[val].db = beforeStr + '.B4' } if (this.data1[val].code.indexOf('task') !== -1) { - this.data1[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 4) + this.data1[val].db = beforeStr + '.D5' } } } @@ -391,13 +394,13 @@ export default { } for (const val in this.data2) { if (this.data2[val].code.indexOf('to_target') !== -1) { - this.data2[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 2) + this.data2[val].db = beforeStr + '.W2' } if (this.data2[val].code.indexOf('to_task') !== -1) { - this.data2[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 4) + this.data2[val].db = beforeStr + '.D4' } if (this.data2[val].code.indexOf('to_barcode') !== -1) { - this.data2[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 8) + this.data2[val].db = beforeStr + '.W8' } } } diff --git a/acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_press.vue b/acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_press.vue index 93d47cc..42aac51 100644 --- a/acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_press.vue +++ b/acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_press.vue @@ -360,6 +360,9 @@ export default { return } for (const val in this.data1) { + if (this.data1[val].code.indexOf('heartbeat') !== -1) { + this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) - 1) + } if (this.data1[val].code.indexOf('status') !== -1) { this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 1) } @@ -414,17 +417,35 @@ export default { return } for (const val in this.data2) { + if (this.data2[val].code.indexOf('to_command') !== -1) { + this.data2[val].db = beforeStr + '.W0' + } if (this.data2[val].code.indexOf('to_error') !== -1) { - this.data2[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 2) + this.data2[val].db = beforeStr + '.W2' } if (this.data2[val].code.indexOf('to_order_No') !== -1) { - this.data2[val].db = beforeStr + '.' + 'STRING' + (parseInt(endNumber) + 4) + '.50' + this.data2[val].db = beforeStr + '.STRING4.50' } - if (this.data2[val].code.indexOf('to_weight') !== -1) { - this.data2[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 54) + if (this.data2[val].code.indexOf('to_qty') !== -1) { + this.data2[val].db = beforeStr + '.D54' } if (this.data2[val].code.indexOf('to_material_code') !== -1) { - this.data2[val].db = beforeStr + '.' + 'STRING' + (parseInt(endNumber) + 58) + '.50' + this.data2[val].db = beforeStr + '.STRING58.50' + } + if (this.data2[val].code.indexOf('to_product_code') !== -1) { + this.data2[val].db = beforeStr + '.W108' + } + if (this.data2[val].code.indexOf('to_AlongSide') !== -1) { + this.data2[val].db = beforeStr + '.W110' + } + if (this.data2[val].code.indexOf('to_BshortSide') !== -1) { + this.data2[val].db = beforeStr + '.W112' + } + if (this.data2[val].code.indexOf('to_Htrapezoidal') !== -1) { + this.data2[val].db = beforeStr + '.W114' + } + if (this.data2[val].code.indexOf('to_Wthickness') !== -1) { + this.data2[val].db = beforeStr + '.W116' } } } diff --git a/acs/nladmin-ui/src/views/acs/device/driver/standard_inspect_site.vue b/acs/nladmin-ui/src/views/acs/device/driver/standard_inspect_site.vue index efcaa09..d375b74 100644 --- a/acs/nladmin-ui/src/views/acs/device/driver/standard_inspect_site.vue +++ b/acs/nladmin-ui/src/views/acs/device/driver/standard_inspect_site.vue @@ -359,14 +359,17 @@ export default { return } for (const val in this.data1) { + if (this.data1[val].code.indexOf('heartbeat') !== -1) { + this.data1[val].db = beforeStr + '.B0' + } if (this.data1[val].code.indexOf('move') !== -1) { - this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 1) + this.data1[val].db = beforeStr + '.B2' } if (this.data1[val].code.indexOf('error') !== -1) { - this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 5) + this.data1[val].db = beforeStr + '.B3' } if (this.data1[val].code.indexOf('task') !== -1) { - this.data1[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 7) + this.data1[val].db = beforeStr + '.D4' } } } @@ -387,10 +390,10 @@ export default { } for (const val in this.data2) { if (this.data2[val].code.indexOf('to_target') !== -1) { - this.data2[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 2) + this.data2[val].db = beforeStr + '.W2' } if (this.data2[val].code.indexOf('to_task') !== -1) { - this.data2[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 6) + this.data2[val].db = beforeStr + '.D4' } } }