Omron SYSMAC CS Series Instruction & Reference Manual page 695

Hide thumbs Also See for SYSMAC CS Series:
Table of Contents

Advertisement

When the CPU Unit is a CJ1M CPU Unit with unit version 3.0 or later or a CJ2M CPU Unit, there are
two ways to calculate the frequency of pulses input to high-speed counter 0.
• Standard Calculation Method (C1 = 0 00)
The count is calculated by counting each pulse regardless of the frequency. At high frequencies, the
rising or falling edges of some pulses will be corrupted, resulting in errors (about 1% error max. at
100 kHz).
• High-frequency Calculation Method
In this case, the counting method is switched at high and low frequencies. (Supported by CJ1M CPU
Units with unit version 3.0 or later or CJ2M CPU Units only)
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 sampling
times can be selected by the third digit of C1.
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.
 Converting Counter PV to Total Number of Revolutions (C1 = 0001 hex)
If C1 is 0001 hex, PRV2(883) calculates the cumulative number of revolutions from the counter PV and
pulses/revolution setting.
Conversion result = Counter PV ÷ Pulses/revolution
Precautions
If the counter is reset when C1 specifies frequency-rotational speed conversion for a 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 PRV2(883)
instruction is executed.
Example Programming
When CIO 1.00 is ON in the following
programming example, PRV2(883) reads the
present pulse frequency at high-speed
counter 0, converts that value to rotation
speed (r/min), and outputs the hexadecimal
result to D201 and D200.
When CIO 1.00 is ON in the following
programming example, PRV2(883) reads the
counter PV, converts that value to number of
revolutions, and outputs the hexadecimal
result to D301 and D300.
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Value of C1
0@10 hex
Counts the number of pulses every 10 ms. The error is 10% max. at 1 kHz.
0@20 hex
Counts the number of pulses every 100 ms. The error is 1% max. at 1 kHz.
0@30 hex
Counts the number of pulses every 1 s. The error is 0.1% max. at 1 kHz.
Description
1.00
PRV2
#0000
#0003
D200
1.00
PRV2
#0001
#0003
D300
3. Instructions
Converting frequency
to rotation speed
Pulses per revolution
Converting counter PV to
total number of revolutions
Pulses per revolution
661
3

Advertisement

Table of Contents
loading

Table of Contents