This function block will measure the average frequency of an input signal over a defined number of periods. The function block being able to return a correct result it has to be called with a frequency higher than the maximum frequency of the input signal.
xEnable |
BOOL |
reset (see CAA Guidelines) |
xInput |
BOOL |
input signal |
usiPeriods |
USINT(1..10) |
number of time periods the frequency shall be averaged in ( |
lrFrequency |
LREAL |
averaged frequency ( in Hz) |
xValid |
BOOL |
validity of result; will be set to FALSE, if the required number of time periods has not yet been passed or if the distance in time of two raising edges exceeds 3*lrFrequency |