Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

frame trigger + encoder

Hi all,

I am trying to develop a small application to acquire images from a linear camera (Dalsa Piranha).
I have a rotative encoder (A+ A- B+ B-) that I have to divide to get a line of pixel every N pulse from the encoder.
This was quite easy to achieve starting from the example "LL trigger each line from encoder".

Now the thing is that I'd like to add a trigger line that starts a frame to achieve the trigger 4th trigger scheme on the picture below :
"Frame trigger + line trigger"



But the options on the VI "IMAQ configure Trigger 2" are not really clear to me... here is the detailed help : Smiley Indifferent



I tried different settings and ended up thinking that setting that best matches my needs is "trigger each buffer list" but I am not sure that it works as I think it does.

So can anyone tell me if it actually works like this :
 - after the "start", pulse from the encoder are not counted
 - when the ISO trigger is received, every N pulse from the encoder adds a line and when the number of line is reached I get an image
 - then it waits for the next ISO trigger to start acquiring a line every N pulse from the encoder
 - and so on...

Thanks in advance for any help

Message Edité par TiTou le 04-11-2007 04:44 PM


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Download All
0 Kudos
Message 1 of 4
(4,431 Views)

TiTou,

From your description, it sounds as though your Frame Trigger should use the "Trigger each buffer" trigger action.  It is legal to configure both a per-line trigger and a per-buffer trigger simultaneously.  This should be done by making two separate calls to the IMAQ Configure Trigger2 VI.  Under this configuration, the Scaled Encoder signal will continue to free-run as a divided down derivative of the Phase A/B quadrature encoder signals.  This signal will be output to the camera and continuously trigger the exposure of new lines from the camera's sensor.  The registration of the "trigger each buffer" trigger, however, will cause the framegrabber's acquisition hardware to require an assertion edge of the frame trigger prior to acquiring the very first line of each image.  There should be no problem with using both of these trigger signals concurrently.

Note, however, that while waiting for the assertion of the frame trigger, the encoder circuitry continues to count the Phase A/B encoder signals coming into the framegrabber.  As such, the 64-bit encoder count and Scaled Encoder signal will continue to run.  This means that the camera will continue to receive the line trigger, and newly exposed image lines will be transmitted from the camera to the framegrabber even while the framegrabber is waiting for the frame trigger to assert.  The key point, however, is that the framegrabber will discard each of these image lines until the frame trigger asserts.  As soon as the frame trigger asserts, the framegrabber immediately begins acquiring Y lines, where Y is the height of your image.  After acquiring the Yth line for the image, the framegrabber ceases to acquire new lines and begins waiting for the frame trigger to assert again.

Which version of NI-IMAQ are you using?  I ask, because I believe that the registration order of these two triggers may have been important with previous versions of the NI-IMAQ driver.  With NI-IMAQ 3.7.1, however, this issue was resolved, and the registration order shouldn't matter.

Thanks,

Chris

0 Kudos
Message 2 of 4
(4,393 Views)
Hi Chris and thanks all lot for these explanations.

The difference between "trigger each buffer" and "trigger each buffer list" is not cristal clear for me (the Help is not really verbal on that point, any other documentation available ?)...
However I got my system to work as I wanted using "trigger each buffer list" (find attached the VI I made).
Another thing that is not cristal clear is the "frame count"  (accessible form the property node on the IMAQ session) it is 0 until we have a frame and then it increments at each new full frame ; for some reason it works like this with a PCI 1426 linked to a basler L801k and it remains always at 0 with a PCI 1426 linked to a Dalsa Piranha Smiley Indifferent
Any reasonnable explanation for this ?

One last thing, I noticed HUGE differecences between Balser and Dalsa cameras, on the time that takes the "IMAQ Start" function to execute.
I find quite normal that the time increases with the size of the image we allocate, but the "IMAQ start" takes more than 1 seconde to execute with a Dalsa camera (and about 100 ms with the Basler)!!! Any idea on how to make this shorter Smiley Surprised ?

Thanks again

Message Edité par TiTou le 04-18-2007 07:51 AM


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 3 of 4
(4,378 Views)
oups... the VI


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 4 of 4
(4,369 Views)