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.

getServerStatus (opcua)

Status of OPC UA server


sstat = getServerStatus(UaClient)


sstat = getServerStatus(UaClient) retrieves the status of the OPC UA server connected to UaClient. UaClient must be a scalar connected OPC UA client, not a vector of clients.

sstat is returned as a structure containing the following fields:

Field nameDescription
StartTimeTime the server started (MATLAB datetime)
CurrentTimeCurrent time on the server (MATLAB datetime)
StateState of the server (character vector)
BuildInfoStructure describing the build information for the server, including ManufacturerName, ProductName, and SoftwareVersion
SecondsTillShutdownIf the server is shutting down, how long until shutdown occurs
ShutdownReasonReason for the server shutdown, or an empty character vector


Connect an OPC UA client and retrieve the status of its server.

s = opcuaserverinfo('localhost');
UaClient = opcua(s);
sstat = getServerStatus(UaClient)
sstat =
              StartTime: 10-Jun-2015 16:39:17
            CurrentTime: 10-Jun-2015 16:55:00
                  State: 'Running'
              BuildInfo: [1x1 struct]
    SecondsTillShutdown: 0
         ShutdownReason: ''

Introduced in R2015b