汪菘 2 years ago
parent
commit
a43def8062
  1. 2
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/maGang/MaGangConveyorDeviceDriver.java
  2. 8
      acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/QueryXZAgvDeviceStatus.java

2
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/maGang/MaGangConveyorDeviceDriver.java

@ -294,7 +294,7 @@ public class MaGangConveyorDeviceDriver extends AbstractOpcDeviceDriver implemen
String opcservcerid = this.getDevice().getOpc_server_id();
Server server = ReadUtil.getServer(opcservcerid);
Map<String, Object> itemMap = new HashMap<String, Object>();
itemMap.put(param, value);
itemMap.put(param, Integer.parseInt(value));
ReadUtil.write(itemMap, server);
log.info("设备号{},kep点位名称{},下发信号{}", this.getDevice().getDevice_code(), param, value);
}

8
acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/QueryXZAgvDeviceStatus.java

@ -102,10 +102,10 @@ public class QueryXZAgvDeviceStatus {
String kepStatus = String.valueOf(maGangAgvDeviceDriver.getStatus());
String kepType = String.valueOf(maGangAgvDeviceDriver.getType());
if (!StrUtil.equals(kepStatus, status)) {
maGangAgvDeviceDriver.writing("status", status);
maGangAgvDeviceDriver.writing("status", Integer.parseInt(status));
}
if (!StrUtil.equals(kepType, task_type)) {
maGangAgvDeviceDriver.writing("type", task_type);
maGangAgvDeviceDriver.writing("type", Integer.parseInt(task_type));
}
maGangAgvDeviceDriver.writing("x_coordinate", hisFormat.format(x));
maGangAgvDeviceDriver.writing("y_coordinate", hisFormat.format(y));
@ -135,7 +135,7 @@ public class QueryXZAgvDeviceStatus {
MaGangLedDeviceDriver maGangLedDeviceDriver;
if (device.getDeviceDriver() instanceof MaGangLedDeviceDriver) {
maGangLedDeviceDriver = (MaGangLedDeviceDriver) device.getDeviceDriver();
maGangLedDeviceDriver.writing("D01", "1");
maGangLedDeviceDriver.writing("D01", 1);
}
} else {
String name = jsonObject.getString("name");
@ -146,7 +146,7 @@ public class QueryXZAgvDeviceStatus {
MaGangLedDeviceDriver maGangLedDeviceDriver;
if (device.getDeviceDriver() instanceof MaGangLedDeviceDriver) {
maGangLedDeviceDriver = (MaGangLedDeviceDriver) device.getDeviceDriver();
maGangLedDeviceDriver.writing("D01", "0");
maGangLedDeviceDriver.writing("D01", 0);
}
}
}

Loading…
Cancel
Save