Constant, Expression or Tag

When configuring a tag, you will find many properties that offer three ways to set the associated value:  Constant, Expression or Tag.  For example, when configuring an alarm tag, you will have the option of setting a delay on the alarm. Depending on your choice of constant, expression or tag, the configuration parameter will look like one of the following examples:

The following is provided as a guide to help you choose the option best suited to your application.

Constant

Constant should be selected for any parameter whose value rarely, if ever, changes.  A developer can return to the tag’s configuration screen to edit the value, but otherwise ‘constant’ means ‘unchanging’.  Select this option for all values that should remain as you configured them.

Expression

Expressions are snippets of the VTS programming language that you can write to create values that change with changing conditions.  For example, you could create an expression that sets this parameter to the average of 3 or more other tag values. Another expression might set a value of 0 when another tag’s value is below 50%, then set 100 when the other tag’s value rises above 50%.

Select this option when you want the parameter’s value to be based on a formula, usually referencing other tag’s values.

The button  opens the expression editor. The button   clears the current expression.  The word “:  Invalid” means either that no expression has been provided, or that the result of a calculation is meaningless, such as dividing by zero.

The VTS programming language is described in the Programmer’s Guide.

Tag

Many parameters can take their value directly from another tag.  That other tag might be an operator control for setting a value, such as an alarm setpoint or delay.  The selected tag need not be one for which you have provided an operator input – any tag with a value can be used to set the parameter’s value.

Select this option when you want to have a parameter’s value match another tag’s value, such as when you want to provide an operator with control over a value.

The tag browser button   will open the tag browser, from which you can select or create a tag whose value will be used.  The button   clears the currently selected tag.