B&R OPC-UA Server Connected Client Information


My B&R PLC is running an OPC-UA server.
Is there a way to get any information on the clients that are connected at runtime please?

For example, I would like to know how many clients are currently connected to the server on my PLC and use this value in my Automation Studio code.

Thank you.

A sample task is described in the online AS-Help with following link:
B&R Online Help (br-automation.com)
ReadSessionDiagnosticsArray (Library/AsOpcUac/LibAsOpcUac_ReadSessionDiagnosticsArray_ST.zip)

1 Like

Thank you Corne :slightly_smiling_face: :+1:t4:

With this method, we need to use our PLC code to connect a client to the server that is running on the same PLC. Is this the only way? It seems strange that the server cannot tell how many clients are connected without connecting another client to find out. This also means that the number of clients connected will always be +1 due to the self connection?

There is no other way at the moment.
This also works with a remote connection.
The default value of the number of sessions is 50 and this can even be adapted.
Internal OPC UA connections are not uncommon and is for instance also used by mappView.

1 Like