Function Reference 157
imc CANSAS Users Manual - Doc. Version 1.9 - 05.12.2014© 2014 imc Meßsysteme GmbH
4.10.29 Frequency determination (only for DI16 modules)
Channel for which a frequency is to be determined
The following input ranges can be set:
30 Hz
60 Hz
125 Hz
250 Hz
400 Hz
800 Hz
2 kHz
4 kHz
Clock pulse rate of results channel
Results of frequency determination
Description: Determines a signal frequency for the digital input signal. The function's action is a
combination of event counting and time measuring. An event is a transition from 0 to 1 (nonzero), i.e., a
positive edge. During a sampling interval the events occurring as well as the time between the first and
last occurrence are measured. The frequency is computed as the number of events divided by the time
between the first and last complete event within the interval. An event is completed when the positive
edge is succeeded by a subsequent positive edge. In order for a frequency to be determined, then, at
least two complete events must be located within the interval.
If the frequency determined exceeds the input range, the result value is set to the specified input range's
endpoint.
If no frequency can be determined for a result clock pulse interval, the last frequency result is repeated.
If multiple frequencies are determined during one result clock pulse interval, the most recent result is
returned.
Notes: The input range and the module's sampling rate influence the precision of the frequency
measurement. Only digital input channels are allowed.
The input channel's sampling rate may only be 0.1 ms, 0.2 ms, 0.5 ms or 1 ms. The higher the sampling
rate is, the more exactly the frequency can be determined.
For the most precise frequency measurements, use the incremental encoder module INC4.
Data types: