08-21-2017 11:54 AM
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
08-21-2017 02:35 PM
Here are the Kvaser LIN library files in case you don't have them.