7.1 UA_Connect

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
BExecuteBOOLOn rising edge connection is started.
BServerEndpointUrlVendor specificShall be STRING or WSTRING. The recommendation for new implementation is to use WSTRING. URL
BSessionConnectInfoSTRUCTSee UASessionConnectInfo
BTimeoutTIMEMaximum time to establish the connection.
VAR_OUTPUT
BDoneBOOLSignals a connection has been initially established.
BBusyBOOLThe FB is not finished and new output values are to be expected.
BErrorBOOLSignals that an error has occurred within the FB.
BErrorIDDWORDError code.
BConnectionHdlDWORDConnection 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
BOOLExecuteDoneBOOL
Vendor specificServerEndpointUrlBusyBOOL
STRUCTSessionConnectInfoErrorBOOL
TIMETimeoutErrorIDDWORD
ConnectionHdlDWORD