VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Viewer from Workspace loses track of previous file

I set a real time sequence to generate a stimulus and log the test data. When done, I click on the Data Viewer button on the Workspace to look at the data. Everytime the viewer opens, the previous file location is lost and I have to navigate back to the file... very annoying.

 

Is there a way to have the Data Viewer recall the previous file location ? Can this be programed in the Stimulus Profile Editor?

 

Thx

L

0 Kudos
Message 1 of 5
(5,826 Views)

The behavior that the TDMS File Viewer currently has is to always look for log files in the Log folder specified by the environment. The default location of this Log folder is next to the active VeriStand Project. However, you can change that location to be anywhere you like. To change the default location of the Log folder, go to the Tools >> Options dialog in VeriStand and select the Utility File Paths Category. The first file path is called logs. You'll see the value is <Project>\Logs. The <Project> symbol means the currently active VeriStand project folder. You can change this folder to be anything you want. For instance, you can make it c:\temp\my Logs. Now the TDMS File Viewer will always start looking for log files in that new location.

 

Alternatively, there's a little trick you can do from a Stimulus Profile to automatically have the TDMS File Viewer open up a specific file by sending it messages. The attached example is meant to be used with the Sinewave Delay shipping example project. It starts a log file, runs a sine wave sequence, then stops the log file. After that, it programmatically opens the TDMS File Viewer tool and sends it a message to load the file that was just logged.

 

This is a neat trick, but it has two caveats:

 

CAVEAT #1: This requires you to know the path to the TDMS File Viewer tool, which is inside the VeriStand EXE file itself. This works for 2011, but that location may change. We are thinking of ways to handle this better in the future.

CAVEAT #2: To send the OPEN message to the TDMS File Viewer, you need to know the exact full path of the log file. So this trick won't work well if you are doing timestamped data logging, or logging to a relative folder location.

 

OpenFile.PNG

Jarrod S.
National Instruments
0 Kudos
Message 2 of 5
(5,811 Views)

Thx Jarrod, this is very helpful. And Thx for spelling out the caveats also! 

L.

0 Kudos
Message 3 of 5
(5,802 Views)

... but yes, having the filename as a parameters is actually a pain...  Can the filename be passed via the LabVIEW API? 

 

and... well... my system returns and error saying: 

 

"C:\Program Files\National Instruments\VeriStand 2011\VeriStand.exe\NI VeriStand\Workspace\Tools\scr_TDMS Data Viewer.vi" does not exist.

 

L.

0 Kudos
Message 4 of 5
(5,794 Views)
Yes, you can automate the TDMS tool the same way from the LabVIEW APIs. The Stimulus Profile Editor uses the exact same APIs that are available from LabVIEW. Look in the NI VeriStand Execution palette for the Project menu. There you'll see some functions to automate Workspace Tools that have the same parameters as the stimulus profile steps.

As to the error: check the path to VeriStand.exe is correct on your machine. Especially on a 64-bit OS it might be different.

However, if you're already in LV, thee is a much easier way to view TDMS files programmatically. Search the TDMS File IO palette for a VI called TDMS File Viewer.vi. That VI very closely resembles the tool we ship, and can be called directly as a VI from LV. Probably the best and easiest solution for you.
Jarrod S.
National Instruments
0 Kudos
Message 5 of 5
(5,787 Views)