UDT Multi-Instance Wizard

The multi-instance wizard provides a powerful but simple mechanism for rapidly generating many instances of a UDT at the same time by specifying patterns for UDT parameters.

To make instances of the UDT

Now that we have the Motor UDT (see Creating Complex Tags (UDTs)) we can make instances of it. Instances are running copies of a data type with concrete data for all members.

  1. In Tags Browser, right-click on Tags and select New Folder to create a new folder and call it Motors.
    You can create a single instance of the motor or use the multi-instance wizard to rapidly create all four at the same time. Here we will use the multi-instance wizard.

  2. Right-click on the Motors folder and select New Tag> Data Type Instance> Multi-Instance Wizard.

    images/download/attachments/1704412/image2015-4-24_16_15_40.png

    The Instance Creation Wizard is displayed.

  3. From the Step1 - Select Data Type to Create drop-down, select Motor.

  4. Set the following:

    Base Tag Name: Motor
    Tag Name Pattern: 1-4 this creates four tags Motor 1, Motor 2, and so on
    Parameter: MotorNumber which is what we used to reference specific tags in the PLC
    Pattern: 1-4 so that Motor 1 tag will have a parameter of 1 and Motor 2 will have a parameter of 2 and so on

    images/download/attachments/1704412/image2015-4-24_16_29_25.png

    Basically, you have the tag name and the parameter value to set.

  5. Click Preview to see what Ignition will create for the tag name and the parameter value.

    images/download/attachments/1704412/image2015-4-24_16_30_40.png

  6. Click OK to see all four tags created.
    If you expand each tag, you can see all the members of the UDT and their
    respective values.

    images/download/attachments/1704412/image2015-4-24_16_33_10.png

    Now if you make a change to the UDT, all four instances are automatically updated because they are of that type.

  7. Edit your Motor UDT by double-clicking on it in the Tags Browser.
    The Tag Editor is displayed.

  8. Click on the green + button on the top-left of window and select New Memory Tag.

    images/download/attachments/1704412/image2015-4-24_16_35_29.png

  9. Set the following:
    Name: MotorType
    Value: basic
    Data Type: String

    images/download/attachments/1704412/image2015-4-24_16_37_27.png

  10. Click OK to save.

    Now each instance automatically gets the new tag.

    images/download/attachments/1704412/image2015-4-24_16_38_14.png