Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Realtime image acquisition

I'm working on a realtime complex control system for a robotic arm. The aim of the controller is to track a desired end-effector trajectory, exploiting visual information coming from an analog camera, and to damp the arm vibrations.
This is the hardware set-up:
- two couple of strain gauges un half-bridge configuration, acquired by a PXI 6070E + SC2043SG
- an encoder, acquired by a PXI 6602
- a Sony XC-55 analog camera, acquired by a PXI 1408
- an analogue torque reference, generated by a PXI 6711
The PXI is based on a NI8176 embedded controller. The control software has been developed with Labview 6.1, NI DAQ RT 6.9.2, NI IMAQ RT 2.5.4, following the National realtime programming guidelines (host side/realtime loop separation, realtime fifo, etc.).
A position controller, based on encoder measurement, with a 2kHz loop rate is now running with good results. The next step should be to include image acquisition in the control loop. Oviously, as the camera frame rate is limited to 30Hz, the acquisition VI will be inserted into a case (true/false) structure and will be executed only every 70 cicles of the 2kHz loop.

The question is: what is the best IMAQ technique to acquire the image (or an image ROI) so as to minimize the acquisition time?

In fact, even if the image acquisition is performed only every 70 cicles it have to last less then 1/2000 sec, otherwise the 2kHz loop cannot ensure realtime execution.
Thank you in advance,
Luca Bascetta
0 Kudos
Message 1 of 4
(3,505 Views)
Hi, This is Marco Quaglia,
The best/fastest IMAQ Grab you can do is the asyncronous technics, I mean run the Init, buffer allocation, trig config and stat out of the loop and inside the loop run just the Get/Extract/Copy functions.
To do this you have to use the LowLevel functions.
Moreover, using the above function you can build a Seuqnece or Ring acquisition allocating more that one buffer.
Try it !
Ciao
Message 2 of 4
(3,476 Views)
Thank you for your reply.

> The best/fastest IMAQ Grab you can do is the asyncronous technics, I mean run the Init, buffer allocation, trig config and stat out of the loop
> and inside the loop run just the Get/Extract/Copy functions.

In fact this is exactly what I'm doing. However, I'm not sure what should be the best choice between Get/Extract/Copy to minimize the CPU overhead. I'm afraid, and unfortunately the measurement I've done till now seems to agree with my fear, that even if Get/Extract/Copy are asynchronous call the processor overhead due to image storing in system memory affects the realtime execution of the loop. As a consequence, whatever the image acquisition frequency is (e.g. 1 Hz), if it occurs inside a fast realtime loop (e.g. 2 kHz) the result is to destroy the realtime loop execution. Is this right?

How should I programming my application to minimize this effect?

Consider that to satisfy these demanding time constraints the frame grabber now acquires and analyzes only a ROI.

Thank you in advance,
regards

Luca Bascetta
0 Kudos
Message 3 of 4
(3,468 Views)
Dear Marco,
one more comment on

"The best/fastest IMAQ Grab you can do is the asynchronous technics, I mean run the Init, buffer allocation, trig config and stat out of the
loop and inside the loop run just the Get/Extract/Copy functions."

To use the Get function inside the loop the List VI (that runs with init, buffer allocation, trig config, start outside the loop) have to be set as one-shot acquisition. As a consequence, the frame grabber will acquire only one image (when the trigger will be active for the first time) and all the other call to the Get function will be useless.
Thus, in this context the Get function cannot be used... is it right?

Thank you,
Luca Bascetta
0 Kudos
Message 4 of 4
(3,461 Views)