Toshiba PROSEC T3 User Manual page 94

Hide thumbs Also See for PROSEC T3:
Table of Contents

Advertisement

7. Interrupt Function
7.1 Interrupt function
The PI312 has the interrupt function. When an interrupt condition is fulfilled in each
operation mode, the PI312 generates an interrupt signal for the T3. Then
corresponding I/O interrupt program in the T3 is started immediately.
One I/O interrupt program is assigned to one PI312. Therefore, the channel 1 interrupt
and the channel 2 interrupt activate the same I/O interrupt program.
The interrupt generation condition is explained in section 6 Function Details.
This section explains how to use the interrupt function.
NOTE
The general information about the I/O interrupt program is provided in the T3 User's
Manual − Functions.
7.2 Interrupt control flags
To use the interrupt function, set the interrupt-enable flag on the command register
YW(n+1) to ON. The bit 1 in the command register is for channel 1 and the bit 5 is for
channel 2. Refer to section 4.1 for the bit assignment of the command register.
The PI312's interrupt function is enabled under the condition of both the interrupt-
enable flag and the counter gate (phase G and soft-gate) are ON.
When the T3 receives the interrupt signal from the PI312, the T3 stops other
operation, such as main program execution, I/O processing, etc., and immediately
starts the corresponding I/O interrupt program execution.
On the I/O interrupt program, read the interrupt flag which is allocated to the address
16 of the PI312's buffer memory by using READ instruction. By reading the interrupt
flag, the PI312 recognizes the interrupt acceptance and resets the interrupt flag. If the
interrupt flag is not read, the PI312 cannot generate the next interrupt signal.
Interrupt flag (buffer memory)
Address 16
The source of the interrupt − channel 1 or channel 2 − can also be checked by reading
the interrupt flag.
92
Pulse Input Module (PI312)
F
E
D
C
B
No use (data not defined)
1 when channel 2 generates interrupt
1 when channel 1 generates interrupt
A
9
8
7
6
5
4
3
2
1
0

Advertisement

Table of Contents
loading

Table of Contents