Timer interrupt – IDEC MicroSmart User Manual

Page 142

Advertising
background image

5: S

PECIAL

F

UNCTIONS

5-22

« FC4A M

ICRO

S

MART

U

SER

S

M

ANUAL

»

Timer Interrupt

In addition to the interrupt input as described in the preceding section, slim type CPU modules FC4A-D20RK1, FC4A-
D20RS1, FC4A-D40K1, and FC4A-D40S1 have a timer interrupt function. When a repetitive operation is required, the
timer interrupt can be used to call a subroutine repeatedly at predetermined intervals of 10 through 140 ms.

The Function Area Settings dialog box is used to enable the timer interrupt and to specify the interval, from 10 to 140 ms,
to execute the timer interrupt. When the timer interrupt is enabled, the program execution jumps to the jump destination
label number stored in special data register D8036 repeatedly while the CPU is running. When the interrupt program is
completed, the program execution returns to the main program at the address where the interrupt occurred.

Since these settings relate to the user program, the user program must be downloaded to the

MicroSmart

after changing

any of these settings.

Special Data Register and Special Internal Relay for Timer Interrupt

Programming WindLDR

1. From the

WindLDR

menu bar, select Configure > Function Area Settings. The Function Area Settings dialog box

appears.

2. Select the Special Input tab.

3. Click the check box on the left of Timer Interrupt to use the timer interrupt function.

4. Select an interval to execute the timer interrupt, from 10 to 140 ms.

Disable and Enable Interrupts

The timer interrupt and interrupt inputs I2 through I5 are normally enabled while the CPU is running, and can also be indi-
vidually disabled using the DI instruction or enabled using the EI instruction. When timer interrupt is enabled, M8144 is
turned on. When disabled, M8144 is turned off. See page 18-7.

Interrupt

Special Data Register for Timer Interrupt

Jump Destination Label No.

Special Internal Relay for

Timer Interrupt Status

Timer Interrupt

D8036

M8144

Advertising