Retain the DTC tables in non-volatile storage across power cycles.
None (Main library). (See Section 2.3, “Licensed Features”.)
The pdtc_Memory block stores the DTC table data in non-volatile memory. On start-up, the block attempts to retrieve the DTC table data prior to running the model. While the model is running, the time at which the DTC table is stored back to non-volatile memory is determined by the model itself.
The DTC table data is check-summed using a 16-bit CRC. Failure to match the check-sum against the table data on start-up means that the data cannot be recovered. In this case, DTC table data is reverted to the default start-up conditions for each type of DTC (see the pdtc_DiagnosticTroubleCode and pdtc_DiagnosticTroubleCodeExt blocks for specifics).
When an application is programmed onto the ECU, any pre-existing DTC data (and any related diagnostic information) are cleared if the model version number differs from what was previously programmed. However, if the model version number remains the same, and the total number of DTCs in the model also remains the same, then the pre-existing DTCs are retained. The model version number is specified through the put_Identification block.
This block is used to update the check-sum and write the DTC table data to non-volatile store. When the inport commit_dtcs is set to 1, the block pauses execution of the model, calculates the DTC table data check-sum, stores the DTC table data in non-volatile memory, then continues execution of the model.
When the block pauses the model execution, the length of pause depends on the store location. Storage in battery backed RAM will result in a short pause, storage to Flash will result in a longer pause.
Old DTC data is reused so long as it has the expected total data size and was written by an application with the same user-specified version number. Otherwise the values revert to defaults. If the usage of DTC blocks has changed in a new software version, increase the application sub-minor version number to ensure that any old values are not used, as they may not map appropriately to the blocks in the new model even if the total data size happens to match.
It is important to trigger the commit and not update any diagnostic trouble code thereafter before shutting down the ECU. If diagnostic trouble code data is modified after the check-sum has been updated, and the ECU shuts down, next time it powers up, diagnostic trouble code data will revert to default.
To ensure the check-sum is up to date before shutting down the ECU, the store_up_to_date outport provides an indication of whether the check-sum is correct or not. If not, shutdown of the module can be prevented (if conditions are appropriate) and the store updated (by setting the commit_dtcs inport to 1).
Simulation value for the outport store_up_to_date.
Range: 0 or 1
Value type: | Boolean | ||
Calibratable: | No |
Set to 1 to update the check-sum for the DTC tables and to write the result to non-volatile memory. Set to zero otherwise.
Range: 0 or 1
Value type: | Boolean | ||
Calibratable: | No |