194
4 OPERATION CONTROL PROGRAMS
4.14 Program Control
4.14 Program Control
Conditional branch control: IF - ELSE - IEND
■Usable Data
: Usable
■Description, data type of result
• If the data specified with (S) is true, the block between IF and ELSE is executed.
• If the data specified with (S) is false, the block between ELSE and IEND is executed.
• ELSE can be omitted. In that case, the block between IF and IEND is executed only when the data specified with (S) is true.
• Maximum multiplicities of conditional branch control are eight including selective branch control. (SELECT - CASE - SEND)
In the following case, an operation error will occur, and the corresponding Motion SFC program No. execution will be stopped.
For the subroutine called program, the call source program also stops to execute.
• (S) is indirectly specified device, and the device No. is outside the range.
Format Number of basic steps Usable steps
F/FS G
IF(S) - ELSE - IEND IF: 8
ELSE: 5
IEND: 1
Setting
data
Usable Data
Bit
device
Word device Constant Calculation
expression
Bit
conditional
expression
Comparison
conditional
expression
16-bit
integer
type
32-bit
integer
type (L)
64-bit
floating
point
type (F)
16-bit
integer
type
(K/H)
32-bit
integer
type
(K/H, L)
64-bit
floating
point
type (K)
(S)
Setting data Description Data type of result
(S) Conditional data which controls the flow of program
CEND
SEND
IEND
IEND
IF...
IF...
SELECT...
CASE...
(3 level) (2 level) (1 level)