3
SEQUENCE PROGRAM CONFIGURATION AND
EXECUTION CONDITIONS
3.1 Sequence Program
3.1.2 Subroutine programs
3 - 9
1
Overview
2
Performance
Specification
3
Sequence Program
Configuration and
Execution Conditions
4
I/O Nunber Assignment
5
Memories and Files
Handled by CPU Module
6
Functions
7
Communication using
built-in Ethernet ports of
CPU module
8
Communication with
Intelligent Function
Module
3.1.2 Subroutine programs
(1) Definition of subroutine program
A subroutine program is a program section from a pointer (P ) to the REET
instruction.
The subroutine program is executed only when it is called by a subroutine program
call instruction (e.g. CALL(P), FCALL(P)) from the main routine program.
(2) Subroutine program applications
Using a subroutine program as described below reduces the number of program
steps.
• Changing a section, which is executed several times during one scan, to a
subroutine program reduces the number of steps in the whole program.
• Changing a section, which is executed only when a certain condition is satisfied,
to a subroutine program reduces the number of steps in a normally executed
program.