Copy an group of tags data from an OPC group to a UDT

I hope there is a way to use a selection tool to simply copy all the tag data from the GR4_1_A group into the BayUDT group shown in images below.

I do not mean creating new tags. I want the raw data that populates the OPC tags to copy into the UDT. Indirect tags cannot do what I want as one component is an alpha char. “A”. But that method is also a bit messy from what I can see.

Screenshot 2022-09-06 160637

Screenshot 2022-09-06 160704

To clarify, you want an instance of a UDT to write the current values to the definition of the UDT?

If this is correct, try looking at this system function, the last example, system.tag.configure - Ignition User Manual 8.1 - Ignition Documentation

1 Like

I’ll look, thanks.

That creates tags. The UDT already exists, and the OPC tags are present. All I need is for OPC data to move into the UDT data. In other words a tag like GR4_1_A.“Level_1.setpoint” is integer data I want actively moved into the UDT tag of the same name. “BayUDT.Level_1.setpoint”. Don’t need new tags, just the data copied for display on client screen. There are 202 of the OPC tag arrays to read, we are just attempting pointing at 1 of them, and putting its data into the UDT for viewing. Point to array/group “GR4_1_A” and copy into “BayUDT.” Bay UDT is exact same structure, just a generic parent name.

I’m a bit confused at the why of what you’re trying to do? So you have standard OPC tags (outside of a udt) reading tags from a device. You have a udt instance which has the same, but not opc e.g. memory, tags that you want the standard opc tag values to be copied into.

Why can’t you just put opc tags into the UDT?
Can you explain what the goal is instead?

Edit: at least from the screenshots, it looks like you haven’t created an instance of your UDT definition and have instead created standard tags wit the same structure. Do you have any instances of your BayUDT? Can you screenshot them?

It seems to me you are confused how UDTs are intended to work. Your UDT should define OPC tags within them, with configurable OPC item paths. UDT instances under the desired name with the corresponding parameters will simply contain the target data.

Have you gone through Inductive University’s free course material yet?

1 Like

I am confused that’s for sure, just wrapping my head around all of this. I have a project where I’d rather have a single UDT tied to my screen objects. There are 202 data structures that can be viewed, they are all identical but represent 202 different micro PLC’s controlling a remote process. A Compact logix is used to concentrate all these 202 devices data into a single point to access. Simply put I want my screen to reference a single set of tags (the UDT). I co do this in the PLC with a pointer to call an array and read it in but I would rather do it in ignition so I can have multiple clients running and each can view a different remote devices data.

Yes, the university is helpful but vague in some areas.

Sounds like you just want to create a UDT definition with parameters to make your UDT instances point to the right tags in the PLC for each device. for example, in the UDT definition you might have an OPC tag with the opc item path:


You would then create two UDT parameters, PLCName and DeviceName.
In the Tags tab (standard tags), you can then create a UDT instance-type tag that uses your UDT definition. Inside of this, you would supply the UDT instance with values for the UDT parameters for your devices. Create one UDT instance per device

1 Like

Thanks in advance for any feedback.

Follow Nick’s advice. Perhaps define the OPC item path to have more that just {DeviceName} for a parameter after the PLC name.

Yep, completely depends on the structure of the plc tags as to what parameters will best suit. It’s probably not a bad time to also mention to avoid reading Allen-Bradley AOI tags and to read AB UDT tags instead for efficiency and performance. Avoid also reading aliased tags

1 Like

That is correct, parameterized tag to allow an operator to select source of tags. I was thinking a radio button to trigger a script or something along those lines. If you look at the screenshot there are radio buttons at each position in a layout, A1 is selected, each could trigger the appropriate script to transfer the tag data as a single function if possible.

Don’t do this in the gateway. This is a user interface operation. Doing it in the gateway breaks as soon as you have two users, or a user and a designer.

Make UDT instances for your possibilities. User selection the simply drives a tagpath parameter for your windows and templates and pages and views. Within those, use indirect binding to swap out which folder is viewed.

1 Like