Customizing VeriStand Log File Names in a TestStand Workflow

Updated Jul 31, 2026

Reported In

Software

  • TestStand
  • VeriStand

Issue Details

I am using NI VeriStand and NI TestStand together, and the log file generated during execution uses the default NI VeriStand naming convention. I need the log file to follow a custom naming format, but I cannot modify the generated file name directly from TestStand. The log file continues to be saved with the default name even when logging is initiated as part of a TestStand sequence. How can I implement this?

Solution

ASAM XIL does not support modifying native NI VeriStand logging specifications or log file naming during execution. To apply a custom naming format, rename the generated log file after logging completes.
Use one of the following methods:
  • Rename the log file from a TestStand sequence.
    1. Allow NI VeriStand to complete logging using its default configuration.
    2. Add a step after the logging operation completes.
    3. Locate the generated log file in the configured logging directory.
    4. Execute a code module to rename the file.
  • Rename the log file using Python.
    1. Python script below that monitors the log file location.
      import os
      import time
      
      def check_and_rename_file(original_path, new_path,
                                timeout_sec=30,
                                poll_interval=0.5):
          """
          Waits for a file to exist at original_path,
          then renames it to new_path.
          Returns True if successful, False if timeout.
          """
      
          elapsed = 0
      
          while not os.path.exists(original_path):
              time.sleep(poll_interval)
              elapsed += poll_interval
      
              if elapsed >= timeout_sec:
                  return False
      
          try:
              os.rename(original_path, new_path)
              return True
      
          except Exception as e:
              print(f"Error renaming file: {e}")
              return False
    2. Check for the existence of the generated file.
    3. Apply a timeout to prevent indefinite execution.
    4. Rename the file after it is detected.
  • Rename the log file using LabVIEW.
    1. Create a VI that monitors the logging directory.
    2. Detect the generated log file after logging completes.
    3. Use file I/O functions to rename the file programmatically.

Additional Information

Data Logging options when using ASAM XIL steps for NI TestStand explains that ASAM XIL TestStand steps do not support direct data logging configuration. The article also states that VeriStand logging specification files and workspace logging controls do not provide automation APIs that can be controlled programmatically from TestStand. As a result, renaming the generated file after logging completes is the recommended approach when a custom file name is required.