Substitution with Index Parameter

Things can quickly become complex when it comes to creating a project. In order to keep the overview in your work process, ease of use is an important topic. That is why zenon supports the user with an object-oriented and central workflow concept.

You might already know substitution features like linking rules, index variables or manual index editing. By applying them, screens as well as functions can be created once and reused for different content. This will not only save you time but will also help you to keep your project sleek and clearly structured.

Nevertheless, there are situations where using such functionalities can slow down your workflow. Taking index variables as an example, you not only create the variable but also need “write set value” functions and scripts in order to make it work. The effort is not always worth the benefit. To bypass such a scenario, zenon now offers an additional possibility to substitute screens and functions: “Replace indices” with parameter.

Substitution dialog of a function

Substitution dialog of a function

Let’s say you have three tanks and need to have a detailed screen of every single tank with all its variables. You have already created a “screen switch” function and a detailed screen for the first tank.  In the substitution dialog of the function you can create an indexing rule by entering a source variable, e.g. “Tank1”, and add a target, instead of using an index variable, type {PARAM} at the position. From now on, you can also apply this edited function for the other two tank buttons.
As a last step, set the parameter for substitution directly at the element properties of the button. This new feature not only works with a button but with a combined element and Combo-/Listbox too.

Element properties (of a button) – Variable/function

Element properties (of a button) – Variable/function

Tags: ,

Leave a Reply