General programming model, General programming model -3 – National Instruments CAN 372139B-01 User Manual

Page 25

Advertising
background image

Chapter 4

Using the Automotive Diagnostic Command Set

© National Instruments Corporation

4-3

Automotive Diagnostic Command Set User Manual

General Programming Model

First, you must open a diagnostic communication link. This involves
initializing the CAN port and defining communication parameters such as
the baud rate and CAN identifiers on which the diagnostic communication
takes place. No actual communication to the ECU takes place at this stage.

For the VW TP 2.0, you then must establish a communication channel to
the ECU using the VWTP Connect routine. The communication channel
properties are negotiated between the host and ECU.

After these steps, the diagnostic communication is established, and you can
execute diagnostic services of your choice. Note that for the VW TP 2.0,
you must execute the VWTP ConnectionTest routine periodically (once per
second) to keep the communication channel open.

VW TP?

VW TP?

Done?

VW TP?

Yes

No

Yes

Yes

No

No

No

Yes

Open Diagnostic

VWTP Connect

Execute a

Diagnostic Service

Periodically Execute

VWTP ConnectionTest

VWTP Disconnect

Close Diagnostic

Advertising