01-11-2010 02:58 PM
01-11-2010 03:27 PM
First of all, the complexity of this problem (and if a solution is reasonably possible) is related to your sample rate. If you require 1ms precision then you are going to have a hard time with that and unbuffered software-timed hardware. What kind of delta-t between samples are we talking about here?
Secondly, you should consider using the Waveform datatype. The Waveform datatype is very easy to use, and allows for a timestamp for each data point (or a collection of evenly spaced datapoints where the first sample is timestamped).
As an example, I take data from a DAQmx device, and from a software timed USB thermocouple reader. What I do is take them all into the waveform datatype, and then I coerce the USB thermocouple reader data points to the time stamp of the DAQmx device. There timing is about the same, and I'm generally dealing with large dt's between samples (250-500ms typically). So if my temperature measurement comes in at T=900ms and my DAQmx device measurement comes int at T=1000ms, then the temperature measurement is recorded at T=1000ms. I do this by combining the two waveform arrays and using the "align time stamps" VI on the new waveform array.
This is very simplistic, and it can be because my application does not need the precision.
01-11-2010 03:47 PM
Good point, i knew I would forget to mention something.
I would love to get data as quickly as possible, I plan on sampling the hardware timed data at 1khz, and then interleaving the software timed data into it. The software timed data loops I have running as quickly and efficiently as possible but I doubt i'm getting better than 200hz out of them when the cpu is really loaded.
thanks for the waveform idea -
jacob
01-11-2010 03:59 PM
jacob,
If it is practical to do so, create or use a signal which is common to both the hardware and software timed acquisitions. This becomes a synchronizing signal.
For example if your position sensing devices have a once per revolution pulse, feed that to an unused analog input channel on your hardware timed device as well as recording it through the software timed system. You can then align the data to that pulse.
Lynn
01-11-2010 08:00 PM