Application of Condition Rules
Personalize your i4scada SmartEditor project with Condition Rules, by specifying signal names, logical operators, and values.
The scope of the Condition Rules is to define a specific state of an i4scada extension, at run-time, depending on a logical condition based on adjacent signal values.
The Condition Rules parameter is available under the States section, in the extension Object Properties panel.
The Condition Rules configuration is based on a collection of settings, which depend from one extension to another:
Condition Rule - Allows the configuration of the condition to be met in order for a specific state to be activated. The condition rule is defined by specifying signal names, logical operators, and values. The signal names must be enclosed between percent signs (%SIGNALNAME%).
The below table illustrates the logical operators that can be used to express condition rules:
Logical operator symbol
Explanation
>
higher
<
smaller
>=
higher or equal
<=
smaller or equal
==
equal
!=
different
&&
and
||
or
~
Bit-wise NOT
^
Bit-wise XOR
&
Bit-wise AND
|
Bit-wise OR
Note
%LocalSecond% <= 30 if a state is active at run-time: The value of the signal „Local Second“ is less or equal to 30.
Besides logical operators, it is also possible to use the following String operations in the below table. However, the strings must be escaped in a sentence, by setting their value between a backslash and an apostrophe \'value\'.
StringOperator
endsWith
startsWith
contains
Note
%LocalSecond% startsWith \'2\': The value of the "Local Second" signal starts with the numerical value 2.
State Symbol - The name of the icon class for the current state. Depending on the used extension, there are different icons to choose from. If the "Default icon" selection is kept, the symbol that is configured outside the states will not be changed.
This property applies to the following extensions:
wf-electric-symbol
wf-hvac-symbol
wf-icon
wf-icon-detailed
wf-icon-primitives
wf-pid-symbol
wf-valves-symbol
wf-switch-symbol
Style Class Name - Optional CSS class names for the style of this state - e.g. "error". Custom class names are allowed.
Animation - Allows the configuration of an animation style for the extension's current state, at run-time.
Animation Duration - Sets the duration of the animation in seconds.
Animation Count - Sets the amount of animation repetitions.
Warning
The preview of a Condition Rule text is limited to an amount of 258 characters. More details upon this topic can be found under the Known issues section, by reading the article Text ellipsis at "Condition Rules" object property if the Condition Rule exceeds 258 characters.