Getting Started With CarSim in NI VeriStand

Updated Mar 20, 2024

Environment

Software

  • VeriStand

Operating System

  • LabVIEW Real-Time (NI Linux Real-Time)

CarSim delivers the most accurate, detailed, and efficient methods for simulating the performance of passenger vehicles and light-duty trucks. It is used worldwide by hundreds of OEMs, Tier 1 suppliers, universities, and government research labs. CarSim has a standard interface to NI LabVIEW and VeriStand. This article takes VeriStand 2021 R3 and CarSim 2019.1 as examples to explain how you can use CarSim in NI VeriStand.

Prerequisites

Before reading this article, ensure that you are familiar with CarSim. For more details about CarSim training, please contact Mechanical Simulation.

Create CarSim project

Create an empty folder - CarSim project for example on the PC (The path of the folder can't include any Chinese characters). Open the CarSim, then click Browse for another database... to select the created folder. Ensure that the CarSim Solver for Linux-RT is in the License Settings.
1.PNG
2.PNG

Import NI RT model by File >> Import Parsfile (Any Export Type)...
3.PNG
Select CPAR file of NI-RT to import.
4.PNG

Install RT Solver

If this is your first time using CarSim on your Linux RT target, you should install the RT solvers to the target through Tools >> Install RT Solvers to Target...
7.PNG
Configure the following parameters. Target Computer Name or IP Address is the IP address of the Linux RT that you can find in the NI MAX. Login User ID and Login password are the user name and password of the Linux RT.
8.PNG
After the configuration, click Install. If the following error is triggered, you should create the above path /usr/CarSim/2019.1 on the Linux RT manually.
9.PNG
10.PNG
After the directory is created, repeat the steps of Install Vehicle Solvers to Target. Finally, it shows that RT solvers have been installed on the target.
11.PNG

Configure CarSim for NI VeriStand

Select Transfer to NI-RT Target in the drop-down list of Models.
12.PNG
Select LinuxRT: VeriStand - Baseline in the drop-down list of dataset selection.
13.PNG
Click Dataset - Linux RT: VeriStand - Baseline to do the configuration. The Freq. of Math model should align with the PCL of the Linux RT. Defining the import channels and export channels that you want to show in the VeriStand.
14.PNG
After the configuration, click Home back to the main page. Then click Build to create a so file for VeriStand. If the configuration is perfect, the following message shows. The vs_nivs.so file is located at the same path of the above VeriStand project file.
15.PNG
16.PNG
Click Send, then Open to open the  VeriStand project - CarSim.nivsproj. You should import the vs_nivs.so file to the Simulation Model if it is the first time you open the VeriStand project. Finally, you can deploy the VeriStand system definition file to run the CarSim.