Write to array in Vision

Hello,

I am trying to write string values to an array. However, I am getting a fault:

I have tried

  • system.tag.writeBlocking
  • system.opc.writeValue(s)
  • Giving permission in project settings

I hope you can help

What version of Ignition are you using? Is this a 3rd party OPC UA server? What is the type of the Ignition array tag? Are you trying to write to just an element or the entire array?

1 Like

I am using 8.1.15
It is a TwinCat/Beckhoff OPC-UA server
The array is of type STRING
I am trying to write a single element of the array

1 Like

Okay, I think the problem here is that the server does not support writing single elements, which isn’t that uncommon.

You’ll probably have to settle for writing the entire array at once instead whenever you need to change it. This will need to be done from scripting, which it sounds like you’re already doing anyway.

One other thing you can check first, though, is if the server exposes each of the array elements as their own Node in the OPC UA address space (try to browse underneath the array tag in the OPC browser, not the Ignition Tag browser).

If it does, then you can target your write to each individual element using that element’s NodeId (OPC Item Path), which is different than a Write operation that targets the array itself and includes information about which element(s) you are writing.

I can only browse to the entire array :frowning:

Okay, thanks… I will try to make a workaround with scripting