OPC UA server - read all tags in a node

Hello,

node red amateur novice here, looking for some clarification from those more experienced.

I am working on a project for data logging on a rexroth PLC. I have connection to the OPC UA server and I was able to use the browse node to retrieve the values of all tags within a variable list successfully.

There are 48 tags of type String, Real, and UINT.

My question comes down to what is the most efficient way to retrieve these values every 2 seconds?
When I used the browse node at 5 second intervals it was fine, but when I bumped it down to 2 seconds, which is what I really need I started to see errors.

Keep in mind this is on my home wifi, so once hardwired it's a definite possibility that things will speed up.

I have also in the past used the Read multiple, but this is obviously more work to setup since I have to define all the tags in my flow instead of just reading everything that already exists in the variable list because I know that I want every value.

Anyway, just curious if anyone has run across this and can provide recommendations.

Thanks in advance.

Hi!

I’m not too familiar with Rexroth PLCs, but with other systems like Siemens, I’ve used the Extension Object (UDT in PLC side) datatype to group multiple variables (even mixed datatypes). This allowed me to do a single read and receive everything in JSON format on the Node-RED side.

Maybe give Extension Object a try with Rexroth, or group variables by datatype in arrays as an alternative.

1 Like

@aitor

Thanks for the suggestion, I'll give it a whirl and let you know.

1 Like

@aitor

This worked like a champ, thank you much!

1 Like

Nicee!! :slight_smile: