Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting Basler Ace GigE Camera Parameters in VBAI

Using NI VBAI wth Balser Ace GigE cameras, there are 3 ways that you can set camera parameters (such as exposure time):

 

  1. You can specify parameter values in NI Max image acquisition software before you start up VBAI.  Unfortunately, it appears that the values that you set from MAX are not retained after you exit from Max, but are instead restored from a configuration file each time that you launch Max again, assuming that you agree to save configuration changes.  I would think, however, that you should be able to save values in the "default" configuration set so that they are restored each time that the camera powers up.
  2. You can set parameter values via the read/write camera parameter values command, which should set the values that will be used for the next and succeeding image grab steps.
  3. You can set parameter values in each image grab step.  Presumably, any value that you set at a grab step should override previous values for that camera.  However, looking at one of these steps, there is no obvious way to tell if that step is changing a parameter value, or if it just happens to be that value because of previous steps in the VBAI sequence.

In addition, in a previous note someone suggested that parameter value changes do not take effect immediately for most Balser Ace cameras, and that you need to perform several (3?) grab steps before you can be sure that a new parameter values has taken effect.

 

Is there a VBAI/Basler Ace expert who can shed some light on this mystery?  I have found that when controlling GigE cameras via a C++ SDK I get full and immediate control over camera parameter values.  Can one achieve the same level of control using VBAI, and what is the recommended way to accomplish this?

Thank you in advance!

 

     Nelson

0 Kudos
Message 1 of 2
(4,430 Views)
In MAX you can save camer settings so whenever you open a session to that camera it uses the attribute values you saved in MAX. You can even have multiple camera file names with different settings for the same camera. This doesn't mean when you turn the camera on it will use these params, only when when you open a session to the camera. Most cameras have a user settings section where you can save the current attribute values in the camera so it does startup using these params, but when you open a session to the camera, whatever settings are in the camera file will be applied to the camera.

In VBAI when creating a new acquisition step, we use the settings saved in the camera file. You can change those settings in the VBAI acquisition step and then regardless of what you do in MAX the step in VBAI will always apply the settings you used when last editing the step. If you have multiple acquisition steps in VBAI they all use the same settings so if you change one, you will notice all the others have the same change as well. If you want to change the cameras settings programmatically during the inspection, that's when you use the read/write attribute step you mentioned. Some cameras handle updating attributes in different ways(ie some may take a few images before the setting is applied and it may even depend on the attribute as well). If you see the setting take affect immediately using the Basler API, I would expect the same behavior in VBAI as well. One thing to be aware of is that in the read/write step you have the option of unconfiguring the acq or stopping it before applying the change and maybe the Basler API does this for you because sometimes this might be required for an attribute change to take affect on the next acquired image. Another setting you may want to try is in the acquisition step there is a mode that allows you to acquire the Next image vs Immediate vs snap shot. Immediate returns immediately if there's a new image available but it may have been acquired with the old settings so you should try "wait for next" to help avoid this (Wait looks at what the current buffer number is and always waits for the next image to be acquired). Snapshot resets the acquisition and starts a new single image transfer which will definitely use your new settings but is much slower.

Hope this answers your questions
Brad
Message 2 of 2
(4,417 Views)