This procedure is to check if the connection is still alive. The function block UA_Connect will deliver the ConnectionHdl. UA_ConnectionGetStatus requires this ConnectionHdl as input to deliver the connection status. In case the connection is lost after receiving the handle and while calling the UA_ConnectionGetStatus, ServerState Unknown will be returned.

NOTE: It is recommended to call UA_ConnectionGetStatus periodically but for performance reasons not in every control program cycle.


Figure 5: Connection diagnostics