Chapter 4 CPU modules MASTER-K
4-10
4.3 Program structure
4.3.1 Classification of program
All functional elements need to execute a certain control process are called as a
‘program’. In MASTER-K series, a program is stored in the RAM mounted on a CPU
module or flash memory of a external memory module. The following table shows the
classification of the program.
Program type Description
Scan program
The scan program is executed regularly in every scan. If the scan
program is not stored, the CPU cannot execute not only the scan
program but also other programs.
Time-driven interrupt
program (TDI)
The TDI programs are executed with a constant time interval
specified with parameter setting.
Process driven interrupt
program (PDI)
The PDI programs are executed only external interrupt input is
applied and the corresponding interrupt routine is enabled by EI
instruction.
Subroutine program
The subroutine programs are executed when they are called by the
scan program with a CALL instruction.
4.3.2 Processing method
The following diagram shows that how the CPU module process programs when the CPU
module is powered on or switched to RUN mode.
Start operation
Scan program
END processing
Subroutine program
PDI program
TDI program