Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquisition rate is half of trig rate, why?

Solved!
Go to solution

Will this issue never end?   TiTou’s elaborate videos do not open our eyes …  The solutions knows pretty well how to hide from us. 

Message 21 of 26
(2,654 Views)

It will have to end!

NI support engineers have reproduced the issue and are working to find a solution.


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

Epictetus

Antoine Chalons

0 Kudos
Message 22 of 26
(2,650 Views)

@GuenterMueller wrote:

Will this issue never end?   TiTou’s elaborate videos do not open our eyes …  The solutions knows pretty well how to hide from us. 


And I just received an email from NI support will a solution, I will be testing this on wednesday!


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

Epictetus

Antoine Chalons

Message 23 of 26
(2,637 Views)

Smiley Sad

 

What a disappointment! I'm wwandering if NI Spport used the same hardware... still looking for a solution.


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

Epictetus

Antoine Chalons

0 Kudos
Message 24 of 26
(2,622 Views)
Solution
Accepted by topic author TiTou

Solution finally came tuesday from NI Support.

 

Spoiler

What was causing the acquisition to run at half the triggered frame rate was the way the signals lined up. The camera begins acquiring on the rising edge of the trigger pulse. Once a rising edge is received, FVAL goes high and remains high as long as the camera is exposing. It then goes low until another trigger pulse is received.

At the same time, if we are triggering each buffer on the frame grabber, the frame grabber waits to begin reading data from the camera until a rising edge is received, and then begins read out once FVAL goes low. The result is that the frame grabber begins reading out the current frame, which takes about as long as the camera takes to acquire a frame. So while the frame grabber is reading out the data, the camera receives the next trigger pulse and begins acquiring the next frame. However, the frame grabber is still reading out the previous frame and thus ignores the trigger pulse until it finishes, resulting in an acquired frame rate that is exactly half of the triggered rate. This also explains why we saw exactly half the frame rate at higher frequencies, and the full frame rate at lower ones. At lower rates, there is enough time for the camera and the frame grabber to acquire the frame off the same trigger pulse and "re-arm" before the next pulse arrives.

trigger diagram.png

 

 

The trick is that when the Balser A504k is set in ExSync Programmable mode (trigger each frame and programmable exposure time) the IMAQ session trigger settings should be "trigger start of acquisition" and not "trigger each buffer", this came be a bit confusing (it was for me at th start) but in the end it is consistent with the rest of the settings ; indeed it is similar for the image size, the max image size is 1280*1024, if you want to acquire a fraction of that the best option is to set is on the camera (throught serial commands) then the camera will make available for the frame grabber only the portion you set ; the other option is to set the acquisition window size by using a property node on the IMAQ session, but carefull if you do this because this setting only affects the frame grabber and not the camera so you have to make sure that boteh settings make sens.

So when the camera is in ExSync Programmable mode the camera is implicitely set to trigger each buffer so if the frame grabber is also set to trigger each buffer you might have issues at high rates.

 

If anyone is interested the test code is public on Github.

 

A HUGE thank you to NI Technical support for the time and effort spent on this issue!


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

Epictetus

Antoine Chalons

Message 25 of 26
(2,608 Views)

I made a branch called "It Works!" in the Github rep for the working solution.


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

Epictetus

Antoine Chalons

0 Kudos
Message 26 of 26
(2,597 Views)