(3) Sequence program operation
A sequence program is sequentially operated from the step 0 to the END or FEND instruction.
In ladder mode, a sequence program is operated from left to right and top to bottom in a ladder block.
[Ladder mode]
From top
to bottom
10
* Program operations are executed in the
order of 1) to 11).
2.2 Sequence Program Configuration
Sequence programs are classified into the following three types.
• Main routine program
• Subroutine program
Interrupt program
•
From left to right
1)
2)
7)
8)
9)
X0 X1 X5 X6 X7
0
3)
4)
X2 X3
5)
6)
X4
Figure 2.3 Comparison between ladder mode and list mode
File A
P0
I0
Figure 2.4 Sequence program classification
[List mode]
0 LD
1 AND
10)
2 LD
Y10
3 AND
Program
4 ORB
operations are
5 OR
sequentially
6 AND
executed from
7 AND
the step 0 to the
8 AND X7
11)
END instruction.
9 OUT
END
10 END
Step number
Main routine
program
FEND
Subroutine
program
RET
Interrupt
program
IRET
END
CHAPTER2 SEQUENCE PROGRAMS
0)
X0
1)
X1
2)
X2
3)
X3
4)
5)
X4
6)
X5
7)
X6
8)
9)
Y10
10)
11)
2 - 3
1
2
3
4
5
6
7
8