Creating table to display Arrays from OPC tags

Hi,

I’m using Ignition 8.1.10 to display OEE metrics from an OPC based machine, however one of the parameters I would like to get off it is an array that keeps causing errors when trying to convert the data.

I can see the data being sent when i set the OPC tag’s datatype to “byte” and look in the diagnostics section in the tag editor.
I attempted to create the tag using “dataset” and bring it in that way (as per the videos) but i continue to get " type_conversionerror".

I can see the data in an array format when using integration Objects’ OPC UA Client, but this wont translate to Ignition when i follow the same filepath.

Do i need to create a transaction or similar to extract it and if so how do i do that (is it in the inductive university?)

Apologies for the vagueness, I’m new to ignition.

Cheers,

Eddie

Update:

I have recieved the following error which shows my variable data:
[null, Error_TypeConversion(“Error coercing array ‘[Lorg.eclipse.milo.opcua.stack.core.types.builtin.DataValue;@389c3aec’ to type ‘class [Ljava.lang.Byte;’. Error index: 0. Message: Cannot coerce value ‘DataValue{value=Variant{value=[Variant{value=1}, Variant{value=1728}, Variant{value=119802}, Variant{value=1.102497}, Variant{value=4.2986245}, Variant{value=1321.3063}, Variant{value=1321.3063}, Variant{value=62.862003}, Variant{value=8.862}, Variant{value=0.492}, Variant{value=226.6}, Variant{value= }, Variant{value= }, Variant{value= }, Variant{value= }, Variant{value= }, Variant{value= }, Variant{value= }, Variant{value= }, Variant{value= }, Variant{value= }, Variant{value= }, Variant{value= }, Variant{value= }, Variant{value= }, Variant{value= }, Variant{value=226.6}]}, status=StatusCode{name=Good, value=0x00000000, quality=good}, sourceTime=DateTime{utcTime=132798216510000000, javaDate=Wed Oct 27 16:20:51 BST 2021}, serverTime=DateTime{utcTime=132798216510000000, javaDate=Wed Oct 27 16:20:51 BST 2021}}’ into type: class java.lang.Byte”), Wed Oct 27 16:23:21 BST 2021 (1635348201471)]

One can see the variable data in the “Variant{value= }” sections of the error, but it wont translate into a readable format for me

I'm not sure what you're referencing here.

When you drag this tag from the OPC Browser to the Tag Browser doesn't it get created as a Byte Array or Short Array tag?

How/where are you trying to then convert this tag data? Script somewhere?

Hi Kevin,

When i drag it into the tag browser from the OPC browser, it does one of two things;

  1. the diagnostic error i posted in the update above with value = “type_conversionerror”
  2. it takes it in as a string and displays value of DataValue{value=Variant{value=[Variant{value=1}, Variant{value=1728}, Variant{value=119802}, Variant{value=1.102497}, Variant{value=4.2986245}, Variant{value=1321.3063}, Variant{value=1321.3063}, Variant{value=62.862003}, Variant{value=8.862}, Variant{value=0.492}, Variant{value=226.6}, Variant{value= }, Variant{value= }, Variant{value= }, Variant{value= }, Variant{value= }, Variant{value= }, Variant{value= }, Variant{value= }, Variant{value= }, Variant{value= }, Variant{value= }, Variant{value= }, Variant{value= }, Variant{value= }, Variant{value= }, Variant{value=226.6}]}, status=StatusCode{name=Good, value=0x00000000, quality=good}, sourceTime=DateTime{utcTime=132798216510000000, javaDate=Wed Oct 27 16:20:51 BST 2021}, serverTime=DateTime{utcTime=132798216510000000, javaDate=Wed Oct 27 16:20:51 BST 2021}}’

I’m still confused… how can it do one of two things and not just the same thing every time?

Does the other OPC UA client you mentioned have a generic attributes pane that you can use to show the DataType and ArrayDimensions attributes for this Node in the server?

I think the issue might be the server has defined this Node as having a DataType of Variant of some array dimensions, rather than whatever DataType it should be.

Apologies, I didnt explain it well enough,

#1 is when i add it manually by finding the tag using “create new tag” in the tag browser
#2 is when i drag it from OPC browser.

Sorry about that

Does the other OPC UA client you mentioned have a generic attributes pane that you can use to show the DataType and ArrayDimensions attributes for this Node in the server?

DataType = BaseDataType
ArrayDimensions = UInt32 Array [-1]

Okay, that confirms it.

Unfortunately you’re probably not going to be able to get at this data in Ignition. Instead of assigning a specific DataType to this Node the server is using Variant (BaseDataType), which is essentially a union of all possible built-in DataTypes. Ignition can’t deal with this as it has no equivalent type in its system.

When you drag it in and we can’t figure out the right type we default to String, which is why you sort of see the values in that big mess of a String value, but unless you want to try and parse those out yourself in script there’s not much else that can be done.

Ideally you could modify/configure the server to provide a specific DataType for that Node.

Ah, That’s unfortunate, but i get it now, so when i dragged it in and had it as an array then it had only 1Rx1C.

Thanks for your help Kevin, Appreciate it. especially giving how bad i was explaining it!