06-07-2012 12:02 PM
I have no idea why you would attach a project file. A project file does not have any code. You already posted the original VI. If you made my suggested changes, then post that.
The pxi chassis should be irrelevant. Not sure about your desktop. Did you actually connect an error and path indicators?
06-07-2012 12:46 PM - edited 06-07-2012 12:51 PM
Attached herewith is the corrected code
The output filename displayed on the front panel is 'c:\ni-rt\LabVIEW Data\analogtestdata.tdms'. However, this path does not exist. I tried searching for this file 'analogtestdata.tdms' or 'analogtestdata.lvm' through the all computer and it says that the file does not exist.
I was thinking that may be it is saving the file on my pixie system and not my desktop. How can i access this file from there. My PC is currently connected to the pixie system using a crossover cable.
06-07-2012 02:31 PM
Does the path "c:\ni-rt\LabVIEW Data" actually exist? If a folder does not exist, the folder generally will not be created, and an error may (or may not) propagate up that the file could not be saved.
-Danny
06-07-2012 02:39 PM - edited 06-07-2012 02:42 PM
The path does not exist. I instructed it to save the data on 'C:\User\Documents\LabVIEW Data\analogtestdata.tdms' but its saving it on 'c:\ni-rt\LabVIEW Data\analogtestdata.tdms' which does not exist. What do you think might be the problem?
I even tried to create the path manually 'c:\ni-rt\LabVIEW Data' and run it again but the file (analogtestdata) is still not there.
Please Help.
06-07-2012 02:47 PM
On RT we don't have the same \User\Documents\... mechanism that Windows does. There's a different "mapping" for files onto the RT target, pretty much everything goes to c:\ni-rt\DIRECTORY or c:\ni-rt\system - this has historical meaning for systems that run on a dual-boot Windows/RT system, so that files saved under the RT context are all saved in an RT directory (only valid for Windows, but all current OS's follow this paradigm for the most part). If a target directory exists, then you'll get your target directory - if it does not exist, it is generally not created (unless using a VI that creates the target directory, which there are few of), and the files will attempt to be placed within the ni-rt structure if their ultimate target directories exist. If not, you're at the whim of whatever the OS decides to tell the upper layers, which may not be anything at all...
Before writing files to disk, it's always good to ensure the target path exists.
-Danny
06-07-2012 02:54 PM
Thanks for the info. So how do i ensure that all the data from my DAQ device is saved under this path 'C:\User\Documents\LabVIEW Data'??
I already changed it at 'Configure Write to Measurement File' but that didnt help.
06-07-2012 03:25 PM
First, never save files or paths using upper-case letters. This might be fine for a PXI system, but if you go to any other platform (especially VxWorks) the upper-case letters might cause major problems.
Secondly, I don't like to use the path-browsing mechanisms within express VIs - sometimes they like to add "smarts" to the path management and that gets a little weird when translated to RT. Expose the "Filename" path input and pass in a path constant or a path you've generated, don't let the Express VI handle path management for you.
Thirdly, make sure the path exists. Before passing a path into a file-saving VI, I like just passing the path+file string into "strip path.vi", then send the stripped path into "Check if File or Folder Exists.vi" and a "Create Folder.vi" if it does not already exist. This way, when the file is saved the path exists and everything should work as-is.
-Danny
06-07-2012 04:50 PM
Thanks. Is there a video or tutorial that explains how to use these VI's in detail?
06-08-2012 12:44 PM
Doubtful. NI generally only provides help documentation for VIs, not full tutorials and such. However, I'm sure that there are examples that use these express VIs, but I wouldn't know how to search for examples that contain these express VIs except if the help had links to examples that used them (many times the help does). However, remember that the help will be specific to Windows, not necessarily RT, and things like what we've discussed here would not usually be included.
-Danny