![background image](http://html1.mh-extra.com/html/omron/sysmac-cs1d-cpu/sysmac-cs1d-cpu_reference-manual_742268917.webp)
878
High-speed Counter/Pulse Output Instructions
Section 3-21
(If a frequency higher than 100 kHz has been input, the output will re-
main at the maximum value of 000186A0 hex.)
• Counter input method: 4
×
differential phase mode
Conversion result = 00000000 to 00030D40 hex (0 to 200,000)
(If a frequency higher than 200 kHz has been input, the output will re-
main at the maximum value of 00030D40 hex.)
2.
Frequency Calculation Method
When the CPU Unit is a CJ1M CPU Unit with version number 3.0 or later,
there are two ways to calculate the frequency of pulses input to high-speed
counter 0.
a) Standard Calculation Method (C1 = 0
@
00)
The count is calculated by counting each pulse regardless of the fre-
quency. At high frequencies, the rising or falling edges of some pulses
will be corrupted, resulting in errors (about 1% error max. at 100 kHz).
b)
High-frequency Calculation Method
In this case, the counting method is switched at high and low frequen-
cies. (Supported by CJM1 CPU Unit Ver. 3.0 or later only)
• High-frequency counting (C1 = 0
@
10, 0
@
20, or 0
@
30)
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 the third digit of C1.
• Low-frequency counting
At frequencies below 1 kHz, the Standard Calculation Method is used,
regardless of the sampling time setting.
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
Flags
Examples
■
Example 1
When CIO 000100 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 D00201
and D00200.
Sampling time Value of C1
Description
10 ms
0
@
10 hex
Counts the number of pulses every 10 ms.
The error is 10% max. at 1 kHz.
100 ms
0
@
20 hex
Counts the number of pulses every 100 ms.
The error is 1% max. at 1 kHz.
1 s
0
@
30 hex
Counts the number of pulses every 1 s. The
error is 0.1% max. at 1 kHz.
Name
Label
Operation
Error Flag
ER
ON if high-speed counter 0 is disabled in the settings.
ON if C1 is not in the specified range (0000 or 0001).
ON if the pulses/revolution setting in C2 is 0000.
Содержание SYSMAC CS1D-CPU**
Страница 3: ...iv...
Страница 29: ...xxx...
Страница 185: ...146 List of Instructions by Function Code Section 2 4...
Страница 193: ...154 3 35 4 MOVE BIT MOVBC 568 1274 3 35 5 BIT COUNTER BCNTC 621 1276 3 35 6 GET VARIABLE ID GETID 286 1278...
Страница 1389: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2...
Страница 1390: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits...
Страница 1391: ...1352 ASCII Code Table Appendix A...