OPC-UA Write to Arrays

Hi
I have multiple arrays coming across from a Unitronics PLC via OPC server and can read each element of the arrays but am having an issue writing back to the arrays in the PLC.

These arrays are in the format of:
Tagname: INST-01
Arrays in this tag: Real(20), Bit(30), Int(20), UInt32(5)

I have created a UDT in Ignition to mirror this tag and the arrays inside this tag are OPC tags.

All the data from these arrays can be read but I have 2 issues here.

  1. I cannot write to these OPC array tags inside Ignition, either in the tag browser or by using an input component.

  2. I cannot write the tags back to the PLC through the OPC-UA server using the following script:

    path = [
    “[.]Real”, “[.]Bit”, “[.]Int”, “[.]UInt”
    ]

    _real = system.tag.readBlocking("[.]Real")
    _bit = system.tag.readBlocking("[.]Bit")
    _int = system.tag.readBlocking("[.]Int")
    _uint = system.tag.readBlocking("[.]UInt")

    values = [_real, _bit, _int _uint]

    system.opc.writeValues(“RW-PLC”, path, values)

Can this be done? And if not, is there a workaround?
Thanks

What version of Ignition are you using?

Can you show me what this tag looks like using something like UaExpert? It sounds like it’s a structure with 4 array members or something?

1 Like