09-01-2011 02:26 PM
Hi guys,
I am able to save data from Labview in a tdms file. I want to overwrite the data each time I do a run. I would like to have a way to click a button on labview that will automatically save that run into a tdms file instead of me opening up the tdms file and saving the data for that run.That just takes time.
Thanks.
-Sicelo
09-01-2011 02:29 PM
@Sicelo wrote:
Hi guys,
I am able to save data from Labview in a tdms file. I want to overwrite the data each time I do a run. I would like to have a way to click a button on labview that will automatically save that run into a tdms file instead of me opening up the tdms file and saving the data for that run.That just takes time.
Thanks.
-Sicelo
What do you mean by "instead of me opening up the tdms file and saving the data for that run"? You mean you are getting a dialog box? If you wire in a path constant, you won't have that issue.
Post some code so we can see what you mean.
09-01-2011 03:53 PM
I guess my question is not clear enough.
I have attached the block diagram. Here is what I would like to do: I would like to have a button on the front panel which when I click will automatically save the data to a file I specify after I hit the stop button.
Here is what is happening right now. The data is being saved automatically whenever I run the vi. The "Write to Measurement File" function is configured in such a way that the data is saved in tdms format continuosly whenever the vi is running. I am overwriting the data in the file to prevent having so many individual files. But I would like to run the vi and decide to save it if I like the data it outputs rather than have me have to open the tdms file which is not connected to any icons in Labview to save the data.
Hope my question is clear now.
Many thanks.
-Sicelo
09-01-2011 05:03 PM - edited 09-01-2011 05:06 PM
The Write To Measurement File express VI has an input for the filename. Create a file path constant or control and wire that to the filename input. Edit the Action section and select Save to one file and what to do if the file exists. If you post the VI I would be able to tell what your settings are
09-02-2011 01:13 AM
Put the Write to Measurment file inside a case structure.
Have you taken the online LabVIEW tutorials?
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours
09-02-2011 01:51 PM
I understand what you told me but I am still not satisfied. Is there a way to click Save on the front panel of the VI and have a window pop up that asks you where you want to save your data rather than have the data be saved automatically?
Thanks
-Sicelo
09-02-2011 01:55 PM
You can put the write to measurement file in an event structure.
09-02-2011 02:31 PM
Thanks.
Can somehow summarize briefly for me how I can use the event structure to help me save data when I click on a button?
-Sicelo
09-02-2011 02:54 PM - edited 09-02-2011 02:57 PM
Create event structure.
Add a timeout time to top of event structure (not shown in attachment)
Right click on border
choose add event
Choose you control
choose value change
Or see attachment.