Pm designer operation manual – B&B Electronics WOP-2121V-N4AE - Manual User Manual
Page 433

14
PM Designer Operation Manual
14-24
CHAPTER 14 USING MACROS
ELIF !
Format
ELIF !P2
Data Type
B
Function
Executes the commands in the command block following this ELIF command if the condition P2
is false (0/Off).
P2 (I/E/CE) The
condition.
ELSE
Format
ELSE
Function
This command specifies the begin of the default command block that will be executed if none of
the conditions in the preceding IF and/or ELIF commands is true. This is not an executable
command.
ENDIF
Format
ENDIF
Function
This command specifies the end of a command block, which begins at the command following
the matching IF, ELIF, or ELSE command. This is not an executable command.
Example
IF-Command Structures:
Commands and
Structures
Description
IF
…
ENDIF
Runs the command block between IF and ENDIF when the
condition is true, otherwise ignores the command block.
IF
…
ELSE
…
ENDIF
Runs the command block between IF and ELSE when the
condition is true, otherwise runs the command block between
ELSE and ENDIF.
IF
…
ELIF
…
ELIF
.
.
.
ELIF
…
ENDIF
Runs the command block between IF and the first ELIF and
ignores all the following commands in the structure when
condition 1 is true, otherwise examines condition 2. Runs the
command block between the first ELIF and the second ELIF and
ignores all the following commands in the structure when
condition 2 is true, otherwise checks condition 3. Repeats the
same operation until condition N is processed. If none of the
conditions are true, no command block in this structure is run.
IF
…
ELIF
…
ELIF
.
.
ELIF
…
ELSE
…
ENDIF
Runs the command block between IF and the first ELIF and
ignores all the following commands in the structure when
condition 1 is true, otherwise examines condition 2. Runs the
commands block between the first ELIF and the second ELIF and
ignores all the following commands in the structure when
condition 2 is true, otherwise checks condition 3. Repeats the
same operation until condition N is processed. Runs the
command block between ELSE and ENDIF if none of the
conditions are true.
Note that there can be up to 20 nested IF-command structures.