Extracting UDT instances using SDK

Hello, I have been using the Ignition SDK to develop a custom module to extract tags. I am now facing a new challenge of pulling the UDT definitions we have set up in Ignition.

I am currently only getting the raw tags, and we would like to have the mapped UDT objects available for reference.

Does anyone have documentation available for doing this through the SDK, or mind offering some guidance on this topic?

Thank you.

I don't really understand what you're trying to do, but an important prerequisite is what Ignition version you're working against? Any answer that involves the tag system is going to be completely different from 7.9 to 8.X.

We are using 8.1. The reason for this is we are trying to standardize the naming of tags coming from the PLCs in our various integration projects by using UDTs in Ignition.

I managed to get a good amount of the UDT information using the below code snippet though it's still lacking a lot of needed information. I am also still unable to see the real tagpath of the attributes. E.g. (UDT: Motor1.Speed refers to tag: MOTOR1Speed, MTR1SPD, MTR_1_SPD, etc.).

We are doing a dump of all tags into our system and mapping the ones of interest to our backend application.

Is this possible to do in the SDK?

browseAsync only returns a NodeDescription, which is, as you noticed, a simplified common view of the tag. You probably want getTagConfigsAsync, which returns a list of TagConfigurationModel objects which will have much more information.

You're still not really explaining the specific piece of information you want, but reading between the lines it seems like you're after the binding expression on your UDT parameters?
I think what you're after would start from getTagConfigsAsync, then you want the local configuration (as in, not the base UDT definition, but the overrides on the particular instance you're looking at). Then you can use one of the binding related getters to get the information you want:
image
Though I'm not sure if UDT parameters are considered to be 'bound properties' the same way as the rest of the system.

1 Like

Thank you for pointing me in this direction, it certainly is providing more information regarding the UDTs.

I am still not able to see the OPC path or another piece of information that can be used to map the tag to a particular attribute in a UDT.

I can see the parameters, which is nice, but that just tells me how I instantiated the UDT, not the mapping of the tags.

An example of something that could work for us is, in the raw tags we can see the OPC path which we should be able to use to map against.

I am exposing Bound Properties, Local Configuration Properties and their respective bound properties, Tag Properties and the default Property Set that is obtained when using getValues().

Unfortunately, I am not seeing much exposed in the properties for the UDT attributes that I am testing with, other than the name of the attribute and that they're an AtomicTag

example raw tag with opcItemPath: -
opcItemPath = ns=1;s=[Device]TagName,
dataType = Float4,
name = TagName,
tagType = AtomicTag