In this example, we have some different motors, where each motor is a folder of Tags. Each motor has an amps Tag that is within the folder, so that our Tag paths look like the following:
Motors/Motor 1 /a mps
Motors/Motor 2 /a mps
Motors/Motor 3 /a mps
Motors/Motor 4 /a mps
|
Instead of creating four different displays for these four different Tags, we can create a single display and make it indirect. We need two things for this example: A component to display the value in, and a component which allows the user to select which motor they are looking at.
- Drag an LED Display component onto the view. This will be the display component.
- Drag a Dropdown component onto the view. This will be used to allow the user to choose what motor the LED Display is showing amps for.
- Select the Dropdown component. In the Property editor, under the options property, click Add Array Element...

- Set the value to 1 and the label to Motor 1.
- Repeat steps 3 and 4 to add array elements for Motors 2, 3, and 4.

- Click on the LED Display component. Select the Binding
icon in the value property. - Click on the Tag binding type then click the Indirect button.
- Click the Tag
icon and scroll down to the Motors/Motor 1/Amps Tag. Click OK.

- In the Tag Path field, replace the 1 with {1}. We are replacing "[default]Motors/Motor 1/Amps" with "[default]Motors/Motor {1}/Amps" maintaining the space found between "Motor" and "1" in "Motor" and "{1}".

- In the References list, select the row. Click the Properties
icon. - Scroll to the Dropdown component and select the value property of the Dropdown. Click OK.

What we have done is configured the Dropdown component's value property to be inserted into our indirect tag path in place of "{1}". If we select "Motor 1" from the Dropdown component, its value property then becomes 1. The number 1 then takes the place of "{1}" in the indirect tag path making it "[default]Motors/Motor 1/Amps". Similarly, selecting "Motor 2" from the Dropdown component makes its value property be 2. The number 2 then takes the place of "{1}" in the indirect tag path making it "[default]Motors/Motor 2/Amps".
- Click OK to save the binding.
- Put the Designer into Preview mode
to see the components and the indirect in action. - Select a motor in the Dropdown component. The value in the LED Display component will change depending on the Motor that is selected in the Dropdown list.
