Ignition Dynamic page creation binding tags to UDT

1.3k views Asked by At

New to Ignition, I would like to understand how to dynamically create windows pages containing templates binded to UDTs.

I created a Template named TGBT having 4 parameters: -DeviceName (string) -TagBlock (string) -TagOffset (string) -TgbtNr (TGBT, drop target)

I created a UDT named TGBT with the same Data Type Parameters and added in the data type structure new OPC using OPC Item Path [{DeviceName}]{TagBlock},I{TagOffset}

Then I created instance of UDT with add hoc values: This works fine when I create the page using the Ignition Designer

I created a script that read a CSV file (will be database at the end) and creates UDT instances accordingly: It works fine, I can see OPC values updated in the tag browser, with the expected OPC Item Path.

I understood Template canvas are the proposed way and populated the Templates dataset. The script populates the template with provided parameters eg: {"DeviceName":Elec,"TagBlock":DB200,"TagOffset":48}

The Templates instances are correctly placed in the Template canvas, but I should be wrong in parameters as the Template fields, labels (...) are not updated accordingly.

Have someone tried this, could help me?

Xavier

1

There are 1 answers

0
sanderd17 On

Also check out this forum thread to generate templates on a container without canvas: https://forum.inductiveautomation.com/t/dynamically-add-component-to-root-container/12735/11