10-05-2011 06:26 PM
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
10-06-2011 09:27 AM
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.
10-06-2011 03:50 PM
Thx Jarrod, this is very helpful. And Thx for spelling out the caveats also!
L.
10-06-2011 05:30 PM - edited 10-06-2011 05:38 PM
... 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.
10-06-2011 06:40 PM