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

Error 1074397067: The Requested Acquisition Window is Invalid When Doing a Snap or Grab

Primary Software: LabVIEW Toolkits>>LabVIEW IMAQ Vision for LabVIEW
Primary Software Version: 4.0.1
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
I am able to snap and grab in Measurement & Automation Explorer (MAX) without any problems but whenever I snap or grab in LabVIEW I get the following error:

Error 1074397067 occurred at IMAQ Snap.vi (or IMAQ Grab.vi)
Possible reason(s):
NI-IMAQ: The requested acquisition window is invalid.



This error may also occur while using Vision Acquisition Express VI.

Solution:
LabVIEW usually returns this error because the IMAQ camera initialization requires different acquisition window parameters than the camera file.

The following is an example of what has happened (with a FLIR camera):

MAX sets a width value of 318. The initialization call in LabVIEW sets the width to 320. Therefore an error that the acquisition window is invalid occurs.  There are two possible ways to resolve this:
  1. Use property nodes to manually set the acquisition window in LabVIEW.  The Acquisition Window property can be found using an IMAQ property node and selecting Acquisition Parameters»Acquisition Window.  Then, manually set the Acquisition Window properties to those found in MAX. Note that this solution will only work for the given VI that you are working in.



  2. Reset the proper window parameters in the camera file itself.  As opposed to the first solution, this solution would work for any VI that you create in LabVIEW.
    1. Save a backup copy of the camera file (just in case something goes wrong).
    2. Open the camera file and view the acquisition window parameters. (for example, AcquisitionWindow (2, 0, 320, 240).  Note that the actual parameters for your specific camera may vary.)
    3. Insert a property node in the LabVIEW code and read the acquisition window attributes.
    4. If these are different, change the values in the camera file to the values required by the IMAQ VIs. (for example, AcquisitionWindow (2, 0, 318, 240))
    5. Save the camera file.


Related Links:
Developer Zone Example: Changing Camera Configuration Programmatically
KnowledgeBase 2ORE3UZO: Programmatically Changing the Camera File for an IMAQ Interface

Attachments:





Report Date: 06/27/2008
Last Updated: 01/07/2010
Document ID: 4MQG9JSK

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