|
|
@ -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,6 +147,21 @@ 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); |
|
|
@ -152,6 +197,68 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri |
|
|
|
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) { |
|
|
|
return; |
|
|
|
} |
|
|
@ -207,7 +314,6 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
last_mode = mode; |
|
|
|
last_status = status; |
|
|
@ -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; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|