
Chapter 2. Functions
2-22
2) TDI (Time driven interrupt)
TDI occurs periodically with the constant interval assigned in parameter setting. The interrupt
routine of TDI starts with the TDINT instruction and ends with the IRET instruction.
When multiple interrupt factors occur simultaneously, interrupt routines are executed according
to the priority given to the each interrupt. If an interrupt factor has higher priority occurs while
other interrupt has lower priority are executing, the interrupt routine of lower priority will be
stopped and the interrupt of higher priority will be executed first. Otherwise, two interrupts are
executed consequently.
The maximum numbers of TDI for K200S / 300S / 1000S are shown as following table. See the
2.4.5 for details of parameter setting.
PLC type
Available TDI
K80S
TDINT 0 ~ 7
K200S
TDINT 0 ~ 7
K300S
TDINT 0 ~ 13
K1000S
TDINT 0 ~ 29
The following figure shows an example of TDI execution.
<Figure 2.6 The example of execution of TDI>
Used TDI
TDI 0 : occurs every 200msec
TDI 1 : occurs every 100msec
TDI 2 : occurs every 400msec
A
B
C
A
B
A
B
C
B
B
100msec
100msec
100msec
100msec
200msec
400msec
200msec
Interrupt routines
A : The routine corresponding to TDI 0
B : The routine corresponding to TDI 1
C : The routine corresponding to TDI 2