Last modified:
Note: Beta feature
Telecontrol is currently available as a beta feature
About default values for context variables
Default values for context variables define initial values. Context variables can be used in formulas to provide values for value points. Context variables are “uninitialized” (= have no value) when used in formulas where a default value is not defined.
You can only use values to preset context variables. Units are not possible.
The initial values are used until the variable receives its first value (e.g., from an output value point). This ensures a defined behavior for value submission.
When a context variable is updated by an output value point, the default value is replaced by the transmitted value. The variable then stores and uses the last received value.
Default values are useful when a formula requires an initial value before any data has been received.
Example: Context variable
A common use case is calculating the difference between two measured values from consecutive interrogation events.
-
During the first interrogation (after restart), there is no previous value available for comparison.
-
The default value can be used as the initial reference value, or the formula can return no result (e.g., an invalid quality status).
-
After the first value is stored in the context variable, the next interrogation can calculate the difference between the current value and the previously stored value and transfer only the calculated delta.
Configure default values for context variables
Steps
-
Go to Configuration > Default values for context variables.
-
Select the
Plus icon.
-
Enter a name in the Abbreviation (=variable name) field.
-
Use the same name as the context variable used in the input and output value points.
-
-
Enter a Default value.
-
Select
Save.
The default value is now available for the defined context variable. It is used until the variable receives its first actual value.
Note: Boolean values
Unlike numeric context variables, Boolean default values do not have an initial default state. Until the first value is received, they are neither true (1) nor false (0).