Omron CJ1W-CT021 Operation Manual page 150

High-speed counter units
Hide thumbs Also See for CJ1W-CT021:
Table of Contents

Advertisement

Interrupts
General Setting:
m+1
Example 1
Example 2
130
Output
31
* The assigned External Interrupt Task number is executed at a rising/falling
edge of the corresponding Output bit in the Unit Output Pattern.
For every Output the assigned External Interrupt Task number can be calculated
with the following formula ('O' = Output):
Assigned External Interrupt Task Number to the
• rising edge of the Output bit is equal to: Offset + 2xO
• falling edge of the Output bit is equal to: Offset + 2xO+1
For a complete overview of all External Interrupt Task numbers to be assigned to
the Outputs, refer to Appendix BAppendix B "Assigning External Interrupt Tasks to
Outputs".
15 14 13 12 11 10 9
8
Since there are 256 External Interrupt Tasks available (numbered 0 to 255) the
Offset can be maximum 192. With an Offset of 192 the last Output (31) will be
assigned the last available External Interrupt Task 255 (=192+2x31+1).
If you only want Soft Input 3 to generate interrupts and you only want to execute
an External Interrupt Task on the rising edge of Digital Output 3, than you must
enable Output 3 to generate interrupts (m+2 = 0008
decide to use an Offset of 5 (m+1 = 0005
and 12 will be assigned to Output 3. In External Interrupt Task 11 you should write
an appropriate (ladder) program which is to be executed at a rising edge of the
corresponding bit of Output 3 in the Unit Output Pattern. External Interrupt Task 12
must also be programmed but will remain empty since no action is required on a
falling edge of Output 3.
An Offset of 10 (m+1 = 0010
rupts (m+2 and m+3 = FFFF
bit of Output 0 in the Unit Output Pattern is assigned to External Interrupt Task
Number 10 and the falling edge to External Interrupt Task 11. The rising edge of
Output 1 to External Interrupt Task Number 12 and the falling edge to External
Interrupt Task Number 13 and so on. For Output 31 the two External Interrupt
Tasks 72 and 73 are assigned. Now you have External Interrupt Tasks 10 to 73
available. In every Task you should write an appropriate (ladder) program which is
to be executed at the Outputs' corresponding rising or falling edge.
The application example in section 6-4 "CAM-positioning" shows you how to use
outputs generating interrupts.
Assigned External
Interrupt Task Number
Offset + 62
Offset + 63
7
6
5
4
3
2
1
0
), with all 32 Outputs enabled to generate inter-
(BCD)
), means that the rising edge of the corresponding
H
Interrupt executed at
rising/falling edge*
Rising
Falling
Interrupt Task Offset (Outputs):
Set between 000 - 192
and m+3 = 0000
H
) than External Interrupt Tasks 11
(BCD)
Section 4-6
(BCD)
). If you
H

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents