Description
This function block can execute if...else... commands in many advanced programming languages.
- Executes the "If…" command
- Executes extended commands such as "if…else..." or "if...else if...else".
- Connects Value Set function blocks or nests itself
Function | Process |
"if…" command | If the condition is true, then execute the command. |
"If…else..." extended command | Click and drag an else command as a branch. |
"if...else if...else" extended command | Click , drag one or more "else if" commands as branches, and then drag an "else" command as the last branch. |
Nested "if..." command |
Input
PIN | Description |
---|---|
if | Condition to be determined |
else if | Condition to be determined |
Output
None
Input value
PIN | Data type | Unit | Default value | Range |
---|---|---|---|---|
if | Digital | N/A | N/A | True, false |
else if | Digital | N/A | N/A | True, false |
Example 1
When the unit switch is closed, the fan is switched on; when the unit switch is open, the fan is stopped.
Example 2
In some design cases, four ways may be used to start and stop an AHU (Air Handle Unit): Remote switch, HMI switch, schedule switch and BMS switch. The local switch acts as the main switch, i.e., AHU stops if the local switch is open and starts when the local switch is closed. You need to select one of the four options. Once selected, switch status changing to "close" or value changing to "1" means the AHU is ON.