LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

LIN diagnostic testing

LIN diagnostic testing

I am getting a status = -1074388925 response from the ndOpenDiagnostic() function.

Am I missing something? Should I be using “ndOpenDiagnosticOnLIN()” function ? but I get -8008 when I use it.

 

Using the following:

LabWindows 2015

USB-8476 LIN interface device

Automotive Diagnostic Command Set -  revision 16

Code:

#define MasterRequestFrame  ""  // "" takes the default value "MasterReq"

#define SlaveResponseFrame   ""  // "" takes the default value "SlaveResp"

TD1 DiagStruct = {0,0,0,0,0,0};

WriteData[0] =  0x62;          

WriteData[1] =  0x03;      

WriteData[2] =  0x22;      

WriteData[3] =  0x01;                       

WriteData[4] =   0x00;       

WriteData[5] =   0xFF;                      

WriteData[6] =   0xFF;     

WriteData[7] =   0xFF;                                                                                   

status = ndOpenDiagnostic (“LIN0”, 10417, 0, 0x3c, 0x3d, &DiagStruct);

status = -1074388925

//status = ndOpenDiagnosticOnLIN (“LIN0”, 10417, 0x62, MasterRequestFrame, SlaveResponseFrame, &DiagStruct);

//ndStartDiagnosticSession           ?????

  status2 = ndDiagnosticService (&DiagStruct, 1, &WriteData, word_size, &ReadData, size_word);

0 Kudos
Message 1 of 3
(2,552 Views)

Hi, Dennisatwork!

 

Took me a while to track down the details for error -1074388925:

 

The CAN Object name is invalid or unknown.  Solutions: Verify that you are using the

syntax specified in the NI-CAN documentation.

 

I am looking at page 280 of the Automotive Diagnostic Command Set API for C manual.

 

Automotive Diagnostic Command Set User Manual

http://www.ni.com/pdf/manuals/372139g.pdf

 

I recommend reading the details under Input for ndOpenDiagnostic as well as ndOpenDiagnosticOnLIN.

 

Check your first arguments (CANInterface) of both these functions, make sure they match/are configured correctly in NI MAX. I see that you tried using LIN0 for the first argument of ndOpenDiagnostic, that is not correct according to the manual.

0 Kudos
Message 2 of 3
(2,526 Views)

the USB-8476 device is not XNET compatible and ADCS needs XNET.

0 Kudos
Message 3 of 3
(2,512 Views)