LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Kvaser LIN Application

Finally!!!  I've finally found a way to read from my slave device using the Kvaser Leaf for LIN  I have a slave device that works with VSPY software, but for the life of me I coudn't get it working with LabVIEW even with the provided Kvaser examples.  Their examples just didn't seem to apply to my application.  I finally cracked the code.

 

I hope this helps just one person as this took me forever to figure out.

 

The original code had me transmitting my message with my header and then transmitting my second header and then reading.  It turns out you need to put a receive msg vi after the first transmit and a second receive message after the request message vi with 20ms delays between each.

 

Wrong Approach:

Write Message -> Request Message -> 20ms Delay ->Read Message

 

Correct Approach:

Write Message -> 20ms Delay -> Read Message -> Request Message -> 20ms Delay ->Read Message

 

If anyone has any questions I'll be sure to assist in any way I can.

 

VI is attached.

 

Regards,

 

-Nick

 

 

 

 

0 Kudos
Message 1 of 2
(2,622 Views)

Here are the Kvaser LIN library files in case you don't have them.

 

 

0 Kudos
Message 2 of 2
(2,587 Views)