Ndvwtpconnectiontest, Ndvwtpconnectiontest -34 – National Instruments CAN 372139B-01 User Manual

Page 198

Advertising
background image

Chapter 6

Automotive Diagnostic Command Set API for C

Automotive Diagnostic Command Set User Manual

6-34

ni.com

ndVWTPConnectionTest

Purpose

Maintains a connection channel to an ECU using the VW TP 2.0.

Format

long ndVWTPConnectionTest(

TD1 *diagRef);

Input

diagRef

Specifies the diagnostic session handle, obtained from

ndOpenDiagnostic

and passed

to subsequent diagnostic functions. Normally, it is not necessary to manually manipulate
the elements of this struct.

Output

Return Value

The return value indicates the function call status as a signed 32-bit integer. Zero means the
function executed successfully. A negative value specifies an error, which means the function
did not perform the expected behavior. A positive value specifies a warning, which means the
function performed as expected, but a condition arose that may require attention.

Use the

ndStatusToString

function to obtain a descriptive string for the return value.

Description

For the VW TP 2.0, you must periodically maintain the connection link to the ECU, so that
the ECU does not terminate it. You must execute this periodic refresh at least once per second.

This function sends a Connection Test message to the ECU and evaluates its response,
performing the necessary steps to maintain the connection.

There is no equivalent for the ISO TP (ISO 15765-2), as the ISO TP does not use a special
communication link.

Advertising