09-12-2007 02:54 PM
Hello. I am using LabVIEW 7.1. I made the switch
to DAQmx recently. I am writing a program to collect vibration data from
a planetary gear system. I have accelerometers mounted to the gears to
record vibration data and encoders are used to track the position of the
gears. It is imperative that I synchronize encoder and accelerometer
signals to get correct measurements.
I am using PXI-4472 cards to measure accelerometer signals and PXI-6602s to get
encoder positions. I have two separate "configuration" VIs (one
for accelerometers and one for encoders) outside the while loop and two separate
"read" VIs inside the while loop. The accles and encoders have separate
I need to know how to make sure I'm getting samples form each card at the exact
same time. Maybe I already am, but I'm not confident. When I set
the number of samples for accels and encoders to the same value (typically
8192), everything seems to work. But how do I know I'm getting all
samples simultaneously? When I set the "number of samples per
channel" control of the encoder "read" VI to "-1", the samples
obtained per while loop iteration varier wildly. I don't understand
really what setting this value to -1 does, but I do know that it's hurting my
confidence that everything is synchronized when I set the control to the same
value as the accelerometer "scans to read" control.
I have set the DAQmx Timing VI(s) for accelerometers and encoders in both “config” programs to "Sample
Clock," but is that all I need to do? I read the "Timing and
Synchronization Features of NI-DAQmx" page of NI's website, but it wasn't
so clear to me. It seems like I may need to configure some RTSI stuff in
MAX, but that's were I get very lost. Can anyone please explain what
else, if anything, I must do to ensure that the accelerometer and encoder
arrays are collected simultaneously for comparison?
I uploaded my code along with a few pictures of the relevant block diagrams to
my website at:
http://rclsgi.eng.ohio-state.edu/~ericson.15/PLANETARY/LabView%20Code/
The larger file contains all SubVIs and the smaller one contains only those
which I built. The picture below shows the block diagram of the main
program. More pictures of the sub-programs I mentioned are found at the link
above.
THANK YOU!
09-13-2007 07:38 PM - last edited on 11-05-2014 09:41 AM by dcarva
09-14-2007 04:13 PM
09-18-2007 01:41 AM
Hi Triston,
I will gather the necessary hardware and test out your code to see if I experience the same issue.
09-18-2007 11:28 AM
09-18-2007 11:42 AM