Omron 3G3MX2 Series User Manual page 118

Drive programming
Hide thumbs Also See for 3G3MX2 Series:
Table of Contents

Advertisement

Select/Case/Case Else/EndSelect
Command
Allows the execution of multiple program sections
depending on the variable value. Executes <com-
mand set n> when <condition variable> matches
<condition value n> of any "case" command.
Executes <command set for others> ("case
else") when <condition variable> does not
match any of condition values of the "case"
commands.
This command is useful when you need to
select among multiple options based on a <con-
dition variable>.
This command is also useful to organize pro-
grams when it is used with the "call" commands
that calls subroutines.
Note A "select" is counted as nesting level 1.
 Example
Block number
1 to 8
Based on the value of U(00), 100 is assigned to U(01) if U(00) is 1, and 200 is assigned to U(01) if U(00)
is 2. In the case 3, 500 is assigned to U(01) and the program jumps to the "endselect" command.
9
Jumps to the block 1: loop_ unconditionally.
Drive Programming User's Manual (I580-E2)
Description
Flowchart method
A set of "select" to "endselect" used in a subroutine is counted as nesting level 2.
Flowchart
6 Drive Programming Commands
Condition variable: a condition variable you use
Condition value n: any variable or constant
(range 128 to 127)
Command set n: one or more commands until
next "case" or "endselect" command. It can con-
tain nested commands (up to eight levels).
Format
Text language method
select <condition variable>
case <condition value 1>
<command set 1>
...
case <condition value n>
<command set n>
...
case else
<command set for others>
endselect
Operation
Argument
Text
6 - 17
6

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

3g3rx series3g3lx series

Table of Contents