7 High-speed Counters
7-18
CJ2M CPU Unit Pulse I/O Module User’s Manual
z Reading the High-speed Counter Frequency with a PRV(881) Instruction
Precautions for Correct UsePrecautions for Correct Use
The frequency measurement function can be used with high-speed counter 0 only.
z Specifications
* If the frequency exceeds the maximum value, the maximum value will be stored.
The rotational speed (rotations) or the total number of rotations can be measured.
• Measuring the Rotational Speed
The speed in r/min is calculated from the pulse frequency and the set number of pulses per rotation.
Execute the PRV2(883) instruction and specify converting the frequency to a rotational speed.
• Measuring the Total Rotations
The total number of rotations is calculated from the counter's PV and the set number of pulses per
rotation. Execute the PRV2(883) instruction and specify converting the counter's PV to the total num-
ber of revolutions.
z PRV2(883) (PULSE FREQUENCY CONVERT) Instruction
• Measuring the Rotational Speed
Item Description
Number of frequency
measurement inputs
1 input (high-speed counter 0 only)
Frequency measure-
ment range
Differential phase input: 0 to 50 kHz*
All other input modes: 0 to 100 kHz*
Measurement method Execution of the PRV(881) instruction
Stored data Unit Hz
Output
data range
Differential phase input: 0000 0000 to 0003 0D40 hex
All other input modes: 0000 0000 to 0001 86A0 hex
7-2-6 Measuring the Rotational Speed or Total Rotations
@PRV
#0010
#0013
D100
15 0
D100
D101
Present frequency
data upper bytes
Execution condition
P: Port specifier (always high-speed counter input 0)
C: Control data for reading frequency (10-ms sampling)
D: First destination word
Present frequency
data lower bytes
High-speed counter frequency that was read
Execution condition
@PRV2
#0000
#03E8
D100
C2: Pulses per revolution, Example: 1,000 pulses (03E8 hex)
D: First destination word
D100
Conversion result
(lower word)
D101
Conversion result
(upper word)
Rotational speed that was read (r/min)
C1: Control data, Example: Rotational speed r/min,
converting frequency to rotational speed