National Instruments 372139B-01 Automobile User Manual


 
Chapter 4 Using the Automotive Diagnostic Command Set
Automotive Diagnostic Command Set User Manual 4-2 ni.com
The Automotive Diagnostic Command Set is structured into three layers of
functionality:
The top layer implements three sets of diagnostic services for the
diagnostic protocols KWP2000, UDS (DiagOnCAN), and OBD
(On-Board Diagnostics).
The second layer implements general routines involving opening and
closing diagnostic communication connections, connecting and
disconnecting to/from an ECU, and executing a diagnostic service on
byte level. The latter routine is the one the top layer uses heavily.
The third layer implements the transport protocols needed for
diagnostic communication to an ECU. The second layer uses these
routines to communicate to an ECU.
All three top layers are fully implemented in LabVIEW.
The transport protocols then execute CAN Read/Write operations through
a specialized DLL for streamlining the CAN data flow, especially in higher
busload situations.
Automotive Diagnostic Command Set API Structure
The top two layer routines are available as API functions. Each diagnostic
service for KWP2000, UDS, and OBD is available as one routine. Also
available on the top level are auxiliary routines for converting scaled
physical data values to and from their binary representations used in the
diagnostic services.
On the second layer are more general routines for opening and closing
diagnostic communication channels and executing a diagnostic service.
Auxiliary routines create the diagnostic CAN identifiers from the logical
ECU address.