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: 

write data\time string in a text file

Hello I have alittle problem. I need to write in a text file data acquired from an external instruments and the time (day, hour, month, secon) of acquisition for each point. I use write data to a spedsheet file, but I have a problem becouse I can't convert time\date (by means of get time\date string) in a number. (to use write data to a spedsheet file I should have all number and not string).
I need a file txt with two columns : in the fist time and in the second acquird data (the acquisition is in real time).
please help me.
Syncerely Mau
0 Kudos
Message 1 of 3
(2,355 Views)
Convert your numeric data to a string. The Write to Spreadsheet File in the latest version of LabVIEW can be optionally selected to write string data. Older versions of it have instructions on the block diagram on how to modify the function so that you can create a copy of the VI that will write a 1D or 2D array of strings.
0 Kudos
Message 2 of 3
(2,353 Views)

If your data are taken with the same time interval between each measurement, you can builda waveform and then use the function "Export waveforms to spreadsheet file.vi"; it allows you to store multiple waveforms in the same file. There is an example into the LabVIEW Example finder called "Export waveforms to spreadsheet file Example.vi".

Hope this helps,

Fabio

Fabio M.
NI
Principal Engineer
0 Kudos
Message 3 of 3
(2,328 Views)