How to Make New Instances of a UDT
Once you have a UDT Definition created, you can make multiple instances of it with the Multi-instance Wizard.
- In the Tag Browser, click the Add icon to create a new folder. We created one called Machine Motors.
You can create a single instance of the motor or use the Multi-instance Wizard to rapidly create many instances at the same time. In this example, we will use the Multi-Instance Wizard.
- Right-click on the Machine Motors folder, and select Multi-instance Wizard to open the Instance Creation Wizard window.
- In Step 1 - Select Data Type to Create, select a UDT (i.e., Motor) from the dropdown.
- In Step 2 - Configure the Parameters, enter the following for your Motor:
Base Tag Name: "Motor." Note the space at the end. Without this space your Tag names will look like Motor1, Motor2, etc.
Tag Name Pattern: 1-5 This creates five Tags Motor 1, Motor 2, thru Motor 5.
Parameter Patterns: the MotorNumber parameter is entered by default when we selected the data type to create in Step 1.
Pattern: 1-5 is the pattern of the parameter so the Motor 1 Tag will have a parameter of 1, Motor 2 will have a parameter of 2, and so on through Motor 5.
You'll notice that after you enter the Pattern, the number of Tags to create is updated. In this example, five Motor Tags will be created. Click Preview.
In Preview, you will see how the Base Tag Names and Parameter Values get created. Click Back to go back to the Instance Creation Wizard window if you want to make an update. If you like what you see on the Preview window, click OK.
In the Tag Browser, expand Motor Tags 1-5 to see if all the members of the Motor UDT were created and are running.
Cannot Edit Existing Instances using the Multi-Instance Wizard
You cannot edit existing instances using the Mult-Instance Wizard. The Mult-Instance Wizard is only used for quickly creating many instances of a UDT at the same time. If you want to make a change to all your instances, refer to How to Edit an Existing UDT.