2
-
3
(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.
2.2 Sequence Program Configuration
Sequence programs are classified into the following three types.
• Main routine program
• Subroutine program
• Interrupt program
*1: Since the Basic model QCPU cannot execute multiple programs, the file name is fixed to "MAIN".
Figure 2.3 Comparison between ladder mode and list mode
Figure 2.4 Sequence program classification
X0 X1 X5 X6 X7
X2 X3
X4
Y10
0
10
END
0 LD X0
1 AND X1
2 LD X2
3 AND X3
4 ORB
5 OR X4
6 AND X5
7 AND X6
8 AND X7
9 OUT Y10
10 END
1)
2)
3)
6)
4)
5)
7)
8)
9)
10)
11)
0)
1)
2)
3)
4)
5)
6)
7)
8)
9)
10)
11)
[Ladder mode]
From left to right
From top
to bottom
* Program operations are executed in the
order of 1) to 11).
[List mode]
Program
operations are
sequentially
executed from
the step 0 to the
END instruction.
Step number
FEND
RET
IRET
END
P0
I0
File A
*1
Main routine
program
Subroutine
program
Interrupt
program