I am including several production lines into my data-gathering program. They use OPC-UA to offer me the information. Single parameter readings are not a problem anymore: I send the nodeid for the parameter I want to read, and I get a message with that single parameter. This is fine.
However, we have 3 production lines (times 3) and we're talking about reading hundreds of parameters. Having a full message for each one will be an incredible overhead, so I want to use the read multiple function.
This is the flow picture:
And this is that part of the flow:
[{"id":"95c94d51.0c6be","type":"OpcUa-Client","z":"2615c1d39a9d789b","endpoint":"c280f55a.54a418","action":"readmultiple","deadbandtype":"a","deadbandvalue":1,"time":"3","timeUnit":"s","certificate":"n","localfile":"","localkeyfile":"","securitymode":"None","securitypolicy":"None","name":"SCHMID Preclean 1","x":460,"y":80,"wires":[["ad167c5451c18446"]]},{"id":"c340a1bb.9c55f","type":"debug","z":"2615c1d39a9d789b","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1010,"y":80,"wires":[]},{"id":"284db5d9.84d21a","type":"catch","z":"2615c1d39a9d789b","name":"","scope":null,"uncaught":false,"x":500,"y":40,"wires":[["f84f422d.76b1d"]]},{"id":"f84f422d.76b1d","type":"debug","z":"2615c1d39a9d789b","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":630,"y":40,"wires":[]},{"id":"1de590136535e44b","type":"inject","z":"2615c1d39a9d789b","name":"Read multiple items","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":"5","topic":"readmultiple","payloadType":"str","x":230,"y":40,"wires":[["95c94d51.0c6be"]]},{"id":"e51017af58c218d0","type":"inject","z":"2615c1d39a9d789b","name":"Clear nodeId array","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"0.5","topic":"clearitems","payloadType":"str","x":230,"y":120,"wires":[["95c94d51.0c6be"]]},{"id":"26357084e92477d3","type":"join","z":"2615c1d39a9d789b","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic.nodeId","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"11","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":750,"y":80,"wires":[["611b61f6292ef170"]]},{"id":"ad167c5451c18446","type":"string","z":"2615c1d39a9d789b","name":"","methods":[{"name":"replaceAll","params":[{"type":"str","value":".Value"},{"type":"str","value":""}]},{"name":"replaceAll","params":[{"type":"str","value":"ns=2;s=Machine."},{"type":"str","value":""}]},{"name":"replaceAll","params":[{"type":"str","value":"M01MA01MH01#0_E_B"},{"type":"str","value":"machine_started"}]},{"name":"replaceAll","params":[{"type":"str","value":"M01SE01MG01#0_E_B"},{"type":"str","value":"m01_full"}]},{"name":"replaceAll","params":[{"type":"str","value":"M01SE01MH14#0_BA_B"},{"type":"str","value":"m01_jam"}]},{"name":"replaceAll","params":[{"type":"str","value":"M01SE01MN05#1_X_DW"},{"type":"str","value":"machine_abs_count"}]},{"name":"replaceAll","params":[{"type":"str","value":"M01SE01MN05#0_X_DW"},{"type":"str","value":"machine_rel_count"}]},{"name":"replaceAll","params":[{"type":"str","value":"M01SE01GH01#0_BA_Y"},{"type":"str","value":"machine_speed_set"}]},{"name":"replaceAll","params":[{"type":"str","value":"M01SE01GH01#0_E_B"},{"type":"str","value":"machine_conv_enabled"}]},{"name":"replaceAll","params":[{"type":"str","value":"M01SE01MS02#0_W_I"},{"type":"str","value":"machine_speed_actual"}]},{"name":"replaceAll","params":[{"type":"str","value":"M01SE01MS02#0_OW_I"},{"type":"str","value":"machine_speed_delta_warning"}]},{"name":"replaceAll","params":[{"type":"str","value":"M01SE01MS02#0_OG_I"},{"type":"str","value":"machine_speed_delta_alarm"}]},{"name":"replaceAll","params":[{"type":"str","value":"M01SE01MY13#0_E_B"},{"type":"str","value":"machine_standby"}]}],"prop":"topic.nodeId","propout":"topic.nodeId","object":"msg","objectout":"msg","x":630,"y":80,"wires":[["26357084e92477d3"]]},{"id":"611b61f6292ef170","type":"change","z":"2615c1d39a9d789b","name":"fix topic","rules":[{"t":"set","p":"topic","pt":"msg","to":"schmid-preclean-1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":880,"y":80,"wires":[["c340a1bb.9c55f"]]},{"id":"b8229e3c3b252536","type":"link in","z":"2615c1d39a9d789b","name":"Schmid Preclean 1 Variables in","links":["c771c83137c7b564"],"x":190,"y":80,"wires":[["95c94d51.0c6be"]],"l":true},{"id":"c771c83137c7b564","type":"link out","z":"2615c1d39a9d789b","name":"Schmid Preclean Variables","mode":"link","links":["b8229e3c3b252536"],"x":640,"y":380,"wires":[],"l":true},{"id":"5c05ecde52d409b0","type":"OpcUa-Item","z":"2615c1d39a9d789b","item":"ns=2;s=Machine.M01MA01MH01#0_E_B.Value","datatype":"Boolean","value":"","name":"machine_started","x":350,"y":180,"wires":[["c771c83137c7b564"]]},{"id":"7d9828b746e5b221","type":"inject","z":"2615c1d39a9d789b","name":"Add item","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"1","topic":"","payload":"{}","payloadType":"json","x":120,"y":180,"wires":[["5c05ecde52d409b0"]]},{"id":"d127eddb90e13f6a","type":"OpcUa-Item","z":"2615c1d39a9d789b","item":"ns=2;s=Machine.M01SE01GH01#0_BA_Y.Value","datatype":"Byte","value":"","name":"Set Conveyor speed","x":340,"y":380,"wires":[["c771c83137c7b564"]]},{"id":"0bdc9aa981772c9c","type":"inject","z":"2615c1d39a9d789b","name":"Add item","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"3.5","topic":"","payload":"{}","payloadType":"json","x":120,"y":380,"wires":[["d127eddb90e13f6a"]]},{"id":"219cb867b390fc38","type":"OpcUa-Item","z":"2615c1d39a9d789b","item":"ns=2;s=Machine.M01SE01GH01#0_E_B.Value","datatype":"Boolean","value":"","name":"Conveyor running?","x":350,"y":420,"wires":[["c771c83137c7b564"]]},{"id":"95876276de300def","type":"inject","z":"2615c1d39a9d789b","name":"Add item","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"4","topic":"","payload":"{}","payloadType":"json","x":120,"y":420,"wires":[["219cb867b390fc38"]]},{"id":"2f256ba9a2aef6c3","type":"OpcUa-Item","z":"2615c1d39a9d789b","item":"ns=2;s=Machine.M01SE01MG01#0_E_B.Value","datatype":"Boolean","value":"","name":"Module 1 full?","x":360,"y":220,"wires":[["c771c83137c7b564"]]},{"id":"08a6668f100d967a","type":"inject","z":"2615c1d39a9d789b","name":"Add item","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"1.5","topic":"","payload":"{}","payloadType":"json","x":120,"y":220,"wires":[["2f256ba9a2aef6c3"]]},{"id":"1e46001da905faca","type":"OpcUa-Item","z":"2615c1d39a9d789b","item":"ns=2;s=Machine.M01SE01MH14#0_BA_B.Value","datatype":"Boolean","value":"","name":"Jam?","x":390,"y":260,"wires":[["c771c83137c7b564"]]},{"id":"43c70abad30ff144","type":"inject","z":"2615c1d39a9d789b","name":"Add item","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"2","topic":"","payload":"{}","payloadType":"json","x":120,"y":260,"wires":[["1e46001da905faca"]]},{"id":"e6841374fdc96bbc","type":"OpcUa-Item","z":"2615c1d39a9d789b","item":"ns=2;s=Machine.M01SE01MN05#1_X_DW.Value","datatype":"UInt32","value":"","name":"Absolute panel count","x":340,"y":300,"wires":[["c771c83137c7b564"]]},{"id":"b736ffb6127668f6","type":"inject","z":"2615c1d39a9d789b","name":"Add item","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"2.5","topic":"","payload":"{}","payloadType":"json","x":120,"y":300,"wires":[["e6841374fdc96bbc"]]},{"id":"e3957ffbec697988","type":"OpcUa-Item","z":"2615c1d39a9d789b","item":"ns=2;s=Machine.M01SE01MN05#0_X_DW.Value","datatype":"UInt32","value":"","name":"Relative panel count","x":340,"y":340,"wires":[["c771c83137c7b564"]]},{"id":"40e8cea4cf8ea84c","type":"inject","z":"2615c1d39a9d789b","name":"Add item","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"3","topic":"","payload":"{}","payloadType":"json","x":120,"y":340,"wires":[["e3957ffbec697988"]]},{"id":"7a638a1db8d3a959","type":"OpcUa-Item","z":"2615c1d39a9d789b","item":"ns=2;s=Machine.M01SE01MS02#0_W_I.Value","datatype":"Float","value":"","name":"Conveyor Speed","x":350,"y":460,"wires":[["c771c83137c7b564"]]},{"id":"3580385bd5287fc6","type":"inject","z":"2615c1d39a9d789b","name":"Add item","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"4.5","topic":"","payload":"{}","payloadType":"json","x":120,"y":460,"wires":[["7a638a1db8d3a959"]]},{"id":"ba968def5961fb3e","type":"OpcUa-Item","z":"2615c1d39a9d789b","item":"ns=2;s=Machine.M01SE01MS02#0_OW_I.Value","datatype":"Float","value":"","name":"Conv speed Delta Warning","x":320,"y":500,"wires":[["c771c83137c7b564"]]},{"id":"814a4f5c0d17be0c","type":"inject","z":"2615c1d39a9d789b","name":"Add item","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"5","topic":"","payload":"{}","payloadType":"json","x":120,"y":500,"wires":[["ba968def5961fb3e"]]},{"id":"32201bd134c2835e","type":"OpcUa-Item","z":"2615c1d39a9d789b","item":"ns=2;s=Machine.M01SE01MS02#0_OG_I.Value","datatype":"Float","value":"","name":"Conv speed Delta Alarm","x":330,"y":540,"wires":[["c771c83137c7b564"]]},{"id":"36763732535d1226","type":"inject","z":"2615c1d39a9d789b","name":"Add item","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"5.5","topic":"","payload":"{}","payloadType":"json","x":120,"y":540,"wires":[["32201bd134c2835e"]]},{"id":"74822d85954c1cfb","type":"OpcUa-Item","z":"2615c1d39a9d789b","item":"ns=2;s=Machine.M01SE01MY13#0_E_B.Value","datatype":"Boolean","value":"","name":"Standby?","x":380,"y":580,"wires":[["c771c83137c7b564"]]},{"id":"e49294bceec2a63e","type":"inject","z":"2615c1d39a9d789b","name":"Add item","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"6","topic":"","payload":"{}","payloadType":"json","x":120,"y":580,"wires":[["74822d85954c1cfb"]]},{"id":"c280f55a.54a418","type":"OpcUa-Endpoint","endpoint":"opc.tcp://10.94.10.50:4840/","secpol":"Basic256","secmode":"SignAndEncrypt","login":false}]
My OPC-UA node is configured like this:
After start, I inject the topic "clearitems" in the node, to make sure I don't double add parameters.
Then I add the multiple parameters for the test, at 0.5s intervals, just to make sure the node can get them all (I was hoping to reduce the time maybe to 0,1s later). To do that, I inject a message with an empty payload and empty topic, and use the item-opcua for each parameter, configured as follows:
The resulting message goes into the OPC-UA Client node, and the parameters are added.
Then, when I inject a message with the topic "readmultiple" in the OPC-UA node, I get the expected result, something like this:
And this looks promising, but when I try to read again all the inserted parameters, and inject "readmultiple" to the OPC-UA client for a second time, then I get the following:
I asked a question on the github page for the project, but they do not seem to understand the issue and they state I must be doing something wrong. I can't guess what that would be. Any thoughts?