LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time stamp for all data points in waveform issue

Hello all,

 

I am currently using a producer consumer loop to gather waveform data at 3302 S/s and 1000 samples per channel.  In the consumer loop i  am getting the waveform component for time, but the issue is that i only get one time stamp per 1000 samples.

 

Any ideas on how to fix this?



-Matt
0 Kudos
Message 1 of 15
(2,996 Views)

There is nothing to fix. Since your time points are equally spaced, t0 and dt are sufficient. Why waste memory on redundant information?

0 Kudos
Message 2 of 15
(2,988 Views)

Get Waveform Time Array.vi will give you a time stamp for each sample. The time stamp that you get from a waveform is the time that the first sample is taken. The second sample will be at t0+dt, the third at t0+2dt and so on.

0 Kudos
Message 3 of 15
(2,986 Views)

That is correct.  Any suggestion on how to turn the time array into a string so that i can send it to a file?



-Matt
0 Kudos
Message 4 of 15
(2,982 Views)
A waveform data type is supposed to have a single timestamp - the t0 or the start time. It also includes the dt or delta time (time between samples). So, you have all of the information and there is nothing to 'fix'.
0 Kudos
Message 5 of 15
(2,981 Views)

Use the waveform property Xscale.Multiplier and set to the number of samples per sec and use Xscale.Offset to put the start time of data aqusition in time as seconds.

0 Kudos
Message 7 of 15
(2,971 Views)

@matt198717 wrote:

That is correct.  Any suggestion on how to turn the time array into a string so that i can send it to a file?


In the Timing pallet, "Get Date/Time String" and "Format Date/Time String" will turn it into a string. Your file will get very large very quickly and won't contain very much useful data. t0, dt, and Number of Samples would be sufficient in a text file to represent (in your case) a thousand lines of text. 

 

I recomend looking into TDMS files. They are very good at storing waveform data.

0 Kudos
Message 8 of 15
(2,968 Views)
Use the waveform property Xscale.Multiplier and set to the number of samples per sec and use Xscale.Offset to put the start time of data aqusition in time as seconds.

Dave,

What does the question have to do with your answer?
0 Kudos
Message 9 of 15
(2,945 Views)

okay,

 

maybe trying to get the time stamp in absolute time is just a bad path to take.  I basically would like to be able to store the time stamp with the data collected and with a header and column headers, then be able to open it in excel.  I can use the write to text file option well and the write to measurement file vi., but im not very good with any other methods. 

 

Would trying to use the easy excel table be the next best option.  I tried writing to using tdms, but i just get numbers and symbols when i open the file in excel.

 



-Matt
0 Kudos
Message 10 of 15
(2,936 Views)