Blog

Using Dropdowns to Set Tag-Paths in Ignition

Using Dropdowns to Set Tag-Paths in Ignition

Ignition is a versatile SCADA platform from Inductive Automation that is quickly becoming one of the top choices for industrial automation solutions. Ignition can run on a variety of platforms and interfaces easily with many field IO devices using its built-in drivers.

Ignition has many powerful and useful features that can be utilized for making screens with dynamic animations and control. Some of these features are custom screen properties, parameterized templates, and expression building. This blog will explore how to create a screen that allows the user to navigate easily between configuration settings for similar devices.

Using Dropdown Lists

One object that can be very useful and intuitive to implement is the dropdown list component. The dropdown list comes with a built-in, two-column dataset where one column displays a label and the other corresponds to a selected value.

Figure 1: Station Selector Dataset

This is useful because a more detailed description is displayed to the user while something as simple as an integer can be set to a parameter in the background. For example, in situations where the system has individual stations that use similar equipment, it is likely that the only thing differentiating these units from a software perspective would be the number assigned to that station. Since the value and label are independent from each other, the developer can use any label they want (such as a number or a relative position) to convey the station’s identity to the user.

Modular Tag Structure

Figure 2: Example Tag Setup

In the above tag structure, each station has many sub-devices with the same underlying tag structure. If each station has four devices, then each will have its own integer and double value with two devices sharing a float value. For example, Device 1 would correspond to Int1, Double1, and SmallFloat (Devices 1 and 2 share SmallFloat, while 3 and 4 share BigFloat).

Device Configuration Example

Figure 3: Calibration Screen Initial

In this example, I set up a calibration screen with two dropdown lists. One of the dropdown lists is used to set the selected station (see figure 1 for the dataset configuration and figure 2 for the tag structure). The second dropdown list is used to select a device within that station. The Device Selector dataset can be set up in a very similar fashion to the Station Selector with the biggest difference being that it needs to have an extra column added to account for the float values' tag-paths.

Figure 4: Device Sector Dataset

Indirect Tag Mapping

After the dropdown lists were configured, I used indirect tag bindings to map the selected integers and double values to their respective IO fields.

Figure 5: Indirect Tag Mapping

In this dynamic mapping, the tag-path is automatically set to the correct double by taking the selected value of the station and device selectors. An almost identical indirect tag expression can be used to set the integer field to the correct tag. The only difference between the two being that I replaced Double with Int.

Accessing Custom Dataset Values

As unfortunate as it is, we cannot use indirect tagging to access the custom column that we added to the device selector. Fortunately, with a few extra steps, we can still use that value to point the float input/output field to the correct tag in our tag browser. The first step to achieving this is to create a string custom property on the screen that will hold the tag path for our float IO field. A screen’s custom properties can be accessed by right-clicking the screen and selecting the Custom Properties item under the Customizers menu.

Figure 6: Custom Properties Location

Figure 7: Custom Property Setup

The next step is to create a property binding on that string parameter so that it accesses the FloatName column that has been configured on the Device Selector dropdown.

Figure 8: Expression Setup

Once that expression is set up, we can implement an indirect tag for the float IO field.

Now, the screen will update its values to the correct tags as the user shifts between the different stations and devices. This dynamic tag pathing is just one example of how Ignition can be a flexible and powerful SCADA solution.

Learn more about DMC's Ignition capabilities.

Comments

There are currently no comments, be the first to post one.

Post a comment

Name (required)

Email (required)

CAPTCHA image
Enter the code shown above:

Related Blog Posts