2. Programming Concepts
Frequency Detection Function
M1357-M1359, D1056-D1059, D1246-D1247
Contents:
1. The special M devices and the Special D devices which are related to the frequency detection
function are listed below.
Pulse input
Enabling the
frequency detection
Showing the input frequency
(Unit: 0.001Hz)
X0 M1357 D1056/D1057 (32 bits)
2. The minimum input frequency which can be detected by the function is 0.5Hz (K500), the
maximum input frequency which can be detected by the function is 1KHz (K1000000). If the
input frequency is less than 0.5Hz, or there is no pulse input for more than 2 seconds, the
value in the corresponding special D device will automatically become 0. If the input frequency
exceeds 1KHz, the PLC will continue catch the input frequency. If the input frequency exceeds
the hardware specifications for the input, the PLC will not be able to catch the input frequency.
3. If the frequency detection function is disabled (the special M device is Off), the last value which
is stored in the special D device will be retained.
4. If the input frequency is less than 100Hz, the error will be less than one ten thousandth. If the
input frequency exceeds 100Hz, the error will become bigger, but the maximum error will not
exceed one one thousandth.
5. Difference between the frequency detection function and SPD: The frequency detection
function is mainly used to detect the frequencies less than 1KHz, and is used in the application
environments which need high precision (unit: 0.001Hz). For example, the frequency detection
function can be used to monitor the output frequency of a generator.
6. After the frequency detection function is enabled, the other functions of the input will not be
enabled. (For example, the external interrupt or SPD will not be enabled after the frequency
detection function is enabled.)
7. DVP-ES2/EX2 series PLCs (exclusive of DVP-ES2-E series PLCs) whose firmware version is
3.22 (or above), ES2-C (V3.68), SA2 (V3.02) and DVP-SX2 (V2.66) or later versions support
this function.
8. Example: Detecting X0’s input frequency
Program in the PLC:
DMOV K0 D1056
M0
M0
M1357
DMOV K0 D1056
M0
M0
M1357
If X0’ s input frequency is 50Hz, the 32-bit value in (D1057, D1056) will be K50000.