5.1.47. Frequency input (pdx_FrequencyInput)

Output the last measured frequency.

5.1.47.1. Supported targets

All targets

5.1.47.2. Required license

None (Main library). (See Section 2.3, “Licensed Features”.)

5.1.47.3. Description

The frequency measurement block, measures the duration of each pulse in a pulse train from an input signal and determines the frequency of that pulse. The last measured frequency is provided as an outport.

If a frequency has not been measured (because a complete signal pulse has not yet occurred), then the corresponding frequency outport is clamped to zero.

If the input signal does not complete a pulse for longer than the block's timeout value, then the timed_out outport of the block is set. When a timeout occurs, the frequency outport remains at its last known value.

5.1.47.4. Inports

  • sim_timed_out

    Only used in simulation. Place 1 here to simulate a time out, 0 otherwise.

    Range: 0 or 1

    Value type:Boolean
  • sim_frequency

    Only used in simulation. Place the frequency in hertz here to simulate the last measured frequency. A measurement of zero hertz indicates that no measurement is available.

    Value type:Real

5.1.47.5. Outports

  • timed_out

    1 if the input signal has not completed a pulse within the mask parameter timeout period at the point of sampling (see the mask parameter section below), 0 otherwise.

    Range: 0 or 1

    Value type:Boolean
  • frequency

    The last measured frequency in hertz, or 0 if no measurement has been taken (regardless of the state of outport timed_out). The range of the frequency is limited in various ways.

    • The range of the frequency that can be measured is limited by the filter circuitry of the input pin.

    • The lowest measurable frequency is limited by the filter circuitry and the size of the corresponding processor timer for a channel. Any input frequency below the documented limit, is reported as timed-out.

    • The highest measurable frequency is limited by the filter circuitry and the resolution of the corresponding processor timer for a channel. In general, the block reports the frequency of the filtered signal and the input filtering forms an upper limit. However, as the frequency increases, the resolution of measurement decreases.

    Details of the input pin's filtering and processor timing can be found in an ECU's technical specification.

    Range: [0.5, ...] Hz (for all targets)

    Value type:Real

5.1.47.6. Mask parameters

  • Channel

    The input pin sourcing the signal to measure.

    Value type:List
    Calibratable:No
  • Time out

    The period of time in hertz after which if no complete pulse has been measured, the outport timed_out is set to 1.

    Range: [0.5, 10000] Hz (for all targets)

    Value type:Real
    Calibratable:Yes, offline and online
  • Sample time

    The periodicity of the block execution.

    Range: [0.001, 3600] seconds

    Value type:Real
    Calibratable:No
  • Provide simulation input?

    If selected then create simulation inports for each of the outport message signals.

    Value type:Boolean
    Calibratable:No

5.1.47.7. Notes

None.