This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

opcuaserverinfo (opcua)

Query host for installed OPC UA servers


Sinfo = opcuaserverinfo(HostName)



Sinfo = opcuaserverinfo(HostName) queries the specified host for its installed OPC UA servers. HostName can be a host name or IP address, specified as a character vector or string.

Sinfo is returned as an OPC UA ServerInfo object, or an array of these objects, containing the read-only properties Description, Hostname, and Port.

Use the opcua function to create an OPC UA client object directly from an object.


collapse all

Find all available servers on the local host, and view the properties of the first.

Sinfo = opcuaserverinfo('localhost');
OPC UA ServerInfo 'UA Sample Server':

   Connection Information
    Hostname: 'HOST4421'
        Port: 51210

Input Arguments

collapse all

Host name or IP address, specified as a character vector or string, identifying the machine running the OPC UA servers.

Example: 'localhost'

Data Types: char | string

Output Arguments

collapse all

Server information, returned as an array of objects. Index into the array to access the following individual server properties.

HostnameHost name used by the server to authenticate connections
PortPort number used for connections to the server
DescriptionFriendly name of the OPC UA server

See Also


Introduced in R2015b