• High-frequency Calculation Method: In this case, the counting method is switched at high and low
frequencies.
At high frequencies (above 1 kHz), the function counts the number of pulses within a fixed interval
(the sampling time) and calculates the frequency from that count. One of the following three sam-
pling times can be selected by setting the rightmost two digits of C.
Sampling time
10 ms
100 ms
1 s
At frequencies below 1 kHz, the Standard Calculation Method is used, regardless of the sampling
time setting.
The update period for the frequency is the same as the sampling time. Following characteristics for
changes in the frequency will deteriorate as the sampling time increases.
Precautions
If the counter is reset when P is 0010 hex (high-speed counter 0) and C is 0013, 0023, or 0033 hex
(sampling method for high frequency), the data read during the sampling time when the counter was
reset will not be dependable.
When this is performed for a CJ2M CPU Unit, the Carry Flag (P_CY) will turn ON when the PRV(881)
instruction is executed.
Example Programming
When CIO 0.00 turns ON in the following
programming example, CTBL(882) registers
a range comparison table for high-speed
counter 0 and starts comparison. When CIO
0.01 turns ON, PRV(881) reads the range
comparison results at that time and stores
them in CIO 0100.
When CIO 1.00 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 D200 and D201.
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Value of C
0013 hex
Counts the number of pulses every 10 ms. The error is 10% max. at 1 kHz.
0023 hex
Counts the number of pulses every 100 ms. The error is 1% max. at 1 kHz.
0033 hex
Counts the number of pulses every 1 s. The error is 0.1% max. at 1 kHz.
Description
0.00
@CTBL
High-speed counter input 0
#0000
Range comparison table
#0001
registration and comparison start
D100
0.01
@PRV
High-speed counter input 0
#0010
Read range comparison results
#0002
100
1.00
PRV
#0010
High-speed counter input 0
#0003
Read input frequency
D200
3. Instructions
3
741
Need help?
Do you have a question about the CJ - INSTRUCTIONS and is the answer not in the manual?