![]() |
Function Block Commands: If, Else If, Else, and End If |
Basics:
The "If", "Else If", "Else", and "End If" commands allow for scripting logic.
Details:
The structure for "IF" statements is very similar to other programming languages.
The condition for the If statement is set up using the

Figure 1: "Msg A" is only sent if the PRND1 signal is 0.
"Else If" is used to add additional conditions if the first is not true. Figure 2 shows "Else If" commands to look for other conditions.

Figure 2: If statement with multiple Else Ifs.
"Else" is used to address no conditions being true.
| |
Last Update: Saturday, October 25, 2008