diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/ItemProtocol.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/ItemProtocol.java index fd44b07..b65c09f 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/ItemProtocol.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/ItemProtocol.java @@ -27,6 +27,29 @@ public class ItemProtocol { public static String item_to_feedback = "to_feedback"; + public static String item_get_station = "get_station"; + public static String item_put_station = "put_station"; + public static String item_is_qualified = "is_qualified"; + public static String item_laser_marking_code = "laser_marking_code"; + public static String item_grinding_number = "grinding_number"; + public static String item_height1 = "height1"; + public static String item_height2 = "height2"; + public static String item_height3 = "height3"; + public static String item_height4 = "height4"; + public static String item_width1 = "width1"; + public static String item_width2 = "width2"; + public static String item_len = "len"; + public static String item_volume = "volume"; + public static String item_flatness = "flatness"; + public static String item_unqualified_qty = "unqualified_qty"; + + public static String item_to_command = "to_command"; + public static String item_to_error = "to_error"; + public static String item_to_order_No = "to_order_No"; + public static String item_to_weight = "to_weight"; + public static String item_to_material_code = "to_material_code"; + + private LnshPalletizingManipulatorDeviceDriver driver; @@ -57,6 +80,7 @@ public class ItemProtocol { public String getOpen_time() { return this.getOpcStringValue(item_open_time); } + public int getStandby_time() { return this.getOpcIntegerValue(item_standby_time); } @@ -73,6 +97,66 @@ public class ItemProtocol { return this.getOpcIntegerValue(item_to_feedback); } + public int getGet_station() { + return this.getOpcIntegerValue(item_get_station); + } + + public int getPut_station() { + return this.getOpcIntegerValue(item_put_station); + } + + public int getIs_qualified() { + return this.getOpcIntegerValue(item_is_qualified); + } + + public String getLaser_marking_code() { + return this.getOpcStringValue(item_laser_marking_code); + } + + public String getGrinding_number() { + return this.getOpcStringValue(item_grinding_number); + } + + public String getHeight1() { + return this.getOpcStringValue(item_height1); + } + + public String getHeight2() { + return this.getOpcStringValue(item_height2); + } + + public String getHeight3() { + return this.getOpcStringValue(item_height3); + } + + public String getHeight4() { + return this.getOpcStringValue(item_height4); + } + + public String getWidth1() { + return this.getOpcStringValue(item_width1); + } + + public String getWidth2() { + return this.getOpcStringValue(item_width2); + } + + public String getLen() { + return this.getOpcStringValue(item_len); + } + + public String getVolume() { + return this.getOpcStringValue(item_volume); + } + + public String getFlatness() { + return this.getOpcStringValue(item_flatness); + } + + public String getUnqualified_qty() { + return this.getOpcStringValue(item_unqualified_qty); + } + Boolean isonline; public int getOpcIntegerValue(String protocol) { @@ -109,11 +193,32 @@ public class ItemProtocol { list.add(new ItemDto(item_standby_time, "待机时间", "DB1.D58")); list.add(new ItemDto(item_production_time, "生产时间", "DB1.D62")); list.add(new ItemDto(item_error_time, "故障时间", "DB1.D66")); + list.add(new ItemDto(item_get_station, "当前抓取工位", "DB1.D70")); + list.add(new ItemDto(item_put_station, "当前放置工位", "DB1.D71")); + list.add(new ItemDto(item_is_qualified, "是否合格", "DB1.D72")); + list.add(new ItemDto(item_laser_marking_code, "激光标刻码", "DB1.D74")); + list.add(new ItemDto(item_grinding_number, "碾次", "DB1.D126")); + list.add(new ItemDto(item_height1, "高度1", "DB1.D178")); + list.add(new ItemDto(item_height2, "高度2", "DB1.D182")); + list.add(new ItemDto(item_height3, "高度3", "DB1.D186")); + list.add(new ItemDto(item_height4, "高度4", "DB1.D190")); + list.add(new ItemDto(item_width1, "宽度1", "DB1.D194")); + list.add(new ItemDto(item_width2, "宽度2", "DB1.D198")); + list.add(new ItemDto(item_len, "长度", "DB1.D202")); + list.add(new ItemDto(item_volume, "体积", "DB1.D206")); + list.add(new ItemDto(item_flatness, "平面度", "DB1.D210")); + list.add(new ItemDto(item_unqualified_qty, "缺陷个数", "DB1.D214")); + return list; } public static List getWriteableItemDtos() { ArrayList list = new ArrayList(); + list.add(new ItemDto(item_to_command, "反馈", "DB7.W0", Boolean.TRUE)); + list.add(new ItemDto(item_to_error, "error", "DB7.W2")); + list.add(new ItemDto(item_to_order_No, "工单号", "DB7.STRING4.50")); + list.add(new ItemDto(item_to_weight, "生产重量", "DB7.D56")); + list.add(new ItemDto(item_to_material_code, "下发物料编号", "DB7.STRING60.50")); return list; } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/LnshPalletizingManipulatorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/LnshPalletizingManipulatorDeviceDriver.java index 5ea24a8..1b751be 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/LnshPalletizingManipulatorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/LnshPalletizingManipulatorDeviceDriver.java @@ -78,7 +78,6 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri float b = 0f; - //暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域 int flag; @@ -98,6 +97,37 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri int error_time = 0; int last_error_time = 0; + int get_station = 0; + int last_get_station = 0; + int put_station = 0; + int last_put_station = 0; + int is_qualified = 0; + int last_is_qualified = 0; + String laser_marking_code = ""; + String last_laser_marking_code = ""; + String grinding_number = ""; + String last_grinding_number = ""; + String height1 = ""; + String last_height1 = ""; + String height2 = ""; + String last_height2 = ""; + String height3 = ""; + String last_height3 = ""; + String height4 = ""; + String last_height4 = ""; + String width1 = ""; + String last_width1 = ""; + String width2 = ""; + String last_width2 = ""; + String len = ""; + String last_len = ""; + String volume = ""; + String last_volume = ""; + String flatness = ""; + String last_flatness = ""; + String unqualified_qty = ""; + String last_unqualified_qty = ""; + @Override public Device getDevice() { return this.device; @@ -117,39 +147,116 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri standby_time = this.itemProtocol.getStandby_time(); production_time = this.itemProtocol.getProduction_time(); error_time = this.itemProtocol.getError_time(); - + get_station = this.itemProtocol.getGet_station(); + put_station = this.itemProtocol.getPut_station(); + is_qualified = this.itemProtocol.getIs_qualified(); + laser_marking_code = this.itemProtocol.getLaser_marking_code(); + grinding_number = this.itemProtocol.getGrinding_number(); + height1 = this.itemProtocol.getHeight1(); + height2 = this.itemProtocol.getHeight2(); + height3 = this.itemProtocol.getHeight3(); + height4 = this.itemProtocol.getHeight4(); + width1 = this.itemProtocol.getWidth1(); + width2 = this.itemProtocol.getWidth2(); + len = this.itemProtocol.getLen(); + volume = this.itemProtocol.getVolume(); + flatness = this.itemProtocol.getFlatness(); + unqualified_qty = this.itemProtocol.getUnqualified_qty(); + if (mode != last_mode) { this.setRequireSucess(false); - logServer.deviceItemValue(this.device_code,"mode" ,String.valueOf(mode)); - logServer.deviceExecuteLog(this.device_code,"","","信号mode:" + last_mode + " -> " + mode); + logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + " -> " + mode); } if (status != last_status) { - logServer.deviceItemValue(this.device_code,"status" ,String.valueOf(status)); - logServer.deviceExecuteLog(this.device_code,"","","信号status:" + last_status + " -> " + status); + logServer.deviceItemValue(this.device_code, "status", String.valueOf(status)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号status:" + last_status + " -> " + status); } if (action != last_action) { - logServer.deviceItemValue(this.device_code,"action" ,String.valueOf(action)); - logServer.deviceExecuteLog(this.device_code,"","","信号action:" + last_action + " -> " + action); + logServer.deviceItemValue(this.device_code, "action", String.valueOf(action)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号action:" + last_action + " -> " + action); } if (error != last_error) { - logServer.deviceItemValue(this.device_code,"error" ,String.valueOf(error)); - logServer.deviceExecuteLog(this.device_code,"","","信号error:" + last_error + " -> " + error); + logServer.deviceItemValue(this.device_code, "error", String.valueOf(error)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号error:" + last_error + " -> " + error); } if (!open_time.equals(last_open_time)) { - logServer.deviceItemValue(this.device_code,"open_time" ,String.valueOf(open_time)); - logServer.deviceExecuteLog(this.device_code,"","","信号open_time:" + last_open_time + " -> " + open_time); + logServer.deviceItemValue(this.device_code, "open_time", String.valueOf(open_time)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号open_time:" + last_open_time + " -> " + open_time); } if (standby_time != last_standby_time) { - logServer.deviceItemValue(this.device_code,"standby_time" ,String.valueOf(standby_time)); - logServer.deviceExecuteLog(this.device_code,"","","信号standby_time:" + last_standby_time + " -> " + standby_time); + logServer.deviceItemValue(this.device_code, "standby_time", String.valueOf(standby_time)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号standby_time:" + last_standby_time + " -> " + standby_time); } if (production_time != last_production_time) { - logServer.deviceItemValue(this.device_code,"production_time" ,String.valueOf(production_time)); - logServer.deviceExecuteLog(this.device_code,"","","信号production_time:" + last_production_time + " -> " + production_time); + logServer.deviceItemValue(this.device_code, "production_time", String.valueOf(production_time)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号production_time:" + last_production_time + " -> " + production_time); } if (error_time != last_error_time) { - logServer.deviceItemValue(this.device_code,"error_time" ,String.valueOf(error_time)); - logServer.deviceExecuteLog(this.device_code,"","","信号error_time:" + last_error_time + " -> " + error_time); + logServer.deviceItemValue(this.device_code, "error_time", String.valueOf(error_time)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号error_time:" + last_error_time + " -> " + error_time); + } + + if (get_station != last_get_station) { + this.setRequireSucess(false); + logServer.deviceItemValue(this.device_code, "get_station", String.valueOf(get_station)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号get_station:" + last_get_station + " -> " + get_station); + } + if (put_station != last_put_station) { + logServer.deviceItemValue(this.device_code, "put_station", String.valueOf(put_station)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号put_station:" + last_put_station + " -> " + put_station); + } + if (is_qualified != last_is_qualified) { + logServer.deviceItemValue(this.device_code, "is_qualified", String.valueOf(is_qualified)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号is_qualified:" + last_is_qualified + " -> " + is_qualified); + } + if (!laser_marking_code.equals(last_laser_marking_code)) { + logServer.deviceItemValue(this.device_code, "laser_marking_code", String.valueOf(laser_marking_code)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号laser_marking_code:" + last_laser_marking_code + " -> " + laser_marking_code); + } + if (!grinding_number.equals(last_grinding_number)) { + logServer.deviceItemValue(this.device_code, "grinding_number", String.valueOf(grinding_number)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号grinding_number:" + last_grinding_number + " -> " + grinding_number); + } + if (!height1.equals(last_height1)) { + logServer.deviceItemValue(this.device_code, "height1", String.valueOf(height1)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号height1:" + last_height1 + " -> " + height1); + } + if (!height2.equals(last_height2)) { + logServer.deviceItemValue(this.device_code, "height2", String.valueOf(height2)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号height2:" + last_height2 + " -> " + height2); + } + if (!height3.equals(last_height3)) { + logServer.deviceItemValue(this.device_code, "height3", String.valueOf(height3)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号height3:" + last_height3 + " -> " + height3); + } + if (!height4.equals(last_height4)) { + logServer.deviceItemValue(this.device_code, "height4", String.valueOf(height4)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号height4:" + last_height4 + " -> " + height4); + } + if (!width1.equals(last_width1)) { + logServer.deviceItemValue(this.device_code, "width1", String.valueOf(width1)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号width1:" + last_width1 + " -> " + width1); + } + if (!width2.equals(last_width2)) { + logServer.deviceItemValue(this.device_code, "width2", String.valueOf(width2)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号width2:" + last_width2 + " -> " + width2); + } + if (!len.equals(last_len)) { + logServer.deviceItemValue(this.device_code, "len", String.valueOf(len)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号len:" + last_len + " -> " + len); + } + if (!volume.equals(last_volume)) { + logServer.deviceItemValue(this.device_code, "volume", String.valueOf(volume)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号volume:" + last_volume + " -> " + volume); + } + if (!flatness.equals(last_flatness)) { + logServer.deviceItemValue(this.device_code, "flatness", String.valueOf(flatness)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号flatness:" + last_flatness + " -> " + flatness); + } + if (!unqualified_qty.equals(last_unqualified_qty)) { + logServer.deviceItemValue(this.device_code, "unqualified_qty", String.valueOf(unqualified_qty)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号unqualified_qty:" + last_unqualified_qty + " -> " + unqualified_qty); } } catch (Exception var17) { @@ -206,7 +313,6 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri // break; } - } last_mode = mode; @@ -217,6 +323,21 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri last_standby_time = standby_time; last_production_time = production_time; last_error_time = error_time; + last_get_station = get_station; + last_put_station = put_station; + last_is_qualified = is_qualified; + last_laser_marking_code = laser_marking_code; + last_grinding_number = grinding_number; + last_height1 = height1; + last_height2 = height2; + last_height3 = height3; + last_height4 = height4; + last_width1 = width1; + last_width2 = width2; + last_len = len; + last_volume = volume; + last_flatness = flatness; + last_unqualified_qty = unqualified_qty; } @@ -233,134 +354,134 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri } else { this.instruction_require_time = date; JSONObject json = new JSONObject(); - json.put("device_code",this.device_code); + json.put("device_code", this.device_code); JSONObject jo = new JSONObject(); 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_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; + 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_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; @@ -380,8 +501,8 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri } else { this.instruction_require_time = date; JSONObject json = new JSONObject(); - json.put("device_code",device_code); - json.put("is_full","1"); + json.put("device_code", device_code); + json.put("is_full", "1"); HttpResponse result = acsToWmsService.applyTaskManipulatorToWms(json); if (ObjectUtil.isNotEmpty(result)) { @@ -407,8 +528,8 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri } else { this.instruction_require_time = date; JSONObject json = new JSONObject(); - json.put("device_code",device_code); - json.put("is_full","0"); + json.put("device_code", device_code); + json.put("is_full", "0"); HttpResponse result = acsToWmsService.applyTaskManipulatorToWms(json); if (ObjectUtil.isNotEmpty(result)) { @@ -434,8 +555,8 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri } else { this.instruction_require_time = date; JSONObject json = new JSONObject(); - json.put("device_code",device_code); - json.put("type","4"); + json.put("device_code", device_code); + json.put("type", "4"); HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json); if (ObjectUtil.isNotEmpty(result)) { if (result.getStatus() == 200) { diff --git a/acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_palletizing_manipulator.vue b/acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_palletizing_manipulator.vue index eb1f1d7..052ca19 100644 --- a/acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_palletizing_manipulator.vue +++ b/acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_palletizing_manipulator.vue @@ -136,6 +136,42 @@ + + + + + + + + + + + + + + + + @@ -464,7 +500,7 @@ export default { parentForm.is_route = true parentForm.plc_id = this.plc_id parentForm.opc_id = this.opc_id - updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => { + updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => { this.notify('保存成功', 'success') this.configLoading = false }).catch(err => {