|
|
@ -10,7 +10,6 @@ import java.util.List; |
|
|
|
public class ItemProtocol { |
|
|
|
public static String item_heartbeat = "heartbeat"; |
|
|
|
public static String item_mode = "mode"; |
|
|
|
public static String item_action = "action"; |
|
|
|
public static String item_error = "error"; |
|
|
|
public static String item_order = "order"; |
|
|
|
public static String item_order_detail = "order_detail"; |
|
|
@ -64,6 +63,7 @@ public class ItemProtocol { |
|
|
|
this.driver = driver; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public int getHeartbeat() { |
|
|
|
return this.getOpcIntegerValue(item_heartbeat); |
|
|
|
} |
|
|
@ -72,19 +72,78 @@ public class ItemProtocol { |
|
|
|
return this.getOpcIntegerValue(item_mode); |
|
|
|
} |
|
|
|
|
|
|
|
public int getAction() { |
|
|
|
return this.getOpcIntegerValue(item_action); |
|
|
|
} |
|
|
|
|
|
|
|
public int getError() { |
|
|
|
return this.getOpcIntegerValue(item_error); |
|
|
|
} |
|
|
|
|
|
|
|
public int getOrder() { |
|
|
|
return this.getOpcIntegerValue(item_order); |
|
|
|
} |
|
|
|
|
|
|
|
public int getOrder_detail() { |
|
|
|
return this.getOpcIntegerValue(item_order_detail); |
|
|
|
} |
|
|
|
|
|
|
|
public int getLast_order_detail() { |
|
|
|
return this.getOpcIntegerValue(item_last_order_detail); |
|
|
|
} |
|
|
|
|
|
|
|
public int getOrder_feeding_qty() { |
|
|
|
return this.getOpcIntegerValue(item_order_feeding_qty); |
|
|
|
} |
|
|
|
|
|
|
|
public int getDetail_feeding_qty() { |
|
|
|
return this.getOpcIntegerValue(item_detail_feeding_qty); |
|
|
|
} |
|
|
|
|
|
|
|
public int getDetail_lettering_qty() { |
|
|
|
return this.getOpcIntegerValue(item_detail_lettering_qty); |
|
|
|
} |
|
|
|
|
|
|
|
public int getDetail_lettering_qualified_qty() { |
|
|
|
return this.getOpcIntegerValue(item_detail_lettering_qualified_qty); |
|
|
|
} |
|
|
|
|
|
|
|
public int getDetail_risking_qualified_qty() { |
|
|
|
return this.getOpcIntegerValue(item_detail_risking_qualified_qty); |
|
|
|
} |
|
|
|
|
|
|
|
public int getDetail_risking_qty() { |
|
|
|
return this.getOpcIntegerValue(item_detail_risking_qty); |
|
|
|
} |
|
|
|
|
|
|
|
public int getDetail_strapping_qty() { |
|
|
|
return this.getOpcIntegerValue(item_detail_strapping_qty); |
|
|
|
} |
|
|
|
|
|
|
|
public int getDetail_strapping_oneqty() { |
|
|
|
return this.getOpcIntegerValue(item_detail_strapping_oneqty); |
|
|
|
} |
|
|
|
|
|
|
|
public int getDetail_coating_qty() { |
|
|
|
return this.getOpcIntegerValue(item_detail_coating_qty); |
|
|
|
} |
|
|
|
|
|
|
|
public int getLabeling_order() { |
|
|
|
return this.getOpcIntegerValue(item_labeling_order); |
|
|
|
} |
|
|
|
|
|
|
|
public int getDetail_rlabeling_qualified_qty() { |
|
|
|
return this.getOpcIntegerValue(item_detail_rlabeling_qualified_qty); |
|
|
|
} |
|
|
|
|
|
|
|
public int getDetail_rlabeling_qty() { |
|
|
|
return this.getOpcIntegerValue(item_detail_rlabeling_qty); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public int getToCommand() { |
|
|
|
return this.getOpcIntegerValue(item_to_command); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Boolean isonline; |
|
|
|
|
|
|
|
public int getOpcIntegerValue(String protocol) { |
|
|
|
Integer value = this.driver.getIntegeregerValue(protocol); |
|
|
|
if (value == null) { |
|
|
@ -122,22 +181,22 @@ public class ItemProtocol { |
|
|
|
|
|
|
|
public static List<ItemDto> getWriteableItemDtos() { |
|
|
|
ArrayList list = new ArrayList(); |
|
|
|
list.add(new ItemDto(item_to_order, "工单号", "DB600.D2")); |
|
|
|
list.add(new ItemDto(item_to_order_detail, "工单明细号", "DB600.D6")); |
|
|
|
list.add(new ItemDto(item_to_order_feeding_qty, "工单上料总数量", "DB600.D10")); |
|
|
|
list.add(new ItemDto(item_to_detail_feeding_qty, "工单明细号上料数量", "DB600.D14")); |
|
|
|
list.add(new ItemDto(item_to_outer_diameter, "外径", "DB600.REAL18")); |
|
|
|
list.add(new ItemDto(item_to_wall_thickness, "壁厚", "DB600.REAL22")); |
|
|
|
list.add(new ItemDto(item_to_length, "长度", "DB600.REAL26")); |
|
|
|
list.add(new ItemDto(item_to_is_last, "是否最后工单明细号", "DB600.D30")); |
|
|
|
list.add(new ItemDto(item_to_strapping_qty, "总捆扎包数", "DB600.D34")); |
|
|
|
list.add(new ItemDto(item_to_one_strapping_qty, "标准每捆数量", "DB600.D38")); |
|
|
|
list.add(new ItemDto(item_to_lastone_strapping_qty, "捆扎尾料数量", "DB600.D42")); |
|
|
|
list.add(new ItemDto(item_to_coating_qty, "需要裹膜捆数", "DB600.D42")); |
|
|
|
list.add(new ItemDto(item_to_labeling_qty, "需要贴标数量", "DB600.D46")); |
|
|
|
list.add(new ItemDto(item_to_stop, "急停", "DB600.D50")); |
|
|
|
list.add(new ItemDto(item_to_force_complete, "工单强制完成", "DB600.D54")); |
|
|
|
list.add(new ItemDto(item_to_command, "作业命令", "DB52.D62", Boolean.valueOf(true))); |
|
|
|
list.add(new ItemDto(item_to_order, "工单号", "DB601.D2")); |
|
|
|
list.add(new ItemDto(item_to_order_detail, "工单明细号", "DB601.D6")); |
|
|
|
list.add(new ItemDto(item_to_order_feeding_qty, "工单上料总数量", "DB601.D10")); |
|
|
|
list.add(new ItemDto(item_to_detail_feeding_qty, "工单明细号上料数量", "DB601.D14")); |
|
|
|
list.add(new ItemDto(item_to_outer_diameter, "外径", "DB601.REAL18")); |
|
|
|
list.add(new ItemDto(item_to_wall_thickness, "壁厚", "DB601.REAL22")); |
|
|
|
list.add(new ItemDto(item_to_length, "长度", "DB601.REAL26")); |
|
|
|
list.add(new ItemDto(item_to_is_last, "是否最后工单明细号", "DB601.D30")); |
|
|
|
list.add(new ItemDto(item_to_strapping_qty, "总捆扎包数", "DB601.D34")); |
|
|
|
list.add(new ItemDto(item_to_one_strapping_qty, "标准每捆数量", "DB601.D38")); |
|
|
|
list.add(new ItemDto(item_to_lastone_strapping_qty, "捆扎尾料数量", "DB601.D42")); |
|
|
|
list.add(new ItemDto(item_to_coating_qty, "需要裹膜捆数", "DB601.D42")); |
|
|
|
list.add(new ItemDto(item_to_labeling_qty, "需要贴标数量", "DB601.D46")); |
|
|
|
list.add(new ItemDto(item_to_stop, "急停", "DB601.D50")); |
|
|
|
list.add(new ItemDto(item_to_force_complete, "工单强制完成", "DB601.D54")); |
|
|
|
list.add(new ItemDto(item_to_command, "作业命令", "DB601.D62", Boolean.valueOf(true))); |
|
|
|
return list; |
|
|
|
} |
|
|
|
|
|
|
|