Can I Automatically Deploy Dependencies to a System in VeriStand?

Updated Jan 25, 2023

Reported In

Software

  • VeriStand

Issue Details

I have several test dependencies that I need to push to a real-time target before I can deploy my system definition in VeriStand. Is there a way VeriStand can automate this process for me?

Solution

There are several ways to automate moving files to a VeriStand target. This document mentions several ways to automatically include dependencies, but we will only focus on the simplest method. Depvs files can be used to keep track of dependencies that need to be deployed along with a model, such as initial parameters or log files.

.depvs file

A depvs file is a tab-delimited file that contains the names and paths of dependencies for a model you have added to VeriStand. You can create them in a text editor like Notepad or Notepad++. The depvs file must be stored next to the model that is added to your system definition file. Within the file, there are two entries for each dependency. The first describes the current location of the dependency on the development computer. The second entry begins after a tab on the same line as a first entry, and outlines the location of the dependency when it is deployed to the target. These dependency entries can either be relative or absolute. 
Note that you will need to use the corresponding file check the table below for some examples. Take a look at the table below for a reference of the file directories to the VeriStand Models on the NI RT targets
 
File Directories for RT targets
Operating SystemFile Path
PharLapC:\\ni-rt\\NI VeriStand\\Models\\yourfile.txt
NI Linux Real-Time/c/ni-rt/NIVeriStand/Models/yourfile.txt
VxWorksC:\\ni-rt\\NI VeriStand\\Models\\yourfile.txt

For Linux, if you want to go back a level in the file hierarchy (for example to add your dependency to a different location) you can prefix the location with  "../".
For example, ../../../../usr/local/natinst/labview/example.txt places your file in usr/local/natinst/labview folder rather than c/ni-rt/NIVeriStand/Models/

An example of a depvs file is attached to this KB.
 

Custom Devices

You can use a custom device to deploy dependencies to a RT target by calling Action VIs where appropriate. Specifically you can use the onDownload or onCompile actions.
 

LabVIEW

You can use LabVIEW's ftp functions in conjuction with the workspace API (to control the deployment and start of the system) to automatically include dependencies. 
 

TestStand

If you are automating your testing, you can write a custom VI step for TestStand to call to deploy all the necessary files. Using this method, you will have more control over the deployed files.

Additional Information

The files listed in the devps file do not need to be a dependency of a particular VeriStand model for this method to successfully move the files to and from your Real-Time Target. For example, if you constantly need to move a file to a target, you can use this devps method to make sure your files remain updated. 

Attachments