EasyManua.ls Logo

Mitsubishi Electric MELSEC-Q00U(J)CPU - Program Operation

Mitsubishi Electric MELSEC-Q00U(J)CPU
588 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
69
CHAPTER 2 APPLICATION OF PROGRAMMING
2
2.4 Scan Time Structure
2.4.3 Program Operation
2.4.3 Program Operation
The CPU module repeatedly executes the program stored in the module from step 0 to the END or FEND instruction.
This program is referred to as a main routine program. This program is executed from step 0 in every scan.
A main routine program can be divided into subroutine programs. A subroutine program is from a pointer (P ) to the
RET instruction, and is created between the FEND and END instructions. This program is executed only when called
by an instruction, such as CALL(P) and FCALL(P), from a main routine program.
*1 Pointer numbers do not need to be specified in ascending order.
Use a subroutine program for purposes such as the following:
To organize a program executed several times in one scan as a subroutine program so that the entire
number of steps can be reduced
To organize programs executed under the specific condition as a subroutine program so that the scan time
can be reduced
Subroutine programs can be managed as one separate program (standby type program).
( Page 95, Section 2.10.3)
Subroutine programs can be configured with the nesting. ( Page 405, Section 4.9)
Using an interrupt pointer in a subroutine program changes the program to an interrupt program.
( Page 82, Section 2.9)
END/FEND
instructions
END/FEND
1 scan (After completion
of END processing,
an operation is repeated
starting from step 0.)
Step 0
Program
execution
END processing
Main routine program
Subroutine
program 1
Subroutine
program 2
Subroutine
program 3
Pointer*
1
Program A
Main routine program

Table of Contents

Related product manuals