EasyManua.ls Logo

Omron CP - PROGRAMMING MANUAL 05-2007 - Page 237

Omron CP - PROGRAMMING MANUAL 05-2007
1175 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
204
Timer and Counter Instructions Section 3-5
Clock Pulse and CNT Instruction
In this example, a CNT instruction counts the pulses from the 1-s clock pulse
to make a 700-second timer.
If the First Cycle Flag (A200.11) is ORed with the counter’s reset input
(CIO 0.01), the counter’s PV will be reset to the SV (0700) when program exe-
cution begins rather than resuming the count from the previous PV.
Example 2:
Two-stage Counter
When an SV higher than 9999 is required, two counters can be combined as
shown in the following example. In this case, two CNT instructions are com-
bined to make a BCD counter with an SV of 20,000.
0.00
0.01
A200.11
C0001
000000 LD 0.00
000001 AND 1 s
000002 LD NOT 0.01
000005 LD
#700
C0001
000006 OUT 200.02
000004 CNT 0001
#700
200.02
000003 OR A200.11
Instruction OperandsAddress
P_1 s (1-s clock)
000000 LD 0.00
000001 AND 0.01
000002 LD NOT 0.02
000003 OR C0001
000004 OR C0002
000005 CNT 0001
#100
000006 LD C0001
000007 LD NOT 0.02
000008 CNT 0002
#200
000009 LD C0002
000010 OUT 200.03
0.00 0.01
0.02
#100
0.02
#200
200.03
Instruction OperandsAddress

Table of Contents

Related product manuals