From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I save my data from my DAQmx to a file with date and time?

Solved!
Go to solution

Hello everyone,

I have developed my VI in LabVIEW 8.6 to make temperature acquisition using my daq board USB-6221. Well, the VI is running alright but when I press the button to save a txt file it's launches a dialog box to choose the path to save the file, depending the time you have delayed to choose a path to create it the first data are saved with wrong date and time. I believe the temperature data are correct (I guess these data were storaged in the daq buffer and after I have clicked OK to save the file it is appended to this file), but the date and time doesn't change in this period. Look the example below.

I have looked some examples in here, but some VIs do the same thing. Is this a DAQ board configuration error?

 

Thank you.

 

Diego

 

0 Kudos
Message 1 of 6
(5,216 Views)
Solution
Accepted by topic author DiegoSV

Alright, I found one solution putting up a timer inside the loop. This timer avoid saving wrong data, but the first value after I've already pushed the save button is saved on txt file.

Thanks.

Diego 

0 Kudos
Message 2 of 6
(5,131 Views)

Hi

 

You can use TDMS file format to save the data. I have attached a reference Vi.

On button click you can log the data or remove the case structure and continuous log the complete acquisition data.

 

Thanks and Regards

Himanshu Goyal

Thanks and Regards
Himanshu Goyal | LabVIEW Engineer- Power System Automation
Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
It Only gets BETTER!!!
Message 3 of 6
(5,121 Views)

Hi Himanshu,

 

Could post your VI in the latest version (8.6)? Thank you.

 

Regards.

0 Kudos
Message 4 of 6
(5,096 Views)

Hi

 

Please find the attached older version VI.

Thanks and Regards
Himanshu Goyal | LabVIEW Engineer- Power System Automation
Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
It Only gets BETTER!!!
0 Kudos
Message 5 of 6
(5,082 Views)

Thanks Hinamanshu. I´ve ran the VI here and have worked fine.

Sorry about the late response!

0 Kudos
Message 6 of 6
(5,057 Views)