Template with Parameter for OPC UDT...getting errors, need help please

Hello there! Thank you for reading this. Before you ask…yes…I have watch the university videos on creating UDTs, nested UDTs, templates, creating templates etc. etc. but am still having an issue.

I have a UDT defined (udt_matrixEquipment) and a tag instance of it that is getting data from the PLC.
I created a template with a parameter who’s type points to my UDT as a dragNdrop. The first time I save my project, no errors. The second time I save my project, or when I try to drop the tag onto an instance of my template in a main window I get this error. What am I doing wrong? The path to the UDT definition is null?

Most grateful for any help (I can’t find anything in the videos or the forum or the manual).
Regards,
Ted.

Message: Unable to set template parameter “Generator.matrixEquipmentTag=UDTProperty[type=[default]types/UDT OPC Tags/udt_matrixEquipment,path=]”

Details: java.lang.IllegalArgumentException: Cannot set UDT property “Meta/TagPath”, it doesn’t exist.

you’re dragging and udt definition, you should drag a udt instance created under tags folder.

Hello jespinmartin1, thank you for the reply. This is what I’ve tried, with the template from yesterday and with a new template binding just one tag to a label…so far I get the same error messages for each attempt listed below.

1
In the template editor: Set the custom properties template parameter to User Defined / Tags / UDT OPC Tags / udt_matrixEquipment as a drop target. Binded my label to a string tag within the UDT definition. Save the project multiple times, no errors.
In the window editor with an instance of my template: Dropped instance of my template in the window. 1st save, no errors. 2nd and subsequent saves, error each time. Dragged an instance of my UDT and dropped into the template (checked the binding, its good). Save, get the error.

2 (mostly a repeat of 1 but choosing the template parameter differently)
In the template editor: Set the custom properties template parameter to User Defined / default / UDT OPC Tags / udt_matrixEquipment as a drop target. Binded my label to a string tag within the UDT definition. Save the project multiple times, no errors.
In the window editor with an instance of my template: Dropped instance of my template in the window. 1st save, no errors. 2nd and subsequent saves, error each time. Dragged an instance of my UDT and dropped into the template (checked the binding, its good). Save, get the error.

3 (mostly a repeat of 2 but binding the template label to string tag of a working instance of my UDT)
In the template editor: Set the custom properties template parameter to User Defined / default / UDT OPC Tags / udt_matrixEquipment as a drop target. Binded my label to a string tag within a working instance of my UDT. The label shows the text value to the tag in the UDT instance. Save the project multiple times, no errors.
In the window editor with an instance of my template: Dropped instance of my template in the window. 1st save, no errors. The label in the template displays the correct text. 2nd save produces the same error. 3rd save, no error, 4th save same error (and it repeats). Each time it errors I get this message in the designer console window: (I only pasted the first few lines of the trace)

I’ve tried many combinations…the same error. I know there must be something I’m doing wrong, I’m not arrogant enough to think there’s an designer bug biting me. Any suggestions?
Thanks again,
Ted.

7:43:52.748 [AWT-EventQueue-0] ERROR com.inductiveautomation.ignition.client.util.gui.ErrorUtil - Unable to set template parameter “templateCRAPOLA.matrixTag=UDTProperty[type=[default]types/UDT OPC Tags/udt_matrixEquipment,path=]”
java.lang.IllegalArgumentException: Cannot set UDT property “Meta/TagPath”, it doesn’t exist.
at com.inductiveautomation.factorypmi.application.binding.UDTProperty.setValueInternal(UDTProperty.java:318)
at com.inductiveautomation.factorypmi.application.binding.UDTProperty.setValue(UDTProperty.java:312)
at com.inductiveautomation.factorypmi.application.binding.util.DynamicPropertyUtil.setPropertyValue(DynamicPropertyUtil.java:274)
at com.inductiveautomation.vision.api.client.components.model.AbstractVisionPanel.setPropertyValue(AbstractVisionPanel.java:165)
at com.inductiveautomation.factorypmi.application.components.template.TemplateHolder.startupTemplate(TemplateHolder.java:402)
at com.inductiveautomation.factorypmi.application.components.template.TemplateHolder.loadTemplate(TemplateHolder.java:274)
at com.inductiveautomation.factorypmi.application.components.template.TemplateHolder.templateUpdated(TemplateHolder.java:467)
at com.inductiveautomation.factorypmi.application.model.TemplateManager.fireTemplateUpdated(TemplateManager.java:84)

Something that takes my attention from your capture is the type showed under UserDefined/Tags/UDT Memory Tags.
You should see instead see something like this:
image
Note the suffix icon, in my case is a udt def in your case an object type

Do you have configured a default provider for your project? If not you should.
Once you have saved the project with a provider I recommend you select the udt under Tags Folder and not under the your provider name folder.

Then drag and drop and see the binding generated. Before the first save and before the error happen try deleting the provider:
image
delete al inside [provider] including and save
What you see Meta/TagPath? Is still at Good quantity bind?


After the save and after the error popup, the quantity of the binding goes to error_configuratin or uncertain?

The error log is clear, from your error log above: “Cannot set UDT property “Meta/TagPath”, it doesn’t exist” somehow your binding can’t find the path to your udt instance.

If all fails this sounds like a bug but I’ve never hear this kind of error.
The final thing I would do before contacting support is to re-install the designer launcher and deleting the designer runtime cache.

My Designer and Vision client is the same host that the gateway is running on.
My project was configured to use the gateway’s built in tag provider ‘default’.
I created one, ‘TagProvider_md2aam9c’, as you suggested and configured my project to use that provider (pics attached).


I moved all my from the ‘default’ tag provider to new tag provider ‘TagProvider_md2aam9c’ (cut & paste, remembered the hard way that UDT definitions should be moved first :slight_smile:

Regarding the square prefix image in front of ‘UDT Memory Tags’ in my image…it’s because that is an empty folder. I created a dummy UDT in that folder and now it looks like you’d expect.

I changed the template parameter to my UDT from the Tags folder as you suggested. I set the label text binding manually to the string in the UDT. The path generated is ‘[TagProvider_md2aam9c]types/UDT OPC Tags/udt_matrixEquipment/cfgEquipmentName’. I deleted the provider and ‘types’ as you suggested, the path now looks like this (pic attached) ‘UDT OPC Tags/udt_matrixEquipment/cfgEquipmentName’. I did the same thing my first template (to be consistent and not leave any crappy settings behind).


Saved multiple times…its all good. Note: I don’t have any instances of my templates in the main window yet.
Interesting to note, the error popups ARE NOT popping up. However, when I checked the Meta/TagPath in the template…looks like there’s still a problem with the bindings (null, uncertain) but nothing shows up in the Designer console, just a good save.

This is what my two templates look like in the window (no surprise there with the bad meta):

Question: How do I delete the designer cache.

And just $%&! marvelous…I just uninstalled Ignition itself, the gateway, sunny beaches!

I guess I’m starting over from scratch. Oh well. At least I can test everything I’ve learned. Once I’m up and running again I’ll recreated my UDT’s and templates and see if I can get it worked. This reminds me of my first DOS computer (I’m showing my age) when I deleted my root directory.

BBFN, thanks Jonathan.

x

Oh no, you miss understood this part

You should NOT delete this on the template itself, but on the template used as an instance on a window YES.
I encourage to start with indirect tag bindings first to understand the concept and the jump to user defined parameters.

Also it looks like your are doing a bad binding type at the template, when you are using user defined you should you property binding, like this:

About Designer Cache:

But I think is totally unnecessary in this case since I think your missing a step somewhere.

1 Like

Just to chime in here for some clarification. What you are doing here, @edward.fowler, in your screenshot is trying to bind a Label's property to a tag within the UDT definition itself. By definition, a UDT definition will never have tags that subscribe to data - I'm surprised you're even reading back null to be honest.

What you need to do, as @jespinmartin1 shows, is to bind to the instance of the UDT that you're providing to the template by using your UDTType parameter. The UDT instance is provided as a property of the template, i.e. in your case the udt_matrixEquipment property. The UDTType parameter binds to an instance of the UDT definition that you choose, and from there you can read the instance's tag values using the properties within it.

Not to confuse, but I'm not a fan of using UDTType parameters, and instead opt to pass in the UDT instance's parent path (as deviceParentPath - the path to the tag folder it's housed in) and its instance name (as deviceName) into template parameters.
Then I create an internal parameter deviceTagPath which combines the two above using an expression binding. Then I use indirect binding to read the UDT instance's tags. There are a number of benefits to using this way such as having easy visibility into what's bound to the template via its parameters and being able to use it in a template repeater. You will however lose the ability to simply drag and drop UDT instances onto the page. But for what I gain, I'm happy to lose that.

@jespinmartin1
HA, it’s working! Of course, I knew it was going to be something (dumb) and simple! I should have noticed that…I’ve been doing binding and know that I should be referencing the properties. Thanks for you help and patience Jonathan.

@nminchin
Thank you Nick, I’ll give that a try…after I get a few more things under my belt :slight_smile: I do like the drag and drop though :nerd_face:

Thanks again ya’ll, much appreciated!