86
HIGH-SPEED COUNTER PV READ: PRV(881)
Section 5-2
■
Reading Pulse Output or High-speed Counter Frequency (C = 00
@
3 hex)
If C is 00
@
3 hex, PRV(881) reads the frequency being output from pulse out-
put 0 or 1 or the pulse frequency (Hz) being input to high-speed counter 0 and
stores it in D and D+1.
Frequency Ranges
Pulse Frequency Calculation Methods
When the CPU Unit is a CJ1M CPU Unit with unit version 3.0 or later, there
are two ways to calculate the frequency of pulses output from pulse output 0
or 1 or pulses input to high-speed counter 0.
1.
Standard Calculation Method (Earlier Method)
The count is calculated by counting each pulse regardless of the frequen-
cy. At high frequencies, the rising or falling edges of some pulses will be
corrupted, resulting in errors (roughly 1% error max. at 100 kHz).
2.
High-frequency Calculation Method
In this case, the counting method is switched at high and low frequencies.
• High-frequency counting
At high frequencies (above 1 kHz), the function counts the number of
pulses within a fixed interval (the sampling time) and calculates the fre-
quency from that count. One of the following three sampling times can
be selected by setting the third digit of C.
• Low-frequency counting
At frequencies below 1 kHz, the Standard Calculation Method is used,
regardless of the sampling time setting.
Variations
Value of C
Conversion result
0000 or 0001 hex
(Reading the frequency
of pulse output 0 or 1)
0000 0000 to 0001 86A0 hex (0 to 100,000)
0010 hex
(Reading the frequency
of high-speed counter
input 0)
Counter input method: Any input method other than 4
×
differential phase mode
Result = 00000000 to 000186A0 hex (0 to 100,000)
Note
If a frequency higher than 100 kHz has been input,
the output will remain at the maximum value of
000186A0 hex.
Counter input method: 4
×
differential phase mode
Result = 00000000 to 00030D40 hex (0 to 200,000)
Note
If a frequency higher than 200 kHz has been input,
the output will remain at the maximum value of
00030D40 hex.
Sampling time
Value of C
Description
10 ms
0013 hex
Counts the number of pulses every 10 ms.
The error is 10% max. at 1 kHz.
100 ms
0023 hex
Counts the number of pulses every 100 ms.
The error is 1% max. at 1 kHz.
1 s
0033 hex
Counts the number of pulses every 1 s. The
error is 0.1% max. at 1 kHz.
Variations
Executed Each Cycle for ON Condition
PRV(881)
Executed Once for Upward Differentiation
@PRV(881)
Executed Once for Downward Differentiation
Not supported
Immediate Refreshing Specification
Not supported
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...