02-26-2008 01:13 PM
02-26-2008 01:24 PM
Hi morsejl,
how do you measure your data? Which hardware do you use? With DAQmx you can measure a block of samples and calculate the timestamp for each sample out of the first one.
Mike
02-26-2008 02:17 PM
02-26-2008 02:21 PM
Hi morsejl,
if you use DAQmx you can use the read vi with following function: Analog -> single channel -> multiple samples -> waveform. If you do that you get a timestamp, all values and a dt. With the delta t and the timestamp (which is the time for the first value) you can calculate the timestamp for all other values.
Mike
02-26-2008 04:01 PM
10-23-2009 04:03 AM
Hi morsejl,
Do you have any examples of your work? I encountered the same problem as you and I need help badly.
Thanks a lot
10-26-2009 01:46 PM
Hello,
The post above regarding using a waveform is the best way to correlate data acquisition with times. You would need to use the Get Waveform Components VI to extract these. In the picture below, the Y output is the Amplitudes, t0 is the first timestamp, and dt is the change in time between each sample. The dt will remain constant and thus you can calculate your times by adding to the timestamp. Your other option would be to assume that the first sample is taken at time t=0 and then add to that time instead of the timestamp.
-Zach
10-26-2009 02:02 PM
iZACHdx wrote:Hello,
The post above regarding using a waveform is the best way to correlate data acquisition with times. You would need to use the Get Waveform Components VI to extract these. In the picture below, the Y output is the Amplitudes, t0 is the first timestamp, and dt is the change in time between each sample. The dt will remain constant and thus you can calculate your times by adding to the timestamp. Your other option would be to assume that the first sample is taken at time t=0 and then add to that time instead of the timestamp.
-Zach
The above illustrates the method I use most often. Note that if you are externally clocking the acquisition, you will have to use another approach.
Ben
10-27-2009 03:26 AM
Hi Zach,
Thanks for your reply.
If I have N channels and N samples acquisition, does this method still apply? Coz currently I have three channels to measure at the speed of 500 samples/s. The application needs to export each data with respective timestamp to a text or Excel file.
Regards,
Kid
10-27-2009 04:15 PM
Hello,
If you have multiple channels, the analog read returns an array of waveforms. You will have to index the array and then use the get waveform components as before. Using the t0 and dt for each waveform is redundant because they should all share the same timestamp and dt, but you get the idea. See below:
-Zach