Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

LIN Diagnostic with NI-XNET issues

Hello Ryany, 

 

thanks a lot!

 

I was able to send diagnostic frames with the C examples that came by the product's CD.

 

I have the exact LDF file as you have but the transmitted frames (MasterReq) don't have a delay of 10ms between them (end of 1 frame wrt start second frame). This delay is stated in the LDF (MasterReq delay 10 ms)

 

I also tried to set this with the "nxPropSession_IntfLINDiagSTmin" (10ms) but the frames don't have this delay.

 

You've experienced this before? 

 

Thanks for the help!

0 Kudos
Message 11 of 20
(5,287 Views)

Hi Kevin,

 

could you please post your code, this is exactly what I'm looking for.

 

Thanks in advance.

 

Madottati

0 Kudos
Message 12 of 20
(5,057 Views)

Hello XNET'er,

 

I tried to program the LIN Diagnostics on the way Kevin mentioned. The 0x3C Frame will be transmitted properly, as I can see the LIN signal on the oscilloscope. After changing the schedule to Slave Response, I see only the sync frame, but the ID 0x3D won't be transmitted.

 

I created the database also programmatically, as proposed in Kevin's post. My ECU has a NAD = 0xFA.

 

Attached you can find my sources. Could you please review it and tell me why the 0x3D ID won't be transmitted?

 

Another question. In the "Frames to write" control I entered the entire payload, as it should be sent to the LIN bus: 08 FA 02 10 60 00 00 00 00. But in my oppinion, the PCI-8516 should already know the NAD (defined in the CreateDatabaseForLINDiag.vi), and the length of the diagnostic command should be also known. So theoretically I should just define the payload as 0x10 0x60. The rest should be automatically done by the card - or XNET.

 

I'm using LabVIEW 2014.

 

Madottati

0 Kudos
Message 13 of 20
(5,052 Views)

I only have LabView 2013 installed, can you post screenshots of your VI's block diagrams?

0 Kudos
Message 14 of 20
(5,039 Views)

Hi,

 

attached in LV2013. In the meanwhile it is working. If I send the Start Diagnostics request only once, the ECU doesn't respond. If I do it twice, it answers. But I still don't understand, why I have to manually enter the diagnostics overhead (NAD, number of bytes) manually in the payload. If everything is configured, XNET should know what to send.

 

 

0 Kudos
Message 15 of 20
(5,032 Views)

Previous versions of XNET LIN did not have that ECU configuration thing, and sessions were only for frames or signals. I'm not aware of XNET actually supporting the transport protocol for diagnostics, but they may just be in the process of adding it. Perhaps your ECU doesn't respond to one request, because it is waking up or maybe the header is only getting sent after the second call to the vi or maybe that xnet read call doesn't get the data back the first call. You should check with an oscilloscope for what is happening. My method is to use the frame in stream to get the diagnostic request and the diagnostic response frames.

0 Kudos
Message 16 of 20
(5,027 Views)

the Automotive Diagnostic Command Set supports since 1.2 LIN Diagnostic as well. Before developing this on your own I recommend to try out ADCS, yoou can download it as 30 day trial from here

 

http://www.ni.com/download/automotive-diagnostic-command-set-for-ni-can-14.0/4865/en/

0 Kudos
Message 17 of 20
(5,025 Views)

It is not necessary in the version 14.0 to create an additional Frame Input Stream to chech whether the frame has been sent. For this you can use the XNET Wait (Transmit Complete).vi.

 

The Automotive Diagnostic Command Set is already installed on my PC for evaluation. Basically it is working, but for a simple UDS session I don't see the necessity to buy this addon for 1000€.

 

A question regarding ADCS. Are the diagnostic functions running on the PCI/PXI/USB cards (on-board), or are these cards only physical interfaces, and the diagnostic software runs on the PC? To be more concrete, if I set up a "Tester Present" frame to be sent every 1000ms, will it be done on the card itself, or is it done by the dll of the ADCS?

 

There are other hardware provider for LIN and CAN, where you configure the diagnostics once, but the crucial part of the communication process is done on that hardware, not by the PC.

0 Kudos
Message 18 of 20
(5,010 Views)
You only need one frame input stream to see any activity on the bus. Xnet wait has existed for a while. Instead of needing a frame session for any frame you might be interested in, you can use the input stream to receive anything.
0 Kudos
Message 19 of 20
(5,000 Views)

Hello,

 

Can someone help me to find Daig On LIN example under CVI please ? 

Examples installed with CVI2013 are not really usefull. I need a simple example that send and recieve Diag LIN frames.

 

Thank you in advance 

0 Kudos
Message 20 of 20
(4,109 Views)