183
SECTION 5
Basic CP1H Functions
This section describes the CP1H’s interrupt and high-speed counter functions.
5-1 Interrupt Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
5-1-1 Overview of CP1H Interrupt Functions . . . . . . . . . . . . . . . . . . . . . . 184
5-1-2 Input Interrupts (Direct Mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
5-1-3 Input Interrupts (Counter Mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
5-1-4 Scheduled Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
5-1-5 High-speed Counter Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
5-1-6 External Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
5-2 High-speed Counters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
5-2-1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
5-2-2 High-speed Counter Specifications . . . . . . . . . . . . . . . . . . . . . . . . . 209
5-2-3 Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
5-2-4 PLC Setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
5-2-5 High-speed Counter Terminal Allocation. . . . . . . . . . . . . . . . . . . . . 216
5-2-6 Pulse Input Connection Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 219
5-2-7 Ladder Program Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
5-2-8 Additional Capabilities and Restrictions . . . . . . . . . . . . . . . . . . . . . 223
5-3 Pulse Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
5-3-1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
5-3-2 Pulse Output Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
5-3-3 Pulse Output Terminal Allocations. . . . . . . . . . . . . . . . . . . . . . . . . . 232
5-3-4 Pulse Output Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
5-3-5 Origin Search and Origin Return Functions . . . . . . . . . . . . . . . . . . . 253
5-3-6 Origin Return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
5-3-7 Pulse Output Procedures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
5-3-8 Instructions used for Pulse Outputs . . . . . . . . . . . . . . . . . . . . . . . . . 276
5-3-9 Variable Duty Factor Pulse Outputs (PWM(891) Outputs) . . . . . . . 287
5-3-10 Example Pulse Output Applications. . . . . . . . . . . . . . . . . . . . . . . . . 288
5-4 Quick-response Inputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
5-5 Analog I/O (XA CPU Units). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323