2D Array with Siemens PLC (OPCUA)

I am new to using Siemens in Ignition and I'm having some issues taking in the array from a Siemens PLC. I have an array of 5200 tags with two tags under each array element. When using the OPCUA method I can only access first portion of the array and I am not getting the 2nd.

I was able to make a UDT for this but i cant understand how to do generate all of these tags with the multi instance wizard in the format that i need. The tag is built as a 20,20,13 array structure.

Ultimately I want to take a query from a recipe sql database and write to all of these tags at once to push the recipe to the PLC.

  1. What can I do to read the data like I normally can with Allen Bradley tags?
    A. Do I need to use a different driver?
    B. What format for the multi-instance wizard to format it and create 5200 tags in a 20x20x12 array?
  2. What is the best way to have a SQL query write to a tag array in the structure I have?



Thank you.

Hi @smoye,
i think you will be better to create a opcua tag from type document how read CurrentRecipe_Details and do the split inside ignition with derived tags. otherwise would will get really fast to the limit of the OPC UA server of your PLC.

See this post from @Kevin.Herron

regards

What happens in the Tag Browser if you change the datatype to Document instead of Dataset?

What you have here in the PLC is a 3d array of a structured type, which is not something Ignition supports very well. Ignition tags have no support for multidimensional arrays at all.

If I do it in a document type it still doesn't look right. I only get an index of 0-5200.
I can't reference a specific array location like 0,0,0 or 15,9,11 for example.



CurrentRecipe_Details.txt (370.7 KB)

Hmm, yeah, looks like it still gets flattened into a 1d array. I think that might change in Ignition 8.3, but not helpful here.

You might be better off if you just don't create tags for this at all. If you only need to to a bulk write to set the recipe then you can just do it from scripting.

The OPC Item Paths should be predictable - navigate to and drag in just the first "Enabled.EN" tag and "InspectionType.PV" and take a look at the path. It should be easy to build the entire list of paths to write in script.

1 Like