MeasurementEngine
 
Component MeasurementEngine
MeasurementEngine
Component Level: Low
Events:
(Events are call-back functions called when an important event occurrs. Please see the Embedded Components page for more information.)
  • EventModule - Name of the user module (without extension), where the events from this component are placed.
  • OnConvComplete - This event is called after a A/D conversion is finished. This event must be used together with ADC_GetMeasuredValue method to achieve proper event handling, otherwise the event will be invoked all the time. ADC_GetConvCompleteStatus method can be used to read A/D conversion status.
    This event is enabled only if ADC int. service/event property is enabled.

      ANSIC prototype: void OnConvComplete(void)
    • Priority - OnConvComplete priority. For details see description below of the page.

  • OnPeriodEnd - This event is called if trigger counter overflows. Time of the overflow is specified in TOD period (PDB period respectively) property.
    • TOD - This event is called when the counter reaches value in TOD Match register. It marks triggering of A/D conversion in ADC module.
      This event is enabled only if Trigger int. service/event property in TOD module group is enabled.
    • PDB - This event is called when the counter reaches value in PDB Modulus register.
      This event is enabled only if Trigger int. service/event property in PDB module group is enabled.
      • Configuration 1: Value in PDB period property is the same as value in a Delay property - this event marks triggering of appropriate A/D conversion in ADC module.
      • Configuration 2: Value in PDB period property is greater than the greatest value in a Delay property (including proper time gap for A/D conversion) - this event marks end of measurement.

      ANSIC prototype: void OnPeriodEnd(void)
    • Priority - OnPeriodEnd priority. For details see description below of the page.

  • OnDACBuffUpdRequest - This event is intended to DAC buffer update. It is invoked according to condition set in OnDACBuffUpdRequest event property. This event is enabled only if DAC module is set to 'Used in Dynamic configuration' and DAC int. service/event property is enabled.

      ANSIC prototype: void OnDACBuffUpdRequest(void)
    • Priority - OnDACBuffUpdRequest priority. Default value is based on the interrupt priority defined in property DAC interrupt priority. For details see description below of the page.


For each generated event it is possible to set: