How To Loopback Test LIN Communication Using VeriStand

Updated Nov 14, 2024

Environment

Software

  • VeriStand

Driver

  • NI-XNET

This tutorial shows how to conduct a LIN interface device loopback test in VeriStand.

To perform a loopback test on your LIN interface device, follow these instructions:

  1. Connect the 2 ports of your LIN device together by using an appropriate cable.
  2. Create a blank VeriStand Project and open the system definition file.
  3. Set up the VeriStand project correctly to your target controller.
  4. Right click on the LIN and select Add LIN Port.

add port.PNG

  1. Add NI-XNET example database file as shown below:

add db.PNG

  1. Expand the LIN Port 1 >> Outgoing. Right-click Unconditional and select Import Frames.

add frame.PNG

  1. In this tutorial, LIN 1 will be used as master. Select Master1 for the ECU option and select the MasterFrame1 and MasterFrame2 under XNET frames.

select frame.PNG

  1. Expand the LIN Port 1 >> Incoming. Right-click Single-Point and select Import Frames.

add frame-input.PNG

  1. In this tutorial, LIN 1 will be used as master. Select Master1 for the ECU option and select Slave1Frame1 and Slave1Frame2 under the XNET frames.

00.PNG

  1. Repeat step 4 until step 9 to add second LIN port(the slave). Take note that in step 7 and 9, the ECU selection in the import NI-XNET frames should be change to Slave1 to filter frames selection.
  2. Configure the default LIN Scheduler in LIN 1.

schedule.PNG 

    1. Select the LIN 1 >> Port and checked the Is Master?.

    1. After complete the steps above, your VeriStand system definition file should show similar as below:

    1. Save it and deploy the project. You should able to monitor the signal from the VeriStand screen or using NI-XNET bus monitor.