Ladder Program Example - Omron CP1H-CPU - 05-2006 Operation Manual

Cp1h cpu unit
Table of Contents

Advertisement

High-speed Counters
Encoders with Line Driver Outputs (Conforming to Am26LS31)
5-2-7

Ladder Program Example

Inspecting a Dimension by
Counting Pulse Inputs
216
Encoder
Example: E6B2-CWZ1X
(line-driver output)
Power supply
Encoder
Shielded twisted-pair cable
A+
A
B+
B
Z+
Z
• An X CP1H CPU Unit with an AC power supply is used.
• High-speed counter 0 is used.
• When the edge of the workpiece is detected, the counter PV is reset by a
phase-Z pulse.
• The workpiece is passes inspection if the final count is between 30,000
and 30,300, otherwise the workpiece fails.
• If the workpiece passes, output CIO 100.00 is turned ON by an interrupt
and the indicator PL1 is lit. If the workpiece fails, output CIO 100.01 is
turned ON by an interrupt and indicator PL2 is lit.
• The interrupt program is interrupt task 10.
Y CPU Unit
(Differential phase input mode)
A+
Black
A0+
(High-speed counter 0: Phase A, LD+)
Black
A
(stripped)
A0-
(High-speed counter 0: Phase A, LD-)
B+
White
B0+
(High-speed counter 0: Phase B, LD+)
White
B
(stripped)
B0-
(High-speed counter 0: Phase B, LD-)
Z+
Orange
Z0+
(High-speed counter 0: Phase Z, LD+)
Orange
Z
(stripped)
Z0-
(High-speed counter 0: Phase Z, LD-)
5-VDC power supply
5 VDC
Brown
+5 V
0 V
Blue
0 V
A0+
A0
B0+
B0
Z0+
Z0
Section 5-2
CPU Unit

Advertisement

Table of Contents
loading

Table of Contents