|Download Help (Windows Only)|
Opens a diagnostic session on an NI-XNET LIN port. Communication to the ECU is not yet started.
|Interface specifies the LIN interface on which the diagnostic communication should take place, and points to the corresponding database cluster. The values for the XNET hardware interface names are LIN1, LIN2, and so on.|
The Automotive Diagnostic Command Set supports NI-XNET LIN devices for LIN communication only. To use your NI-XNET interface, define your interface under NI-XNET Devices in MAX and pass the NI-XNET interface name that the Automotive Diagnostic Command Set will use. To do this, add @nixnet to the protocol string (for example, LIN1@nixnet). The interface name is related to the NI-XNET hardware naming under Devices and Interfaces in MAX.
The Automotive Diagnostic Command Set requires valid assignments to a LIN database such as LDF or FIBEX. To communicate with hardware products on the external network, applications must understand how that hardware communicates in the actual embedded system, such as the vehicle. This embedded communication is described within a standardized file, such as FIBEX (.xml) or LDF (.ldf) for LIN. Within NI-XNET, this file is referred to as a database. The database contains many object classes, each of which describes a distinct entity in the embedded system.
For LIN, select a LIN database and cluster to assign all settings from the selected cluster automatically, such as the LIN Baudrate, Master Request Frame, Slave Response Frame, or LIN Diagnostic Schedule.
Using NI-XNET hardware, the Interface string should look like the following examples:
|MasterReqFrame selects the Master Request Frame from an LDF or FIBEX database. If you assign an empty string (default) as MasterReqFrame, the name as defined in the LIN MasterReq standard is used.|
|SlaveRespFrame selects the Slave Response Frame from an LDF or FIBEX database. If you assign an empty string (default) as SlaveRespFrame, the name as defined in the LIN SlaveResp standard is used.|
|Baud Rate is the diagnostic communication baud rate. The default is –1, which reuses the baudrate of the selected LIN cluster from the assigned FIBEX or LDF database. To change the baudrate from the database, select a valid LIN baudrate.|
|NAD is the address of the slave node being addressed in a request. NAD also indicates the source of a response. NAD values are 1–127 (0x7F), while 0 (zero) and 128 (0x80)–255 (0xFF) are reserved for other purposes.|
|error in is a cluster that describes error conditions occurring before the VI executes. If an error has already occurred, the VI returns the value of the error in cluster to error out.
|Diag Ref Out is a cluster containing all necessary information about the diagnostic session. Wire this output as a handle to all subsequent diagnostic VIs, and close it using Close Diagnostic.vi.|
|error out describes error conditions. If the error in cluster indicated an error, the error out cluster contains the same information. Otherwise, error out describes the error status of this VI.
Open Diagnostic on LIN.vi opens a diagnostic LIN communication channel to an ECU. The LIN port specified as input is initialized, and a handle to it is stored (among other internal data) in the diag ref out cluster, which serves as reference for further diagnostic functions.
A possible example of selections for the interface parameter for the NI-XNET hardware targets is:
|Note No communication to the ECU takes place at this point. To open a diagnostic session on the ECU, call StartDiagnosticSession.vi or UDS DiagnosticSessionControl.vi. Open Diagnostic on LIN.vi supports only NI-XNET LIN hardware. A valid LIN cluster of a LDF or FIBEX database must be assigned also.|