5.1.67. Non-volatile adaptive scalar (pnv_AdaptiveScalar)

Non-volatile adaptive scalar block.

5.1.67.1. Supported targets

All targets

5.1.67.2. Required license

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

5.1.67.3. Description

The adaptive scalar block is similar to the standard constant block provided by Simulink, except that the constant can change over time under control of the model and be recovered from non-volatile memory when the model starts. If the value cannot be recovered at start-up, or if the model is simulated, the default values are used before any adaption takes place.

The target non-volatile memory is provided in two ways: either through storage that requires an external power source when the ECU is powered down (battery backed RAM storage), or not (Flash storage). See the technical specification for details on which storage type is supported by each target.

The battery backed non-volatile memory requires a small amount of power overall, i.e., much less than powering the ECU normally.

The adaptive data is check-summed using a 16-bit CRC. Failure to match the check-sums on start-up means that the data cannot be recovered. In this case, or if the model is simulated, adaptive data is reverted to the default value specified when the model was built.

5.1.67.4. Inports

  • adapt_increment

    The increment to the current adapted value. The increment is only used when the inports adapt and reset are conditioned correctly.

    Value type:Real
    Calibratable:No
  • adapt

    1 if the current adapted value should be adjusted, 0 otherwise. If the inport reset is 1, no adaption will occur (even if inport adapt is 1).

    Range: 0 or 1

    Value type:Boolean
    Calibratable:No
  • reset

    1 if the current adapted value should be reset to Adaptive Scalar (default), 0 otherwise.

    Range: 0 or 1

    Value type:Boolean
    Calibratable:No

5.1.67.5. Outports

5.1.67.6. Mask parameters

  • Adaptive Scalar (default)

    The name of the default adapted scalar output value (e.g., vftc_myscalar). The adaptive block reverts to this value when the reset inport is asserted or when the block data is unrecoverable during power initialisation of the ECU.

    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

5.1.67.7. Notes

  • The build process generates a corresponding ASAP2 entry to the adaptive parameter that can be accessed via a calibration tool. The name of this entry has a fifth character 'a', i.e., given the default parameter name vftc_myscalar, an ASAP2 entry with name vftca_myscalar is generated. Note that this implies that only a single adaptable value can exist per named default parameter.

Warning

If two or more blocks refer to the same named item in the Adaptive Scalar (default) field, these blocks will independently adapt the same adaptive parameter.