2 sub program control, 3 interrupt program control, 2 sub-program control – Toshiba T2N User Manual
Page 129: User program running control 116
3.User Program Running Control
116
PROSEC T2N
When RUN starts up, sub program #1 is run once only before the main program
is executed on the first scan. Therefore, use sub program #1 as the initial
setting program at the starting of the operation.
The first scan operation is shown in the following diagram.
When the interrupt condition is set up, the interrupt program stops other operations
and is executed immediately. As shown below, you can register one timer
interrupt program which starts up according to a cycle set up in system
information and 4 I/O interrupt programs which start up according to interrupt
signals from I/O modules with an interrupt function* (No.1 - No.4).
Interrupt program
Operation
Fixed cycle
timer interrupt
Runs acording to the user specified interruption
cycle time in system information. The interruption
cycle time is set at 5 to 1,000ms (units 5ms)
I/O interrupt No.1
ž I/O interrupt No.4
I/O interrupt programs run by interrupt signals
generated from I/O modules with interrupt function*
*) I/O modules with an interrupt function is under development.
3.2
Sub program control
mode
mode mode transition
I/O
timer Sub #1
main
first scan
RUN mode
transition
HALT mode or
system initialization
3.3
Interrupt program control
Timer interrupt cycle
Timer interrupt cycle
timer
timer
timer
I/O #1
I/O #4
I/O #2
I/O interrupt No.4
interrupt conditions.
Fixed cycle timer interrupt
I/O interrupt No.1
scan
scan
scan
scan
scan
scan
I/O interrupt No.2