06-23-2023 07:39 AM
I am creating a general purpose test arrangement that has, amongst other things, 2 LIN ports from a USB-8506. To help users have confidence in the system, I want a self test mode, where the main connections to the DUT is replaced with a test harness. I would like this to include linking the two LIN ports to each other, and ensuring data is correctly communicated. Has anyone got code which already does this? I note How Do I Perform a Loopback Test with NI-XNET Device? - NI refers to a CAN loopback, but on my LabVIEW 2018 system, that example is not available.
I have the background to write something from scratch for this, but I can not see the point in re-inventing the wheel!
06-23-2023 07:47 AM
Look at the shipping examples for LIN XNet in the Help >> Find Examples. There are examples there on creating Frame Input and Frame Output sessions. For the Frame Output you will also have to designate that you are the master, and apply some kind of schedule which defines when frames go out. This can all be done editing the database that is in memory. I know there are examples of doing database editing but I'm unsure if it covers creating a schedule for LIN. In the worst case you can just make the database in the XNet Database Editor, then import that file and use it.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
06-23-2023 08:17 AM
There is an example of LIN loopback. If the examples are not available, you might want to try reinstalling XNET driver.
06-29-2023 01:57 AM
Updating/reinstalling on my 2018 LabVIEW failed to get me the examples. Looks like I will have to roll my own