07-24-2014 11:52 AM
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?
07-24-2014 12:02 PM
There is nothing to fix. Since your time points are equally spaced, t0 and dt are sufficient. Why waste memory on redundant information?
07-24-2014 12:03 PM
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.
07-24-2014 12:04 PM
That is correct. Any suggestion on how to turn the time array into a string so that i can send it to a file?
07-24-2014 12:05 PM
07-24-2014 12:05 PM
You can also try this:
http://zone.ni.com/reference/en-XX/help/371361K-01/lvwave/get_waveform_time_array/
07-24-2014 12:09 PM
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.
07-24-2014 12:12 PM
@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.
07-24-2014 12:40 PM
07-24-2014 12:49 PM
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.