add:刻字机不合格数量
This commit is contained in:
@@ -117,6 +117,8 @@ public class HailiangEngravingMachineDeviceDriver extends AbstractOpcDeviceDrive
|
||||
int await_time = 0;
|
||||
//工单号
|
||||
int order = 0;
|
||||
//不合格数量
|
||||
int unqualified_qty = 0;
|
||||
|
||||
int last_status = 0;
|
||||
int last_is_open = 0;
|
||||
@@ -140,6 +142,7 @@ public class HailiangEngravingMachineDeviceDriver extends AbstractOpcDeviceDrive
|
||||
int last_device_running_time = 0;
|
||||
int last_await_time = 0;
|
||||
int last_order = 0;
|
||||
int last_unqualified_qty = 0;
|
||||
|
||||
//设备在线状态
|
||||
Boolean isonline = true;
|
||||
@@ -212,6 +215,7 @@ public class HailiangEngravingMachineDeviceDriver extends AbstractOpcDeviceDrive
|
||||
await_time = this.itemProtocol.getItem_await_time(); //待机时间(S)
|
||||
order = this.itemProtocol.getItem_order(); //工单号
|
||||
isonline = this.itemProtocol.getIsonline();
|
||||
unqualified_qty = this.itemProtocol.getItem_unqualified_qty();
|
||||
|
||||
if (mode != last_mode) {
|
||||
feedDeviceStatusFlag = false;
|
||||
@@ -229,6 +233,14 @@ public class HailiangEngravingMachineDeviceDriver extends AbstractOpcDeviceDrive
|
||||
if (is_running != last_is_running) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("is_running") + SignalEnum.getDescByCode("is_running") +":"+ last_is_running + "->" + is_running);
|
||||
}
|
||||
if (unqualified_qty != last_unqualified_qty) {
|
||||
if (order > 0 && this.itemProtocol.getIsonline()) {
|
||||
Map<String, Integer> feedNumMap = new HashMap<>();
|
||||
feedNumMap.put("nok_qty", unqualified_qty);
|
||||
MonitoringLargeScreenData.deviceNumData.put(this.getDevice().getDevice_code(), feedNumMap);
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("unqualified_qty") + SignalEnum.getDescByCode("unqualified_qty") + ":" + last_unqualified_qty + "->" + unqualified_qty);
|
||||
}
|
||||
if (empty_req != last_empty_req) {
|
||||
if (empty_req == 1) {
|
||||
requireSucess = false;
|
||||
@@ -542,6 +554,7 @@ public class HailiangEngravingMachineDeviceDriver extends AbstractOpcDeviceDrive
|
||||
last_await_time = await_time;
|
||||
last_order = order;
|
||||
last_isonline = isonline;
|
||||
last_unqualified_qty = unqualified_qty;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -35,6 +35,8 @@ public class ItemProtocol {
|
||||
public static String item_await_time = "await_time"; //待机时间(S)
|
||||
public static String item_order = "order"; //工单号
|
||||
|
||||
public static String item_unqualified_qty = "unqualified_qty";//不合格数量
|
||||
|
||||
//开机
|
||||
public static String item_to_open = "to_open";
|
||||
//AGV放空箱完成
|
||||
@@ -160,6 +162,11 @@ public class ItemProtocol {
|
||||
return this.getOpcIntegerValue(item_order);
|
||||
}
|
||||
|
||||
public int getItem_unqualified_qty() {
|
||||
return this.getOpcIntegerValue(item_unqualified_qty);
|
||||
}
|
||||
|
||||
|
||||
//是否有货
|
||||
public int hasGoods(int move) {
|
||||
return move;
|
||||
@@ -203,6 +210,7 @@ public class ItemProtocol {
|
||||
list.add(new ItemDto(item_open_ready_time, "开机准备时间", "DB1.D108"));
|
||||
list.add(new ItemDto(item_device_running_time, "设备运转时间", "DB1.D112"));
|
||||
list.add(new ItemDto(item_await_time, "待机时间", "DB1.D116"));
|
||||
list.add(new ItemDto(item_unqualified_qty, "不合格数量", "DB1.D120"));
|
||||
list.add(new ItemDto(item_order, "工单号", "DB1.D160"));
|
||||
return list;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user