01-05-2015 11:44 PM
Hi everyone,
I write my temperature data to tdms using DAQ and pc. At the end of the day the VI is set to close the tdms and create a new one after midnight.
I want to copy the saved tdms files from previous days across to my usb drive but the VI would not let me do it or even open any tdms file while it is running. I want to have uninterrupted data acquisition while being able to have a look at data collected previously. Is there any way to access or transfer tdms files without stopping data AQ VI?
Thanks,
01-07-2015 08:48 AM
It sounds like you are using DAQmx to automate logging to the TDMS file. Is that correct? If so, you will need to stop acquisition before opening the file in any way, including changing its position on disc (such as moving it to your flash drive).
There is no way to access or transfer any kind of file while LabVIEW (or any other application for that matter) has is open. This is the same issue as trying to open or move an Excel spreadsheet while it is already open in Excel, which would also cause an error. Since LabVIEW is writing to the TDMS file, another application, or even another instance of LabVIEW code cannot access the file.
You have a couple of options:
1) You could view the TDMS data in LabVIEW while the acquisition is occurring using a front panel control.
2) You could perform the TDMS datalogging separately from the data acquisition. Perhaps in a producer consumer design pattern (http://www.ni.com/white-paper/3023/en/). This would allow you to continue acquisition but pause logging while you view the file. While the file is open, you could continue logging to a temporary file. When you are done viewing the file, you would then append the contents of the temporary file to the end of the original TDMS file.
01-07-2015 10:23 AM - edited 01-07-2015 10:32 AM
can you open a closed tdms file in Excel while the program is running?
I can open any closed TDMS file in excel whileI have a labview program running.
01-08-2015 07:50 AM
You can open a TDMS file at any time, as long as another program (such as LabVIEW) does not have it open.
01-08-2015 10:26 PM
Thank you all for your replies, it seems like it was a temporarily problem with labview. I can now open any tdms file and even the file currently being written by my VI.
07-07-2015 08:05 PM
I have the same problem about openning the TDMS file while the VI is running. How did you solve it?