National Instruments 372139B-01 Automobile User Manual


 
Chapter 6 Automotive Diagnostic Command Set API for C
© National Instruments Corporation 6-25 Automotive Diagnostic Command Set User Manual
Description
ndOBDOpen opens a diagnostic communication channel to an ECU for OBD-II. The CAN
port specified as input is initialized, and a handle to it is stored (among other internal data)
into the
diagRefOut struct, which serves as reference for further diagnostic functions.
If the
transmitID and receiveID parameters are set to –1, communication is first tried on
the default 11-bit OBD CAN identifiers; if that fails, the default 29-bit OBD CAN identifiers
are tried. If that also fails, an error is returned.
If valid
transmitID or receiveID parameters (11-bit or 29-bit with bit 29 set) are given,
communication is tried on these identifiers. If that fails, an error is returned.
In general, it is not necessary to manipulate the
diagRefOut struct contents.