UDT definitions with TIA portal (beginner help)

Hi, I'm new to ignition so please bare with.

I have a PLC program that uses tiers of UDT's in a single tag. e.g.
Motor 1 (data type x) will have a 2 nd tier of 5 parameters with each parameter having its own data type (data type y/z/etc).
and i have multiple instances of this motor. all which resides in the 1 "Motors" folder

So my PLC tag looks like:
Motors folder:

Motor 1

Parameter 1

Parameter 1.1
Parameter 2
Parameter 2.1
Parameter2.x

Motor 2

etc

I'm unsure how to add this to my designer's tag data type as the tutorial from inductive university only shows that a "folder with the single use PLC UDT" is dragged. however when I open up my tag browser in the designer, i only have the 1 motor folder with the motor 1, motor 2 etc tags. and dragging the tags themselves dont create a UDT with the parameters.

My question is, is there a way to move just the data types from the TIA portal code. or something?

I apologise if this isnt the clearest. I am unable to sent screenshots as its a private code which I am working on. But i would really appreciate any advice/ guidance

thank you

Can you screenshot what you see for a motor in the ignition OPC browser at least?

How are you connecting to the PLC? Via the Siemens S7 driver, or OPC-UA onboard the device? If via the Siemens driver, you won’t be able to browse your tags in ignition due to the protocol not supporting browsing.
If it’s via opc-ua however, you should be able to see the same tag structure and hierarchy as you see in TIA portal.
If you drag Motor 1 from the OPC browser to the tag browser, you should get all of the tags that exist under the motor 1 tag, including all of your parameters. They will come across as tags only though. If you want to create udts for them in ignition, then you will need to pull them out, create them as a udt, and create an instance of the UDT inside the motor udt.

Hiya Nick!

I’m using the OPC -UA of the TIA portal itself and thats why I’m able to browse it through as OPC tags on the designer. I am able to see the same structure and hierachy.
But when I drag them to the tag browser as just the tag or even to the Data types folder, they’re created as just the 1 tag with data type: Documented.

Do you think I have to recreate each UDT by scratch?
or is there a way to import all the UDT’s of the PLC code to ignition…i know this isnt ideal due to its size, but an option nonetheless

Thank you , nick

Never seen that one before. So you're dragging on, what you see in the UDT browser, a tag folder into the tag browser? (again, a screenshot tells 1000 words)

What if you drag a base tag within the UDT instead of the folder/UDT instead? Does that create the tag correctly in the tag browser?

You definitely shouldn't need to create them manually!

You actually do need to create them yourself when dealing with structured types from an OPC UA connection.

See this thread: OPC UA struct data type?

Good to know!

Hmm is that so… any wizard tool to help if its quite a heft structured UDT?
or just gotta put in the time for it?

Thank you both!

Sorry, no, there’s nothing to help with creating UDTs from OPC UA structures right now.

Creating UDTs from OPC UA DataTypes (and possibly updating when they change in the server) is something we’ve been thinking about a little bit lately but there are no concrete plans on how it would work or when we’d implement it.

Hmm, because it’s a json, does that mean that you can pull it out into notepad, save as a json, do some reformatting, then import it to create the tags?

The UDT strategy outlined in that other thread where you use expression or derived tags and jsonGet/jsonSet to extract values for dedicated tags for each member of the JSON object is a little too complicated for that.

It’s not required that you use this strategy… if the JSON object is somehow useful to you. It’s just one approach that leaves you with re-usable UDTs similar (in appearance, once in use) to other UDTs people commonly build.

I don't quite understand as I haven't used OPC UA data types before, but sounds interesting.

There's always the option of extracting out the tags from TIA into Excel and creating your tags semi-automatically with the help of XML generating code (or json I suppose these days). I use this to create bulk udt instances, or even udts if I don't have a plc connected. There's an initial time investment to create the code, but once it's done, I've used it hundreds of times.

Alternatively, you could also use ignition's scripting to create tags in the same way with the system.tag.configure function.

This might give you some inspiration

Thats some great advice. I’ll look into the XML gen. code. thank you!!