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: 

add time stamp array into first column of text file

I am writing daq output to a file by using array to spreadsheet string vi then write that to a file but I would like to add a time stamp array into the first column of the text file. How do I do this?
0 Kudos
Message 1 of 6
(6,688 Views)

When you use a DAQmx Read, you have the option of returning a waveform data type. This includes time data. If you were to use this and either Export Waveforms to Spreadsheet File or Write Measurement File, this would included. To stick with the regular Write to Spreadsheet File, you would have to create an array of timestamps yourself based on a start time and the sample rate of the DAQ. Then you would convert this and the data array to strings and use the string array type of Write to Spreadsheet instead of the DBL type.

Message Edited by Dennis Knutson on 09-25-2007 01:12 PM

0 Kudos
Message 2 of 6
(6,677 Views)
I guess my question is how to put the 2D data array into clumns in the text file starting from the second after converting it to spreadsheet string.
0 Kudos
Message 3 of 6
(6,666 Views)
Sorry, I don't understand what you mean. The Write to Spreadsheet File does place data in columns when you wire a 2D array to it. The Array to Spreadsheet String is inside the Write to Spreadsheet File. It would help if you posted your code to get an idea of what you need help with.
0 Kudos
Message 4 of 6
(6,660 Views)


@mchips wrote:
I guess my question is how to put the 2D data array into clumns in the text file starting from the second after converting it to spreadsheet string.



I think you re using LV 7.x. If so, please see the attached VI.
- Partha ( CLD until Oct 2024 🙂 )
0 Kudos
Message 5 of 6
(6,643 Views)
Thanks a lot!
0 Kudos
Message 6 of 6
(6,634 Views)