I am using node-red-contrib-iiot-opcua node. I have created a server in my flow and some variables.
I am receiving a boolean value from PLC, I want to write this value in my OPC UA server in node-red.
I have added a function block in between to send relevant data to the write node. It gives me an error. I am relatively new to node-red. Can somebody help me to tackle this problem? Thank you!
Use a debug node to show msg.payload as it leaves the function node.
I suspect it will not look exactly as you intend, though I don't see any problem with msg.payload.injectType specifically.
The write node requires the following data as input.
Input:
payload (value to write one or all)
topic
addressSpaceItems or nodesToWrite (Array of Node-Ids)
nodetype (inject)
injectType (write)
valuesToWrite (Array of values or objects to write individual)