Construct OPC UA client object
UaClient = opcua(ServerInfoObj)
UaClient = opcua(ServerUrl)
UaClient = opcua(Hostname,Portnum)
UaClient = opcua(ServerInfoObj) constructs
an OPC UA client associated with the server referenced by
ServerInfoObj. You can create server objects with the
UaClient = opcua(ServerUrl) constructs a client associated
with the server referenced by the URL provided in
server URL must use the
opc.tcp protocol; OPC
Toolbox™ does not support http or https connections.
UaClient = opcua(Hostname,Portnum) constructs an OPC UA
client object associated with the server at port
Portnum on the
machine identified by
be an IP address, or host name (short or fully qualified) specified as a character
vector or string. The client attempts to retrieve available endpoints, but does not
error if the endpoints cannot be retrieved.
Some OPC UA servers require security for any connection to that server. OPC Toolbox supports only anonymous, unsecured connections to servers.
Create a client for the first server found on the local host.
S = opcuaserverinfo('localhost'); UaClient = opcua(S(1));
Create a client for the server at port 51210 on the local host.
UaClient = opcua('localhost',51210)
UaClient = OPC UA Client UA Sample Server: Hostname: localhost Port: 51210 Timeout: 10 Status: Disconnected