FB-Name

UA_Connect

This Function Block is used to create a (optional secure) transport connection and an OPC UA session. The connection shall be terminated by calling the UA_Disconnect after establishing the connection.

VAR_INPUT

B

Execute

BOOL

On rising edge connection is started.

B

ServerEndpointUrl

Vendor specific

Shall be STRING or WSTRING. The recommendation for new implementation is to use WSTRING. URL

B

SessionConnectInfo

STRUCT

See UASessionConnectInfo

B

Timeout

TIME

Maximum time to establish the connection.

VAR_OUTPUT

B

Done

BOOL

Signals a connection has been initially established.

B

Busy

BOOL

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

B

Error

BOOL

Signals that an error has occurred within the FB.

B

ErrorID

DWORD

Error code.

B

ConnectionHdl

DWORD

Connection handle – is valid until UA_Disconnect is called.

Notes: The connection monitoring and the reconnect handling are to be done by the client vendor implementation. The reconnect sequence is defined in OPC 10000-4.

UA_Connect

BOOL

Execute

Done

BOOL

Vendor specific

ServerEndpointUrl

Busy

BOOL

STRUCT

SessionConnectInfo

Error

BOOL

TIME

Timeout

ErrorID

DWORD

ConnectionHdl

DWORD