Set the state and auxiliary data about a diagnostic trouble code.
None (Main library). (See Section 2.3, “Licensed Features”.)
A diagnostic trouble code (DTC) is a unique indicator used to remember the state of a fault. The model determines if the conditions for signalling the fault are satisfied or not, and passes this information to the pdtc_DiagnosticTroubleCode block. Whether the fault is active or not, is maintained by the block while the model is running and across power cycles (see the pdtc_Memory block for more details).
There is only one type of DTC at the moment, more may be added in the future.
The J1939 DTC maintains a fault state and a count of the how many times the DTC has become active. The J1939 DTC states follow this state diagram:
The DTC starts in the clear state (or whichever state was recalled from non-volatile memory during power up, see the pdtc_Memory block for more details), and remains in this state until the inport active becomes 1. The block then changes the DTC state to active and remains in this state until the inport active becomes zero. And so on.
Outwith this diagram pictured above, the DTC state can be forcefully set to clear through the use of the pdtc_ClearAll block, or pdtc_ClearAllIfActive block, or pdtc_ClearAllIfInactive block.
If the DTC cannot be recalled from non-volatile memory (which includes the first time the ECU is powered up), then the J1939 DTC is initialised as follows:
DTC information | Initial value |
---|---|
State | Clear |
Count | 0 |
Lamp malfunction | 3 |
Lamp red | 3 |
Lamp amber | 3 |
Lamp protect | 3 |
Set to 1 if the dtc is active, set to zero otherwise. Available only if the parameter DTC type is J1939 DTC.
Range: 0 or 1
Value type: | Boolean |
Set to desired lamp state (0 is Slow Flash, 1 is Fast Flash, 2 is On, 3 is Off). Available only if the parameter DTC type is J1939 DTC.
Range: [0, 3]
Value type: | Integer |
Set to desired lamp state (0 is Slow Flash, 1 is Fast Flash, 2 is On, 3 is Off). Available only if the parameter DTC type is J1939 DTC.
Range: [0, 3]
Value type: | Boolean |
Set to desired lamp state (0 is Slow Flash, 1 is Fast Flash, 2 is On, 3 is Off). Available only if the parameter DTC type is J1939 DTC.
Range: [0, 3]
Value type: | Boolean |
Set to desired lamp state (0 is Slow Flash, 1 is Fast Flash, 2 is On, 3 is Off). Available only if the parameter DTC type is J1939 DTC.
Range: [0, 3]
Value type: | Boolean |
Set to 1 if the dtc is in the active state, set to zero otherwise. Available only if the parameter DTC type is J1939 DTC.
Value type: | Boolean |
Set to the value of the current DTC state (see the DTC types descriptions for a list of states and values). Available only if the parameter DTC type is J1939 DTC.
Value type: | List |
A count of the number of times a DTC has changed to the active state. Available only if the parameter DTC type is J1939 DTC.
Range: [0, 127]
Value type: | Integer |
The name of the DTC table to store this DTC in (there must be a corresponding named table specified in a pdtc_Table block in the model).
Value type: | String | ||
Calibratable: | No |
A drop-down selection of the type of the DTC.
Value type: | List | ||
Calibratable: | No |
The value of the SPN for this DTC. The parameters Suspect parameter number, Failure mode indicator and Conversion method uniquely identify the DTC. Available only if the parameter DTC type is J1939 DTC.
Range: [0, 524287]
Value type: | Integer | ||
Calibratable: | No |
The value of the FMI for this DTC. The parameters Suspect parameter number, Failure mode indicator and Conversion method uniquely identify the DTC. Available only if the parameter DTC type is J1939 DTC.
Range: [0, 31]
Value type: | Integer | ||
Calibratable: | No |
The value of the CM for this DTC. The parameters Suspect parameter number, Failure mode indicator and Conversion method uniquely identify the DTC. Available only if the parameter DTC type is J1939 DTC.
Range: 0 or 1
Value type: | Integer | ||
Calibratable: | No |