DM1: How to Detail in a Trace Window the DTC According to J1939-73

Question:
DM1: How can I correctly display the 19 bit long SPN?
Answer:
J1939-73 defines the DTC with different fields:

In particular the SPN is a 19 bits field (16 first bits for standard values + 3 bits for proprietary values) that have to be transmitted on CAN as following:

To observe on CAN the DTC details and get the 19 bits SPN correctly displayed in Trace as it is in the DTC Monitor please use the following method:

Method:

Define in the dbc the DTC as a 32-Bit Signal with Signal Attribute SigType=DTC like indicated below. You will then be able to see the different fields of the DTC in Trace. In CAPL you will have to use bit operations to manually get the 19 bits long SPN out of the 32 bits.

This method is for instance used in the dbc out of the J1939SystemDemo.cfg Sample Configuration of your CANoe/CANalyzer installation.



Article ID: 767
Last updated: 2019-03-04
Revision: 1
CANalyzer/CANoe -> Options -> J1939 -> DM1: How to Detail in a Trace Window the DTC According to J1939-73
https://kb.vector.com/entry/767/