Omron RX2 Series User Manual page 112

Driveprogramming, cx-drive
Hide thumbs Also See for RX2 Series:
Table of Contents

Advertisement

6 DriveProgramming Commands
Ifs/Else/End If
Command
If <condition> is met, it executes <command set
1> right after this command until the "else" com-
mand, and goes to the next step after the "endif"
command.
If <condition> is not met, it executes <command
set 2> right after the "else" command until the
"endif" command, and goes to the next step
after the "endif" command.
 Example
Block number
1 to 5
If U(00) is greater than U(01), it assigns 20 to U(03) right after the "if" and jumps to the "endif" com-
mand. If U(00) is not greater than U(01), it assigns 10 to U(03) right after the "else" command and
goes to the "endif" command.
6
Jumps to the block 1: loop_ unconditionally.
6 - 16
Description
Flowchart method
Flowchart
Condition: a comparison between two variables
or constants with the format <left hand value>
<comparison operator> <right hand value>.
• Left hand value: any variable or constant
(range −128 to 127)
• Comparison operator: =, <, >, <=, >=, or <>
• Right hand value: any variable or constant
(range −128 to 127)
Command set 1: one or more commands until
the "else" command. It can contain nested com-
mands (up to eight levels).
Command set 2: one or more commands until
the "endif" command. It can contain nested
commands (up to eight levels).
Format
Text language method
if <condition> then
<command set 1>
else
<command set 2>
endif
Operation
DriveProgramming User's Manual (I622-E1)
Argument
Text

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

3g3rx2 series

Table of Contents