OPC Tag (Float Array) not supporting PLC Tag (Real[10])

Hi All,

The tag I have created for a PLC tag that is REAL[10] is not working, it only works when I use

ns=1;s=[TOPIC]ARRAY_NAME[i] as the item path. If I use ns=1;s=[TOPIC]ARRAY_NAME (without indexing an array element), I will get this Quality error:

“Error_Configuration("Bad_AttributeIdInvalid: The attribute is not supported for the specified Node.")”

It looks like Ignition is not recognizing the array as an OPC node, because the item path seems fine.

Screenshots:

Float Array Tag in Ignition (DOESN’T WORK):

Item Path copied from OPC Browser: ns=1;s=[FMS_PLC_03_00A]B100_MTCW_CT_STOPsp

Error:

Float Array Tag in Ignition but indexing an element (WORKS):

Item Path used: ns=1;s=[FMS_PLC_03_00A]B100_MTCW_CT_STOPsp[0]

I might be missing something. Thank you in advanced for your help!

Danny

Many of the older Ignition drivers expose arrays as a folder containing a tag per element. You can’t address the array itself in these drivers.

Hi Kevin, thank you for the explanation. Can this be fixed by updating Ignition, the drivers, both, or there is no solution for this?

No, it’s just not a functionality those drivers have.

What’s your use case? Array support in Ignition tags is weak and there is no performance gain at the driver level either way - it reads the array not individual tags at that level.

A solution I have implemented is a polled opc read, which converts the data into a Ignition Float Array tag. When I want to write back, I have a Float Array tag with a change script.

Here is the function I use, works pretty well, you just need to remember to set the correct size.

def getArrayValues(opcPath,size):
    return [i.value for i in system.opc.readValues('Ignition OPC UA Server', ['{}[{}]'.format(opcPath,i) for i in range(0,size)])]
    
def setArrayValues(opcPath,values,size):
    itemPaths= ['{}[{}]'.format(opcPath,i) for i in range(0,size)]
    system.opc.writeValues('Ignition OPC UA Server', itemPaths, [round(x,2) for x in values])

Hope this helps

What’s the use case for using float array tags? I use array folders within UDTs or of UDTs and it seems to make management, indirects and organization so much easier.

If you have a very specific need for this, it is implemented in my alternate driver. But note that writes to individual array members are not supported.

1 Like

Thank you!!

I don’t have a specific need at the moment, just curious to know if I was doing something wrong on my end. I will keep that in mind. Thank You, Phil!

I was trying to grab an array all at once with one opc tag, to minimize the number of tags created in ignition. It is not like it was too long to create individual tags, I experimenting with that datatype just to know how it worked.

Sounds good, my use case doesn’t require it. I can work with it, I was just experimenting with that datatype and I was curious if I was doing something wrong on my end. Thanks Kevin!