185
SECTION 5
Basic CP1H Functions
This section describes the CP1H’s interrupt and high-speed counter functions.
5-1 Interrupt Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
5-1-1 Overview of CP1H Interrupt Functions . . . . . . . . . . . . . . . . . . . . . . 186
5-1-2 Input Interrupts (Direct Mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
5-1-3 Input Interrupts (Counter Mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
5-1-4 Scheduled Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
5-1-5 High-speed Counter Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
5-1-6 External Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
5-2 High-speed Counters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
5-2-1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
5-2-2 High-speed Counter Specifications . . . . . . . . . . . . . . . . . . . . . . . . . 211
5-2-3 Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
5-2-4 PLC Setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
5-2-5 High-speed Counter Terminal Allocation. . . . . . . . . . . . . . . . . . . . . 218
5-2-6 Pulse Input Connection Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 221
5-2-7 Ladder Program Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
5-2-8 Additional Capabilities and Restrictions . . . . . . . . . . . . . . . . . . . . . 225
5-3 Pulse Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
5-3-1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
5-3-2 Pulse Output Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
5-3-3 Pulse Output Terminal Allocations. . . . . . . . . . . . . . . . . . . . . . . . . . 234
5-3-4 Pulse Output Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
5-3-5 Origin Search and Origin Return Functions . . . . . . . . . . . . . . . . . . . 255
5-3-6 Origin Return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
5-3-7 Pulse Output Procedures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
5-3-8 Instructions used for Pulse Outputs . . . . . . . . . . . . . . . . . . . . . . . . . 279
5-3-9 Variable Duty Factor Pulse Outputs (PWM(891) Outputs) . . . . . . . 290
5-3-10 Example Pulse Output Applications. . . . . . . . . . . . . . . . . . . . . . . . . 291
5-4 Quick-response Inputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
5-5 Analog I/O (XA CPU Units). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325