Connect VI
- Updated2023-02-21
- 4 minute(s) read
Connect VI
Owning Palette: OPC UA Client VIs
Requires: OPC UA Toolkit
Creates a connection to an OPC UA server.
![]() |
trust any server specifies whether the OPC UA client trusts any OPC UA server without adding the server certificate to trusted server certificates. The default is FALSE, which specifies that the OPC UA client trusts only OPC UA servers that have server certificates in trusted server certificates. | ||||||||||||||
![]() |
username/password specifies the username and password to authenticate when you create a connection to an OPC UA server. You must specify username/password if the OPC UA server requires authentication.
| ||||||||||||||
![]() |
server endpoint URL specifies the hostname and the port of the OPC UA server. The format of server endpoint URL is opc.tcp://hostname:port. The hostname is the IP address or computer name. | ||||||||||||||
![]() |
security policy specifies the message mode and the corresponding security policy.
| ||||||||||||||
![]() |
client certificate file specifies the path or name of the public key. The file extension of the file you specify must be .der. The public key and private key must have the same name and reside in the same folder. If you do not specify client certificate file, this VI generates and uses a new certificate file. By default, an OPC UA client trusts the certificate it is using.
You can specify a relative path or filename for client certificate file. If you specify a relative path, the path is relative to the caller VI or to the application directory. If you specify a filename, LabVIEW searches the certificate files only in the location where the caller VI resides or in the application directory. |
||||||||||||||
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | ||||||||||||||
![]() |
trusted server certificates specifies the paths or names of the public keys that the OPC UA client trusts. By default, OPC UA client applications trust the public key that the OPC UA client uses. You can specify a relative path or filename for trusted server certificates. If you specify a relative path, the path is relative to the caller VI or to the application directory. If you specify a filename, LabVIEW searches the certificate files only in the location where the caller VI resides or in the application directory. | ||||||||||||||
![]() |
timeout specifies the maximum time, in milliseconds, that this VI waits to get a response from the OPC UA server. The default is 5000. | ||||||||||||||
![]() |
OPC UA client refnum out returns the reference for the OPC UA client. | ||||||||||||||
![]() |
OPC UA data change event returns notifications to the OPC UA client from all the subscriptions that the OPC UA client has created. The notifications contain updates of the data on the OPC UA server. NI does not recommend using this output. | ||||||||||||||
![]() |
error out contains error information. This output provides standard error out functionality. |
Example
Refer to the OPC UA Demo.lvproj in the labview\examples\Data Communication\OPCUA directory for an example of using the Connect VI.