FREQ_MEASURE (FB)¶
FUNCTION_BLOCK FREQ_MEASURE
Measures the frequency of a signal
- InOut:
Scope
Name
Type
Initial
Comment
Input
INBOOLInput signal
PERIODSINT (1..10)
1
A period is the time between two rising edges of the input signal.
OUTwill equal the average frequency during the givenPERIODS(number of periods; minimal 1 maximal 10). The function block will not work unless this value is between 1 and 10.RESETBOOLReset measurement
Output
OUTREALFrequency [Hz]
VALIDBOOLFALSE: As long as the first measure has been finished. Or time distance between two rising edges >3 * OUT. (Indicates that something is wrong with the inputs)