Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Why Can't I Update IMAQ Properties During a Grab Acquisition in LabVIEW but I Can in MAX?

Hardware: Image Acquisition (IMAQ)

Problem:
I notice if I start a Grab acquisition in Measurement & Automation Explorer I can change the acquisition parameters and they will be updated during the Grab.

On the other hand, if I create a VI using an IMAQ Property Node in a while loop and a control to change the value of a parameter during a Grab acquisition the parameter does not get updated.

Why does this happen and what can I do to get the parameter to update during acquisition?

Solution:
Once a Grab acquisition has started in LabVIEW, in other words once IMAQ Grab Setup has been called, all acquisition parameters are set on the frame grabber. Therefore, a parameter cannot be changed after a grab has started. By contrast, Measurement and Automation Explorer actually stops the acquisition, changes parameters, and restarts the acquisition in the background in order to appear as though the parameters are changing during acquisition.

Since LabVIEW does not automatically do this, you can use a workaround which checks for changes in your control values. Once a change is detected, use IMAQ Stop to stop the acquisiton and to read the new parameters. Then call IMAQ Grab Setup to set the new parameters to the frame grabber.

Here is a modification of the shipping example HL Grab such that the user can modify black and white reference voltages after starting the VI.

Note: For a larger image please open HL Grab Update Property.png in the below Attachments section.



After the grab acquisition is configured the first image is acquired using IMAQ Grab Acquire outside of the while loop. On the first iteration the acquisition is halted with IMAQ Stop such that the property values for white and black reference (voltage) are updated. Next, IMAQ Grab Setup and IMAQ Grab Acquire are called to set these values to the frame grabber and acquire an image, respectively. On the subsequent iterations a Not Equal comparison and shift register check for changes in the White and Black Reference controls. If a change is detected then the acquisition is stopped and the values are updated, else the Image and Session references are passed through the case structure.


Related Links:
NI Vision Acquisition Support
Community Example:HL Grab Update IMAQ Property

Attachments:

HL Grab Update Property.png






Report Date: 10/15/2008
Last Updated: 08/25/2009
Document ID: 4QEH078Q

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit