Programmatically Rename a Log Filename in VeriStand

Updated Aug 1, 2022

Environment

Software

  • VeriStand
  • LabVIEW

Within a VeriStand project, data acquisitions can be logged into a TDMS file, which can be helpful for future data analysis. This article explains how to programmatically rename the filename for this log file under a customized scenario.

Following these steps, you will be able to create a log file in VeriSand and programmatically change its name integrating the application with LabVIEW.
  1. Create a project in VeriStand and a .TDMS file such as <pathname>/test.tdms. In the Stimulus Profile Editor, inside the main <Main>, create an RT-Sequence with Start Logging as described:
  • In Start Logging Configuration, select a name and a Path file, which will be the same as the one for the previously created.TDMS file;
  • In Channel Group, you can define the target to log, for this Knowledge Base Targets/Controller/System Channels/Delta T has been chosen; image.png 
  1. Open LabVIEW and create a VI which will operate by changing the filename of your log file:
  • For example, select <pathname>/test.tdms, create a copy, and rename it. You can customize this process as suits you for your application. Remember, to follow the Knowledge Base for Setting LabVIEW VIs to Open in Run Mode;
  1. Then going back to VeriStand, Add a Command Shell by clicking Steps >> Other >> Command Shell, pointing to the .BAT file which recalls the VI previously created in LabVIEW. Follow the Knowledge Base Run a VI from the Command Line, where the command  "C:\<path_to_LabVIEW>\LabVIEW.exe" "C:\Users\<Username>\<Path_to_VI>\myVI" is the one utilized in your .BAT file;​​​​​​
  2. In Command Shell settings, check Hide Command Prompt.

Following the described steps, it will be possible creating a log file <pathname>/test.tdms which will contain log data from VeriStand, and then programmatically customize the name as the user wishes to integrate LabVIEW.