Writing 2 dimentional array to OPCUA

I am having an issue writing a 2 dimensional array from Node Red to the OPCUA .

I am using the following node. “node-red-contrib-opcua” Installed version - 02.2.5

Writing to a 2D array has been supported since 0.2.110

I am hoping this is an easy config change but I have been banging my head against a wall for a few hours trying to get this to work, has anyone done this previously?

I’m unfamiliar with this specific node package, but I play with arrays in Node-RED constantly.

I’ll see what I can find, but can you share an example of what you’ve tried as a baseline?
Can you use the nodes to write non-2D array values, i.e., is it narrowed down to how the payload is formatted for 2D arrays specifically?

I believe it dependant on the format and I am missing something basic but I am not sure. The 2D array defined in code sys with X=station ID & Y=amount of liquor to dispense. In the past we would have to have a separate flow for every station it has made the codesys and nodered integration too complex.

The ideal situation would be to write the changed values in the array to OPCUA in a function node and I trying both situations but have not had success yet. In the Node package we have been using it is clear that the value being sent to OPCUA is only the X coordinates not XY.

Can you paste an example payload here? It would help get a sense of what you’re trying to transfer over.

Terry - I am going to update to the latest firmware first. There is an update to the OPCUA node that can’t be done at the moment and I think I am having a versioning issue. I will let you know how it goes. If that doesn’t work and I need to take it on via function I will let you know.

Keep in mind that the 3.6.0 firmware does not change the nodejs version, so if that is what you need in order to update the OPC node you are using, you will have to use your function node idea.
We are working on a big firmware update to a lot of the core libraries and nodejs is one of them.

. The following function works to write an array of floats to OPCUA when I pass it to a OPC Write node

var array2D = [90,102,12,13,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20];
var payload={
dataType: 10,
value : array2D,
arrayType : 1
msg.datatype=“Float Array”
return msg

Adjusting the code to fit what I think it should be for a 2D array nothing works
var array2D = [
[1, 2, 3, 4, 5, 6],
[7, 8, 9, 0, 0, 0],
[0, 0, 0, 0, 0, 0]
var payload={
dataType: 10,
value : array2D,
arrayType : 2
msg.datatype=“Float Array[6,3]”;
return msg;

Let me know you need anything else or if this is not clear