fix
This commit is contained in:
@@ -159,13 +159,12 @@ public class StandardAutodoorDeviceDriver extends AbstractOpcDeviceDriver implem
|
||||
|
||||
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 opcservcerid = this.getDevice().getOpc_server_id();
|
||||
Server server = ReadUtil.getServer(opcservcerid);
|
||||
// String opcservcerid = this.getDevice().getOpc_server_id();
|
||||
// Server server = ReadUtil.getServer(opcservcerid);
|
||||
Map<String, Object> itemMap = new HashMap<String, Object>();
|
||||
itemMap.put(to_command, command);
|
||||
ReadUtil.write(itemMap, server);
|
||||
log.info("下发PLC信号:{},{}", to_command, command);
|
||||
this.control(itemMap);
|
||||
System.out.println("设备:" + devicecode + ",下发PLC信号:" + to_command + ",value:" + command);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user