First there is almost always a way to process without looping. Loops introduce risk to node-red (a run-away loop will crash node-red) - in simple terms, uninstall the loop node. If you ever need to "loop" an array, use the built in split
and join
nodes.
Next, there is multiple examples built in to node-red-contrib-opcua
.
CTRL-I
→ examples → node-red-contrib-opcua
In particular OPCUA-MULTI-SUB
and OPCUA_READMULTIPLE
I suspect you need to subscribe to multiple nodesids by sending a msg.topic
= multiple
and the msg.payload
as...
[
{ "nodeId": "ns=1;s=NodeIdString1" },
{ "nodeId": "ns=1;s=NodeIdString2" },
{ "nodeId": "ns=1;s=NodeIdString3" }
]