WWW.NNC.IR
Macro Reference
564
Vision System FH/FZ5 Series
User’s Manual (Z340)
If Then Elseif Else EndIf
Controls the process flow according to the specified condition.
Format
If <expression> Then
<ifStatement>
[Elseif <expression> Then
<elseifStatement>]
:
:
[Else
<elseStatement>]
EndIf
Parameter
Return value
None.
Description
If the logical expression specified in the <expression> parameter is true, the specified statement by the
<statement> parameter in the If block or multiple of Elseif blocks is executed.
If the logical expression specified in the <expression> parameter in the "If" part statement is true, the If block
statement specified in the <ifStatement> parameter is executed.
If the logical expression specified in the <expression> parameter in the "If" part statement is false, and the
logical expression specified in the <expression> parameter in the "Elseif" part statement is true, the Elseif
block statement specified in the <elseifStatement> parameter is executed.
If all logical expressions specified in the <expression> parameter are false, the specified Else block
statement by the <elseStatement> parameter is executed.
If there are multiple of If, Elseif, and Else statements having a true logical expression within the statement,
only the first statement from the beginning of the block statement having a true logical expression is
executed.
ElseIf block statements and Else block statement are optional.
If the program process is jumped into or out of the Do block statement using the Goto function in a statement,
unexpected operation may occur.
If neither the If statement nor the EndIf statement is used, either the "ELSEIF without IF", "ELSE without IF",
"ENDIF without IF", "IF without ENDIF", "ELSEIF without ENDIF", or "ELSE without ENDIF" error will occur
depending on the statement that is used.
If the format is written incorrectly, such as writing the macro function name incorrectly, omitting a comma, or
omitting a half-width space, a "Syntax error" error will occur.
Parameter
name
Data type
Description
<expression> ---
Logical expression that controls the process flow. (Reference:
<ifStatement> ---
Executed statement if the following logical expression after the If statement is true
<elseifStatement> ---
Executed statement if the following logical expression after the Elseif statement is true
<elseStatement> ---
Executed statement if all logical expressions in the statement are false.
Summary of Contents for fh-1 series
Page 8: ...WWW NNC IR 6 Vision System FH FZ5 Series User s Manual Z340...
Page 14: ...WWW NNC IR 12 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Page 22: ...WWW NNC IR 20 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Page 48: ...WWW NNC IR Initializing the Controller 46 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Page 68: ...WWW NNC IR Editing Scene Groups 66 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Page 881: ...WWW NNC IR...