Omron SYSMAC FH Series User Manual page 467

Vision sensor vision system
Hide thumbs Also See for SYSMAC FH Series:
Table of Contents

Advertisement

Do Loop While
Repeatedly executes the statements between Do and Loop while the specified condition meets.
Format
Do
<statement>
Loop While <expression>
Parameter
Parameter
Data type
name
<statement>
---
<expression> ---
Return value
None.
Description
The statement is repeatedly executed if the specified logical expression by the <expression> parameter is
true as a result of the specified Do block execution by the <statement> parameter.
If the Exit Do statement is used in the Do block statement, the statement force stops the repeating execution
of the program immediately.
If the program process is jumped into or out of the Do block statement using the Goto or Gosub function,
unexpected operation may occur.
If neither the Do statement nor the Loop While statement is used, either the "DO without LOOP", "LOOP
without DO", or "EXIT without DO" 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.
Usage Cautions
• None.
Example
Repeats the process until the loop counter reaches a constant value.
NUM& = 0
Rem Repeat the process
Do
NUM& = NUM& + 1
Loop While NUM& < 100
Print NUM&
Useable Modules
Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro
Vision System FH/FZ5 Series
User's Manual (Z340)
Statement to be executed repeatedly
Conditional logical expression for which gets a repetition of operation (Reference:
Operator (p.213))
WWW.NNC.IR
Description
8
465
Macro Reference

Advertisement

Table of Contents
loading

Table of Contents