psh 8 months ago
parent
commit
a713b80a61
  1. 7
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/standard_autodoor/StandardAutodoorDeviceDriver.java

7
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/standard_autodoor/StandardAutodoorDeviceDriver.java

@ -159,13 +159,12 @@ public class StandardAutodoorDeviceDriver extends AbstractOpcDeviceDriver implem
public void writing(String param,int command) { public void writing(String param,int command) {
String to_command = String.format("%s.%s.%s.%s", this.getDevice().getOpc_server_code(), this.getDevice().getOpc_plc_code(), this.getDevice().getDevice_code(), param); String to_command = String.format("%s.%s.%s.%s", this.getDevice().getOpc_server_code(), this.getDevice().getOpc_plc_code(), this.getDevice().getDevice_code(), param);
// String opcservcerid = this.getDevice().getOpc_server_id();
String opcservcerid = this.getDevice().getOpc_server_id(); // Server server = ReadUtil.getServer(opcservcerid);
Server server = ReadUtil.getServer(opcservcerid);
Map<String, Object> itemMap = new HashMap<String, Object>(); Map<String, Object> itemMap = new HashMap<String, Object>();
itemMap.put(to_command, command); itemMap.put(to_command, command);
ReadUtil.write(itemMap, server);
log.info("下发PLC信号:{},{}", to_command, command); log.info("下发PLC信号:{},{}", to_command, command);
this.control(itemMap);
System.out.println("设备:" + devicecode + ",下发PLC信号:" + to_command + ",value:" + command); System.out.println("设备:" + devicecode + ",下发PLC信号:" + to_command + ",value:" + command);
} }

Loading…
Cancel
Save