5.1.68. Non-volatile adaptive array (pnv_Array)

Adaptive array non-volatile storage.

5.1.68.1. Supported targets

All targets

5.1.68.2. Required license

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

5.1.68.3. Description

Sets outport u' to the value of the adapted array indexed by inport n. Before outport u is set, the value of indexed adapted array can be changed to inport u.

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.68.4. Inports

  • n

    The nth element in the array to modify.

    Range: [0, number of elements in array - 1]

    Value type:Integer
    Calibratable:No
  • u

    The value to write to the nth element of the array. The type of this inport is the same as the type of the parameter Array Data (default).

    Value type:Real
    Calibratable:No
  • change

    1 if the nth element of the array should be change to inport u, 0 otherwise. If the inport reset is 1, no change will occur (even if inport change is 1).

    Range: 0 or 1

    Value type:Boolean
    Calibratable:No
  • reset

    1 to change the array to the values of the Array Data (default) parameter, 0 otherwise.

    Range: 0 or 1

    Value type:Boolean
    Calibratable:No

5.1.68.5. Outports

  • valid_n

    1 if inport n refers to an element in the array, 0 if inport n is larger than the number of array elements.

    Value type:Boolean
    Calibratable:No
  • u'

    The value of the nth element of the array, possibly after the array has been changed. The type of this outport is the same as the type of the parameter Array Data (default).

    Value type:Real
    Calibratable:No
  • whole_array

    The current values of all elements of the array, possibly after the array has been changed, output as a vector. The type of this outport is the same as the type of the parameter Array Data (default). This outport is only present when the Output entire array contents? mask parameter checkbox is ticked.

    Value type:Dynamically Typed
    Calibratable:No

5.1.68.6. Mask parameters

  • Array Data (default)

    The name of the DDE for the array (e.g. vftv_array, see Section "Naming rules"). An array can contain one or more elements. The type of the array dictates the type of inport u and outport u'.

    Value type:Real
    Calibratable:Yes, offline and online
  • Output entire array contents?

    Tick this checkbox to create an outport from the block to output the entire array contents.

    Value type:Boolean
    Calibratable:No
  • Sample time

    The periodicity of the block execution.

    Range: [0.001, 3600] seconds

    Value type:Real
    Calibratable:No

5.1.68.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 vtfv_array, an ASAP2 entry with name vtfva_array is generated. Note that this implies that only a single adaptive parameter can exist per named default parameter.

    Warning

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