OPC UA , Array of Int not working
Hello,
I am using OPC UA in Node Red trying to send some arrays (Array of String, Array of Int, Array of Bool) to my PLC AXCF 1152, but I have some problems with Integer and Boolean. While it works fine with String, when I try to send Array of Int or Bool to the PLC, nothing happens. I can read the variables from the PLC but I can not write to them. I would appreciate any help.
I am using OPC UA in Node Red trying to send some arrays (Array of String, Array of Int, Array of Bool) to my PLC AXCF 1152, but I have some problems with Integer and Boolean. While it works fine with String, when I try to send Array of Int or Bool to the PLC, nothing happens. I can read the variables from the PLC but I can not write to them. I would appreciate any help.
Comments
I have tried it your way. While it works when I write the string 1,2,3 directly to the inject Node, I can not find a way for it to work with global variables. I have found a workaround for my project. I just write everything to string and then decode it on the PLC. It is not pretty, especially for RGB sequences, but it works. How did you post your flow? When I try to post it, nothing shows.
I posted my code using the </> symbol in the response window. This formats text as code.
Here is my updated flow using a variable to send via OPC UA. You have to define all elements of the array in the variable.
I have tried it and it is finally working. The key was converting global variable with type array of string to just normal string (.toString();). Only then was the string converted by OPC UA item to an array of Integer. Thank you very much for your support.