数字孪生驱动优化

This commit is contained in:
psh
2024-07-11 17:38:43 +08:00
parent 7141533201
commit a52c265783
4 changed files with 12 additions and 8 deletions

View File

@@ -136,6 +136,9 @@ public class GuhuashiSiteDeviceDriver extends AbstractOpcDeviceDriver implements
VW7016 = this.itemProtocol.getVW7016(); VW7016 = this.itemProtocol.getVW7016();
VW7018 = this.itemProtocol.getVW7018(); VW7018 = this.itemProtocol.getVW7018();
VW7020 = this.itemProtocol.getVW7020(); VW7020 = this.itemProtocol.getVW7020();
if("GHS01".equals(devicecode)){
log.info("123");
}
VW7022 = this.itemProtocol.getVW7022(); VW7022 = this.itemProtocol.getVW7022();
VW7024 = this.itemProtocol.getVW7024(); VW7024 = this.itemProtocol.getVW7024();
VW7026 = this.itemProtocol.getVW7026(); VW7026 = this.itemProtocol.getVW7026();

View File

@@ -46,13 +46,13 @@ public class ItemProtocol {
//写入信号 //写入信号
public static String item_VW70040 = "VW70040"; public static String item_VW70040 = "VW70040";
public static String item_VW70041 = "VW70041"; public static String item_VW70041 = "VW70041";
public static String item_VW70042 = "VW70042"; // public static String item_VW70042 = "VW70042";
public static String item_VW70043 = "VW70043"; public static String item_VW70043 = "VW70043";
public static String item_VW70044 = "VW70044"; public static String item_VW70044 = "VW70044";
public static String item_VW70045 = "VW70045"; public static String item_VW70045 = "VW70045";
public static String item_VW70050 = "VW70050"; public static String item_VW70050 = "VW70050";
public static String item_VW70051 = "VW70051"; public static String item_VW70051 = "VW70051";
public static String item_VW70052 = "VW70052"; // public static String item_VW70052 = "VW70052";
public static String item_VW70053 = "VW70053"; public static String item_VW70053 = "VW70053";
public static String item_VW70054 = "VW70054"; public static String item_VW70054 = "VW70054";
@@ -248,13 +248,13 @@ public class ItemProtocol {
ArrayList list = new ArrayList(); ArrayList list = new ArrayList();
list.add(new ItemDto(item_VW70040, "RGV小车开前门请求信号", "VW7004.0")); list.add(new ItemDto(item_VW70040, "RGV小车开前门请求信号", "VW7004.0"));
list.add(new ItemDto(item_VW70041, "RGV小车在进板中", "VW7004.1")); list.add(new ItemDto(item_VW70041, "RGV小车在进板中", "VW7004.1"));
list.add(new ItemDto(item_VW70042, "", "VW7004.2")); // list.add(new ItemDto(item_VW70042, "", "VW7004.2"));
list.add(new ItemDto(item_VW70043, "极板已进满信号", "VW7004.3")); list.add(new ItemDto(item_VW70043, "极板已进满信号", "VW7004.3"));
list.add(new ItemDto(item_VW70044, "RCV小车关前门请求信号", "VW7004.4")); list.add(new ItemDto(item_VW70044, "RCV小车关前门请求信号", "VW7004.4"));
list.add(new ItemDto(item_VW70045, "RGV在下班时未进满信号", "VW7004.5")); list.add(new ItemDto(item_VW70045, "RGV在下班时未进满信号", "VW7004.5"));
list.add(new ItemDto(item_VW70050, "RGV小车开后门请求信号", "VW7005.0")); list.add(new ItemDto(item_VW70050, "RGV小车开后门请求信号", "VW7005.0"));
list.add(new ItemDto(item_VW70051, "RGV小车在出板中", "VW7005.1")); list.add(new ItemDto(item_VW70051, "RGV小车在出板中", "VW7005.1"));
list.add(new ItemDto(item_VW70052, "", "VW7005.2")); // list.add(new ItemDto(item_VW70052, "", "VW7005.2"));
list.add(new ItemDto(item_VW70053, "极板已出完信号", "VW7005.3")); list.add(new ItemDto(item_VW70053, "极板已出完信号", "VW7005.3"));
list.add(new ItemDto(item_VW70054, "RCV小车关后门请求信号", "VW7005.4")); list.add(new ItemDto(item_VW70054, "RCV小车关后门请求信号", "VW7005.4"));
return list; return list;

View File

@@ -413,13 +413,13 @@ public class SiteDeviceDriver extends AbstractOpcDeviceDriver implements DeviceD
} }
String result=acsToWmsService.applyTaskToWms(jsonObject); String result=acsToWmsService.applyTaskToWms(jsonObject);
JSONObject res_jo = JSONObject.parseObject(result); JSONObject res_jo = JSONObject.parseObject(result);
if (StrUtil.equals(res_jo.getString("code"), "200")) { // if (StrUtil.equals(res_jo.getString("code"), "200")) {
this.writing(type); this.writing(type);
this.setRequireSucess(true); this.setRequireSucess(true);
log.info("acs申请任务", this.device_code, "任务申请成功!"); log.info("acs申请任务", this.device_code, "任务申请成功!");
}else{ // }else{
this.writing(99); // this.writing(99);
} // }
return true; return true;
} }
} }

View File

@@ -81,6 +81,7 @@ public class SyncDeviceStatus {
} else if (device.getDeviceDriver() instanceof GuhuashiSiteDeviceDriver) { } else if (device.getDeviceDriver() instanceof GuhuashiSiteDeviceDriver) {
GuhuashiSiteDeviceDriver guhuashiSiteDeviceDriver=(GuhuashiSiteDeviceDriver)device.getDeviceDriver(); GuhuashiSiteDeviceDriver guhuashiSiteDeviceDriver=(GuhuashiSiteDeviceDriver)device.getDeviceDriver();
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.put("device_code", guhuashiSiteDeviceDriver.getDeviceCode());
json.put("temperature_setting", guhuashiSiteDeviceDriver.getVW7010()); json.put("temperature_setting", guhuashiSiteDeviceDriver.getVW7010());
json.put("temperature", guhuashiSiteDeviceDriver.getVW7012()); json.put("temperature", guhuashiSiteDeviceDriver.getVW7012());
json.put("humidity_setting", guhuashiSiteDeviceDriver.getVW7014()); json.put("humidity_setting", guhuashiSiteDeviceDriver.getVW7014());