FREQ_MEASURE (FB)ΒΆ
FUNCTION_BLOCK FREQ_MEASURE
Measures the frequency of a signal
- InOut:
- Scope - Name - Type - Initial - Comment - Input - IN- BOOL- Input signal - PERIODS- INT (1..10) - 1 - A period is the time between two rising edges of the input signal. - OUTwill equal the average frequency during the given- PERIODS(number of periods; minimal 1 maximal 10). The function block will not work unless this value is between 1 and 10.- RESET- BOOL- Reset measurement - Output - OUT- REAL- Frequency [Hz] - VALID- BOOL- FALSE: 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)