Function Description

The function block UA_ConnectionGetStatus is used to get the connection status of a specified connection. Its also provides the Server State and also the Service Level

Representation in FBD

Parameter Description

Input parameters:

Name

Type

Comment

EXECUTE

BOOL

On rising edge connection is terminated.

CONNECTIONHDL

DWORD

Connection handle of connection to be closed.

TIMEOUT

TIME

Maximum time to close the connection.

Output parameters:

Name

Type

Comment

DONE

BOOL

FB has successfully completed its task.

BUSY

BOOL

The FB is not finished and new output values are to be expected.

ERROR

BOOL

Signals that an error has occurred within the FB.

ERRORID

DWORD

Error code.

CONNECTIONSTATUS

UINT

See UAConnectionStatus. The outputs ServerSate and ServerLevel are only valid if the ConnectionStatus is UAConnectionStatus_Connected

SERVERSTATE

UINT

See UAServerState. The Server State is UAServerState_UNKOWN if the ConnectionStatus is not UAConnectionStatus_Connected

SERVERLEVEL

BYTE

ServiceLevel describes the ability of the Server to provide its data to the client. The value range is from 0 to 255, where 0 indicates the worst and 255 indicates the best. The intent is to provide the clients an indication of availability among redundant Servers. This Value is server dependent.

Runtime Error

Refer to the Appendix for a list of OPC UA detected error codes.