![Omron CJ1M-CPU21 Operation Manual Download Page 116](http://html1.mh-extra.com/html/omron/cj1m-cpu21/cj1m-cpu21_operation-manual_742493116.webp)
87
HIGH-SPEED COUNTER PV READ: PRV(881)
Section 5-2
Applicable Program Areas
Flags
Examples
■
Example 1
When CIO 000000 turns ON in the following programming example,
CTBL(882) registers a range comparison table for high-speed counter 0 and
starts comparison. When CIO 000001 turns ON, PRV(881) reads the range
comparison results at that time and stores them in CIO 0100.
■
Example 2
When CIO 000100 turns ON in the following programming example, PRV(881)
reads the frequency of the pulse being input to high-speed counter 0 at that
time and stores it as a hexadecimal value in D00200 and D00201.
Block program areas
Step program areas
Subroutines
Interrupt tasks
OK
OK
OK
OK
Name
Label
Operation
Error Flag
ER
ON if the specified range for P or C is exceeded.
ON if the combination of P and C is not allowed.
ON if reading range comparison results is specified even
though range comparison is not being executed.
ON if reading the output frequency is specified for any-
thing except for high-speed counter 0.
ON if specified for a port not set for a high-speed counter.
ON if executed for a port not set for an interrupt input in
counter mode.
@CTBL
#0000
#0001
D00100
000000
@PRV
#0010
#0002
0100
000001
Range comparison table
registration and comparison start
High-speed counter input 0
Read range comparison results
High-speed counter input 0
PRV
#0010
#0003
D00200
000100
High-speed counter input 0
Read input frequency
Summary of Contents for CJ1M-CPU21
Page 1: ...Cat No W395 E1 03 CJ series Built in I O CJ1M CPU21 22 23 CJ1M CPU Units...
Page 2: ...CJ series Built in I O CJ1M CPU21 22 23 CPU Units Operation Manual Revised August 2004...
Page 3: ...iv...
Page 19: ...xx...
Page 79: ...50 Wiring Examples Section 3 3...
Page 217: ...188 Origin Search and Origin Return Functions Section 6 3...
Page 220: ...191 Built in Outputs Section 7 1...
Page 247: ...218 Built in Outputs Section 7 1...
Page 251: ...222 Combinations of Pulse Control Instructions Appendix A...
Page 255: ...226 Using Pulse Instructions in other CPU Units Appendix B...
Page 263: ...234 Index...
Page 265: ...236 Revision History...