Program Operation - Mitsubishi Electric Q01UCPU User Manual

Hide thumbs Also See for Q01UCPU:
Table of Contents

Advertisement

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.
Main routine program
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 93, Section 2.10.3)
● Subroutine programs can be configured with the nesting. (
● Using an interrupt pointer in a subroutine program changes the program to an interrupt program.
(
Page 80, Section 2.9)
Program
execution
END/FEND
END/FEND
instructions
END processing
Program A
Main routine program
Subroutine
program 1
Subroutine
program 2
Subroutine
program 3
Pointer*
1
CHAPTER 2 APPLICATION OF PROGRAMMING
Step 0
1 scan (After completion
of END processing,
an operation is repeated
starting from step 0.)
Page 403, Section 4.9)
2
67

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents