338
Interrupt Functions
Section 6-1
Ladder Program
Examples
Example 1: High-speed
Counter (Linear Mode)
In this example, high-speed counter 0 operates in linear mode and starts
interrupt task 10 when the PV reaches 30,000 (0000 7530 hex).
1,2,3...
1.
Set high-speed counter 0 in the PLC Setup’s Built-in Input Tab.
2.
Set the target-value comparison table in words D10000 to D10003.
3.
Create the program for interrupt task 10. Always put an END(001) instruc-
tion at the program’s last address.
4.
Use CTBL(882) to start the comparison operation with high-speed counter
0 and interrupt task 10.
5.
Operation
When execution condition W0.00 goes ON, the comparison starts with
high-speed counter 0.
When the PV of high speed counter 0 reaches 30,000, cyclic task process-
ing is interrupted, and interrupt task 10 is processed. When interrupt task
10 processing is completed, processing of the interrupted cyclic task re-
sumes.
Item
Setting
High-speed counter 0
Use counter
Counting mode
Linear mode
Circular Max. Count
---
Reset method
Software reset
Input Setting
Up/Down inputs
Word
Setting
Function
D10000
#0001
Number of target values = 1
D10001
#7530
Rightmost 4 digits of the target value 1 data Target value =
30,000
(0000 7530 hex)
D10002
#0000
Leftmost 4 digits of the target value 1 data
D10003
#000A
Bit 15: 0 (incrementing)
Bits 0 to 7: A hex (interrupt task number 10)
W0.00
CTBL(882)
# 0000
# 0000
D100 00
Use high-speed counter 0.
First comparison table word
Register a target-value comparison table and
start comparison operation.
Summary of Contents for CP1L-L14D Series
Page 2: ...CP1L L14D CP1L L20D CP1L M30D CP1L M40D CP1L CPU Unit Operation Manual Revised June 2007...
Page 3: ...iv...
Page 9: ...x...
Page 13: ...xiv TABLE OF CONTENTS...
Page 21: ...xxii...
Page 33: ...xxxiv Conformance to EC Directives 6...
Page 65: ...32 Function Blocks Section 1 5...
Page 153: ...120 CP CPM1A series Expansion I O Unit Wiring Section 3 6...
Page 523: ...490 Troubleshooting Unit Errors Section 9 4...
Page 531: ...498 Replacing User serviceable Parts Section 10 2...
Page 563: ...530 Auxiliary Area Allocations by Function Appendix C...
Page 611: ...578 Auxiliary Area Allocations by Address Appendix D...
Page 638: ...605 Connections to Serial Communications Option Boards Appendix F Connecting to Unit...
Page 639: ...606 Connections to Serial Communications Option Boards Appendix F...
Page 669: ...636 Index...
Page 671: ...638 Revision History...