Chapter 5 Power Supply / CPU

5.4Program

5.4.1Classifications of Program

All functional elements need to execute a certain control process are called as a ‘program’. In MASTER-K120 series, a program is stored in the EEPROM 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

 

Time-driven interrupt

 

 

The TDI programs are executed with a constant time interval specified with parameter setting.

 

program (TDI)

 

 

 

 

 

 

 

Process driven interrupt

 

 

The PDI programs are executed when external interrupt input is applied and the corresponding

 

program (PDI)

 

 

interrupt routine is enabled by EI instruction.

 

High speed counter driven

 

 

This interrupt programs are executed when comparison task signal is applied.

 

interrupt program(HSCDI)

 

 

(Standard Type only)

 

Subroutine program

 

 

The subroutine programs are executed when they are called by the scan program with a CALL

 

 

 

instruction.

 

 

 

 

5.4.2 Program Execution Procedure

The following diagram shows that how the CPU module process programs when the CPU module is powered on or switched to RUN mode.

Start processing

Scan program

Subroutine program

PDI program

TDI program

HSCDI program

END processing

5-14

Page 51
Image 51
LG Electronics 120S user manual Classifications of Program, Program Execution Procedure