|
|
@ -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) { |
|
|
|