I used OPCUA-IIoT node in order to make the connection to the B&R PLC.
You must be able to complete my previous post in order to do this, or you must know that the OPC-UA server is enabled.
Next thing is that you must know where the data you want to read is located within the PLC. OPC-UA uses namespaces to organize it's content. Not only the data/variables you enable are available, there are also many other variables available with information about the server, clients, connections, etc.
In B&R land, the namespace for a global variable or a program local variable is 6.
You may see it as ns=6
.
This namespace must be provided when asking the OPCUA server what data you want.
Within a namespace, there is a hierarchy of data. The server provides you a way to indentify which folder to dive into, or what data you want to read.
You do this by including the address string after the namespace id inside your request.
For example, to get the value of a blower's air pressure located in a structure data type located in global variables.
ns=6;s=::AsGlobalPV:bdBlower.Sensors.AirPsi
If the variable is a local program variable, you would define it like this.
ns=6;s=::MyLocalProgramName:someLocalVar
Download/install the OPCUA-IIoT node from the pallete manager.
Add an OPCUA-IIoT inject node and OPCUA-IIoT Read node.
Open the inject node, setup the inject properties and enter in the variables you would like to read.
Click Done
Open the Read node and configure it.
You will need to setup the connector at first. Click the pencil icon to the right of the connector box.
The endpoint should be the PLC's IP address and the default port number is 4840.
In the Security tab, depending on how the server was setup, it may require you to use a certificate to connect to it. I set mine up for no security for the time being.
Leave the settings in Strategy tab as their default.
Place a regular debug node at the end of the Read node and connect it. Then click deploy.
You should start seeing some activity in your Debug log.
From there, extract the data you need and pass it on to the rest of your flow.
I hope this helps!