High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

software triggering a scan rate acquisition

I'm using a ni5112 digitize to acquire signal from an ultrasonic transducer. The vi is working, but there's still a problem... I aqcuire the signal (1000 points) XX times and the sum of these signals is written in a .xls file. To make sure this sum is absolutely correct i'd have to guarantee that the trigger always occur at the same time. I thought i'd do this by setting the edge trigger to the parameter 0 (zero), but since there's a little noise in the signal (before the transducer send the signal and waits for the backscatter) sometimes the trigger does not occur at time zero (there's a variation aroud E-7). What can i do for the trigger to happen exactly at time zero? is it possible to make the trigger dependent to the occu
rence of a loop?
0 Kudos
Message 1 of 3
(6,204 Views)
You can software trigger a 5112, but your resolution is only going to be as good as the time resolution of your computer. With a standard Windows operating system, this is about 20 milliseconds - the timeslice time of the operating system. You set up the software trigger using niScope Configure Trigger Software.vi and trigger it using niScope Send Software Trigger Edge.vi, both in the trigger palette. However, this will probably not give you what you want, which is absolute synchronization between the ultrasound pulse and the data acquisition.

As an easy solution, try using hysteresis triggering and setting the hysteresis to a larger value. Given your problem description, I would not expect this to work, but it is worth a try, since it is so easy to implement.

You can get better synchronization by triggering off something other than the noisy ultrasound pulse. If you have a digital pulse which is triggering the ultrasound pulse, use the digital pulse with either edge or digital triggering. If you have access to the ultrasound pulse before it goes into the transducer, use that. There will be some time delays involved that you will have to work out, typically by moving the trigger position around. Do not use trigger delay, as it introduces a 40nsec trigger uncertainity.

If you successfully find a better trigger, your effective trigger jitter from shot to shot will be 10nsec, the time between digitized points. However, you can reduce this a couple of orders of magnitude by using the trigger position information. The trigger position is far more accurate than the time between data points. To use this in averaging data sets, you will need to determine where the trigger occurred between two data points (use relativeInitialX in the wfm info output cluster), then interpolate all your data to that position before adding to your sum buffer. Due to the nature of your data, I would suggest a spline, polynomial, or Savitzky-Golay filter. LabVIEW includes spline and polynomial interpolation (if you have the right version). For your problem, Savitzky-Golay filtering would be much faster. It is equivalent to polynomial interpolation. You can find information on Savitzky-Golay filters on the web or in the second edition or higher of the "Numerical Recipes" books by Press et. al.

If you cannot find a better trigger source, or there are timing reasons with your experiment that you cannot use another source, you will need to post process your data. Set your trigger position to about 2% and your record length to 4% more data than you need. This will give you a few points to throw away at the beginning and end of the data set. After you get your data, fit a curve (usually a line) through your data around the trigger point. Use the equation of the curve to calculate the actual trigger point, then use the methods mentioned above to add that data set to your frame buffer.

Good luck!
0 Kudos
Message 2 of 3
(6,204 Views)
I forgot about an even easier way to interpolate data at a fixed position between points. Take a Fourier transform of your data. Convert it to magnitude/phase format. Add or subtract an amount from each phase equal to the time distance you want to shift the waveform. For example, if you have an FFT with two elements - 1Hz and 2Hz and want to shift it 0.25 seconds, you would add 90 degrees to the phase of the first element and 180 degrees to the phase of the second element. After you have modified the phases, invert the transform and you have a shifted data set. Make sure you have enough data at the ends so you can delete the ringing due to end effects (usually about 5 to 10 points). Shift the data by integer point numbers in the time domain, then do t
he fractional shift using the FFT technique.
0 Kudos
Message 3 of 3
(6,204 Views)