Library
RT-EVENTS Signal Attributes
Block
Description
The RTE Frequency Meter block measures the frequency and the duty cycle of its input signals. The duty cycle is the ratio of the time where the signal in High (Ton) on the signal period.
The frequency and the duty cycle output signals can be measured between consecutive rising edges or consecutive falling edges. When the rising edge is selected, the measurement starts and ends on the rising edge. However, when the falling edge is selected, the measurement starts and ends on the falling edge. The measurement between consecutive parameter allows selecting one of these two modes.
The minimum frequency parameter is used when the inputs signal is at a very low frequency. When the block does not detect edges since a time greater than the specified period, the frequency and the duty cycles are set to zero.
When the frequency of the input signal is lower than the minimum frequency parameter and the state of the input changes between Low or High value, the value of the duty cycle change between 0 and 1 only if the input signal stays in the same state for a time longer than the minimum frequency.
Moreover, depending on the Edge type for detection of minimum frequency parameter and measurement between consecutive parameters, the reference time tx where the inactive period start to be calculated is different:
- When the edge type for a detection parameter is either, the reference time is fixed at the time of the last event of any type (rising or falling).
- When the edge type for detection is automatic and the measurement is performed between rising edge, the reference time is fixed at the time of the last rising edge.
- When the edge type for detection is automatic and the measurement is performed between falling edge, the reference time is fixed at the time of the last falling edge.
In some systems, this behavior can cause a problem. The RTE Period Meter block has a different algorithm to treat the duty cycle when the frequency is lower than the minimum frequency.
Mask
Parameters
Measurement between consecutive | Determines if the period and frequency outputs are measured between the consecutive rising or falling edges. |
---|---|
Initial duty cycle | Determines the initial value of the duty cycle. When automatic is selected, the block selects automatically the value depending on the current state (Low or High) of the input signals. Otherwise, the initial duty cycle is 0 or 1. |
Minimum frequency | When the input signal frequency is lower than this value, the frequency is 0 and the duty cycle is set to 0 or 1 depending on the current state (Low or High) of the input signal. |
Edge type for detection of minimum frequency | Determines the edge type to be used to calculate if the minimum frequency condition has been reached. When either is selected, the inactive period is calculated since the last event occurs (rising or falling). When automatic is selected, the type of edge used to calculate the inactive period depends on the measurement between consecutive parameters. If rising is selected, the measurement is calculated since the last rising edge. If falling is selected, the measurement is calculated since the last falling edge. |
Input
Input (RTE Boolean) | RTE Boolean signals to measure. |
---|
Output
Frequency (Double) | Signal frequencies in Hz. |
---|---|
Duty Cycle (Double) | The duty cycle in the range: [0..1]. |
Characteristics
Direct Feedthrough | Yes |
---|---|
Sample time | Inherited and fixed discrete. |
Work Offline | Yes |
Dimensionalized | Yes |
Examples
None