Categories

Using Custom Properties on Templates in Ignition

Using Custom Properties on Templates in Ignition

Ignition is a modern HMI/SCADA based software platform from Inductive Automation that closes the gap between production and IT with unlimited, web-based monitoring and central control of an entire facility via a single central server.

There are tons of features to use Ignition's independent modules for including Real-Time Status Control, Alarming, Reporting, Data Acquisition, Scripting, Scheduling, MES, and Mobile support.

Sometimes, there are tweaks you might want to make that require more customization. This blog lays out how to use Induction to make screens versatile by adding Custom Properties to them.

Accessing Custom Properties

To access custom properties, select the screen in the project browser and then navigate to Component > Customizers > Custom Properties.

 

Click on the image for high resolution

Template Parameters and Internal Properties

There are two types of custom properties, Template Parameters and Internal Properties. In my example, I have a template called Flags which has one template parameter for the state and five internal properties for various DMC offices. 

 

Screenshot of custom properties template parameters and internal properties.

Template Parameters

Template properties are parameters that appear on each template instance allowing each instance to be configured differently. Some popular uses of template parameters are to pass a tag prefix or a state into a template. 

Template properties can be accessed outside of the screen. So, if you call a template with template properties on a window, you can set the properties in that window. In the example below, I added a template property called State to the Flags template. As a result, when I use the Flags template on the DMC template, I am able to set the State property of the Flags instance to IL. 

Click on the image for higher resolution

Internal Properties

Internal properties, which cannot be accessed outside of the template, are intended for the internal workings of a template.

I added some properties to the Flags template for isChicago, isBoston, isDenver, isHouston, and isNewYork. This was done because these properties do not need to be accessible outside the Flags template but can be used within the template.

You can then add a binding to the internal property. A lot of times, I use an expression binding that uses the template parameter of the template. The binding I added to my example is an expression binding that compares the State property (which is a template parameter) to different strings. Below, it is comparing State to MA. If that is true, then the internal property isBoston is true. I am then able to use the isBoston property throughout my template.

Screenshot of property bindings for Flag in Ignition.

Click on the image for higher resolution

If you are going to access the same data over and over again on your template, it is useful to create an internal property and set the value there. That way, there is only one point of maintenance if you ever have to change it. You are able to access the internal property through all binding types which gives you flexibility to combine internal properties and use them in different ways. It also makes it easier to debug complex bindings because instead of having one big binding you can separate the expression binding out into internal properties. You can then replace the large complex binding with a combination of internal properties. 

Below, I use the isChicago property to control the visibility of the Chicago flag image.

Screenshot of property binding window in Ignition.

Click on the image for higher resolution

For more on Ignition, check out these 4 Tips for Ignition Designer.

Learn more about DMC's PLC Programming services.

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:

Categories

Related Blog Posts