![Mitsubishi Electric melsec q00ucpu Скачать руководство пользователя страница 44](http://html.mh-extra.com/html/mitsubishi-electric/melsec-q00ucpu/melsec-q00ucpu_user-manual_239147044.webp)
CHAPTER2 SEQUENCE PROGRAMS
1
2
3
4
5
6
7
8
2.2 Sequ
ence Pr
ogram C
onfig
uration
2.2.2 Sub
routine pro
gram
2
-
5
2.2.2 Subroutine program
(1) Definition
Subroutine program is a program from a pointer (P ) to the RET instruction.
This program is executed only when it is called by a subroutine program call instruction (such as
CALL(P), FCALL(P)) from a main routine program.
(2) Application
• Programming a program which is executed two or more times in one scan as a subroutine
program can reduce the number of steps in the entire program.
• Programming a program which is executed only when a certain condition is satisfied as a
subroutine program can shorten the scan time.
(3) Programming of subroutine programs
(a) Programming location
Create subroutine programs between the FEND and END instructions in the main routine program.
Subroutine programs can be managed as one separate program (stand-by type program).
(
(b) Programming order
When creating multiple subroutine programs, it is not necessary to set the pointer numbers in
ascending order.
Remark
For the nesting of subroutine programs, refer to Section 9.9.
Figure 2.6 Programming location of subroutine programs
Program A
P0
FEND
RET
RET
RET
END
Y10
Y11
Y12
P8
P1
Main routine
program
Subroutine
program
Содержание melsec q00ucpu
Страница 2: ......
Страница 3: ......
Страница 13: ...A 10 Memo ...
Страница 620: ......
Страница 621: ......