Browse Source

码垛机械手字段调整

master
pangshenghao 1 year ago
parent
commit
3a437675dd
  1. 105
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/ItemProtocol.java
  2. 125
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/LnshPalletizingManipulatorDeviceDriver.java
  3. 36
      acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_palletizing_manipulator.vue

105
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<ItemDto> 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;
}

125
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,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;
}

36
acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_palletizing_manipulator.vue

@ -136,6 +136,42 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="取货设备" prop="device_code">
<el-select
v-model="form.link_get_station"
filterable
multiple
placeholder="请选择"
>
<el-option
v-for="item in deviceList"
:key="item.device_code"
:label="item.device_name"
:value="item.device_code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="放货设备" prop="device_code">
<el-select
v-model="form.link_put_station"
filterable
multiple
placeholder="请选择"
>
<el-option
v-for="item in deviceList"
:key="item.device_code"
:label="item.device_name"
:value="item.device_code"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>

Loading…
Cancel
Save