![background image](http://html1.mh-extra.com/html/omron/fh-1-series/fh-1-series_user-manual_742686566.webp)
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.
Содержание fh-1 series
Страница 8: ...WWW NNC IR 6 Vision System FH FZ5 Series User s Manual Z340...
Страница 14: ...WWW NNC IR 12 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 22: ...WWW NNC IR 20 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 48: ...WWW NNC IR Initializing the Controller 46 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 68: ...WWW NNC IR Editing Scene Groups 66 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 132: ...WWW NNC IR Useful Functions for Operation 130 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 172: ...WWW NNC IR Saving Scene Groups in External Memory 170 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 254: ...WWW NNC IR Basic Knowledge For Macro Customize Functions 252 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 650: ...WWW NNC IR Macro Reference 648 Vision System FH FZ5 Series User s Manual Z340 Related Items None...
Страница 881: ...WWW NNC IR...