Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading machine position while acquiring data from a device

Background:

 

Using a laser depth sensor attached to the arm of a scanning table I am trying to acquire the data from the laser at the same time keeping tracking of the position of the scanner. The scanner is meant to scan, say, a flat sheet of metal in order to create a 3D map of the surface using the laser depth readings. The scanner moves along the x direction picking up data at regular intervals, at the end of each line (when the laser has gone past the edge of the piece being scanned) it increments it's y-position by some amount.

 

However, the data from the laser is a bit unstable so I would like to read multiple values at each x,y location. Due to issues with speed and time to scan the whole part, I have decided it's okay if the scanner drifts a small amount while picking up the multiple samples as long as it doesn't drift more than say 1/4 of the intended point spacing.

 

Specs:

 

open-loop stepper motors for the x and y directions

 

language: LabVIEW

 

motion controller: NI PCI-7344

 

a/d converter / DAQ device: NI USB-6009

 

Problem:

 

What's the best way to acquire the N samples of data for each intended x,y location, however, at the same time keeping track of the exact x,y location (so as to account for the drift as mentioned above). I'm worried that using the Read Vector Space Position VI would be too slow, and using this method would require using the Acquire 1 Sample VI for the DAQ task which is very inefficient if I want to get say 100 samples at each intended x,y location. Ideally I would want to use the Acquire N Samples VI for the DAQ task but then there's no way to keep track of the exact positon of the scanner for each of those samples.

 

Any help on this matter is appreciated.

0 Kudos
Message 1 of 2
(2,862 Views)

Hey tpepler,

 

In your application, are you moving your sensor, taking N samples, and then moving the sensor? Or, are you continuously moving your sensor and taking measurements?

 

If you are doing the first option, all you would really need to do is move your sensor to a specific location using the NI Motion VI's (making sure to keep track of where you moved the sensor to due to the open loop nature of your system) then perform a DAQmx read from your sensor of N samples. Then you could move your sensor (however slight of a movement you need) and repeat the process. 

 

If you are interested in the second option, you may want to think of implement a closed loop stepper configuration. Then you could use the High Speed Capture capabilities of your motion controller to take precise position measurements from your encoder. However, in this case you would not actually be taking N samples in the exact same location (as your sensor would be moving). Take a look at an Example, Tutorial, and Knowledgebase on High Speed Capture for a little more information.

Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 2 of 2
(2,843 Views)