Hello,
I have two different variables that I query via the OPC UA Client. The current value of the two variables is to be written to a CSV file later. Both variables are initialised by two timestamp nodes. At the moment the variables are output like this "1667,3465576171875;null" and "null;386" but I want them to be output together. For example "1667,3465576171875;386".
Is it possible to query two variables in one timestamp with OPC UA? How can I query the variables at the same time so that they are output together?
I would be very grateful for your help.
[{"id":"8e7b8428.f9bb48","type":"OpcUa-Client","z":"d5733a5e.9e0868","endpoint":"90c88704.55a6d8","action":"read","deadbandtype":"a","deadbandvalue":1,"time":"1","timeUnit":"s","certificate":"n","localfile":"","localkeyfile":"","securitymode":"None","securitypolicy":"None","name":"","x":400,"y":160,"wires":[["4e92f94e.0d3b68"]]},{"id":"4e92f94e.0d3b68","type":"function","z":"d5733a5e.9e0868","name":"","func":"\nvar val1 = (msg.topic === \"ns=5;s=Arp.Plc.Eclr/Integer1\" ? msg.payload : null);\n\nvar val2 = (msg.topic === \"ns=5;s=Arp.Plc.Eclr/Real1\" ? msg.payload : null);\n\ncapa_log = (String(val2));\ncapa_log = capa_log.replace(\".\",\",\");\n\nvar log = capa_log + \";\" + val1;\n\n\nreturn [{payload: log}];\n//return [val1];","outputs":1,"noerr":0,"initialize":"","finalize":"","x":580,"y":200,"wires":[["a7547ecf.d3731"]]},{"id":"a7547ecf.d3731","type":"debug","z":"d5733a5e.9e0868","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":730,"y":280,"wires":[]},{"id":"cdbdea49.287418","type":"inject","z":"d5733a5e.9e0868","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"5","crontab":"","once":false,"onceDelay":0.1,"topic":"ns=5;s=Arp.Plc.Eclr/Integer1","payload":"","payloadType":"date","x":210,"y":200,"wires":[["8e7b8428.f9bb48"]]},{"id":"4eeed648.c00038","type":"inject","z":"d5733a5e.9e0868","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"5","crontab":"","once":false,"onceDelay":0.1,"topic":"ns=5;s=Arp.Plc.Eclr/Real1;datatype=Float","payload":"","payloadType":"date","x":230,"y":120,"wires":[["8e7b8428.f9bb48"]]},{"id":"90c88704.55a6d8","type":"OpcUa-Endpoint","endpoint":"opc.tcp://192.168.178.134:4840","secpol":"Basic256Sha256","secmode":"SignAndEncrypt","login":true}]