Connect OPC UA client to server
connect( connects the OPC UA client
UaClient to its referenced server using anonymous user
the OPC UA Client
UaClient, UserName, Password)
UaClient to its server using username and password
must be provided, although the
Password field can be empty.
connects the OPC UA Client
UaClient to its server using the User
Certificate stored in the public and private key files referenced by
PrivateKeyPassword is the password used to protect the Private Key
File. Private Key Files for OPC must be password protected. The files must be in
When the client successfully connects to the server, the client object
Status property is set to
'Connected', the first
level of the server namespace is retrieved, and various essential properties of the client
are read from the server.
UaClient is a vector of clients, and some but not all clients can
connect, a warning is issued. If no clients can connect, an error is generated. You can only
connect a vector of clients using the same username and password, or the same certificate
parameters. If you need to use different usernames and passwords for different servers, call
connect on each of the clients individually.
Connect OPC UA Client to Server
Locate an OPC UA server and connect a client to it.
s = opcuaserverinfo('localhost'); UaClient = opcua(s(1)); connect(UaClient);
Check the connection status.
UaClient — OPC UA client
OPC UA client object
OPC UA client, specified as an OPC UA client object or array of objects.
Introduced in R2015b