Hello,
I recently started a similar thread on the Dynamic Signal Acquisition board
here.
I was referred to your messages. I'm trying to sample analog voltage
from accelerometers simultaneously with an angular encoder signal. It
seems very similar to your application Vipul, except I want to sample
both signals at a fixed rate. However, I'm not having much luck. I'm
sampling the accelerometers from a PXI-4472 in the master slot: Dev 2,
and the encoder is sampled with a PXI-6602 in slot 5.
I worked with the
Synchronizing a DSA Device with a Pulse Generation
link that Jarrod provided and modified it to collect encoder readings
rather than generate a pulse train. However, I'm not confident that it
is working correctly. I have posted some sample code on my website:
http://rclsgi.eng.ohio-state.edu/~ericson.15/PLANETARY/LabView%20Code/PXI-4472%20and%206602%20Sync%2...
There are three VIs.
The second program,
Synchronize DSA (4472) with Encoder (6602) Samples.vi
was built from modifying the sample code Jarrod identified. The metric
I used to see if samples were being acquired simultaneously was to set
the "Samples per Channel" for the encoder to "-1" and see if I get the
same value as I predetermined for the accelerometers (DSA device). I
get close to the correct number of samples on the encoder each while
loop iteration, but not exactly. (I don't know if this is a valid metric to confirm simultaneous sampling.)
In the third program,
Troubleshoot Synchronize DSA (4472) with Encoder (6602) Samples.vi,
I tried to determine when samples were starting and stopping. I also
divided out the error path thinking that I didn't want the counter path
waiting for the DSA error signal inside the while loop. Playing with
this program seemed to indicate things were not triggering and sampling
at the same time. I also noticed that the time between the stamp at
the beginning of my DSA waveform to the time stamp at the end of the
while loop iteration was LESS than the sampling ffrequency divided by
the number of samples. How can this be?
So the first program,
DSA PXI-4472 Sample Only.vi only contains
data acquisition from the DSA device. Sure enough, I sample at 25,000
Hz for 1000 samples. This should take 0.04 sec (or more I suppose).
But it seems like this operation is taking place in les than that:
0.0312 in the case of the saved defult value.
Now I'm even more confused. Not only am I not sure that my sampling is
synchronized (timing and triggering), but it seems as though I'm
sampling faster than I perscribe. Any advice?
Note: I also read the page
"Can I Synchronize a DSA Device with Other NI Hardware?" found here. It seems like this is exactly what I want to do. Number 4 "NI PXI-4472 with the NI 6602/6608"
says:
"As with the DAQ-STC counter described above, you can feed the PXI star
line to a National Instruments TIO counter as a source. An external
digital tachometer signal can then be sent to the gate of the same
counter."
I don't understand really what that means, how to do it, or maybe if I'm already doing it in my code.
If you can help, thanks a lot!
Tristan Ericson
Ohio State University Mechanical Engineering
Dynamics and Vibrations
201 West 19th Ave Suite N350
Columbus, OH 43210-1142
Office: 614-292-9029
Lab: 614-247-8077
Fax: 614-292-3163
"No one is useless in this world who lightens the burden of another." - Charles Dickens