Error -1074360307: Acquisition in Progress at IMAQdx Write Attributes.vi in LabVIEW

Updated Sep 22, 2022

Reported In

Software

  • LabVIEW

Driver

  • NI-IMAQdx
  • Vision Acquisition Software

Issue Details

I'm trying to modify the camera acquisition attributes' values and then save these values in a new camera configuration file, or edit an existing one. To do so, I am using the IMAQdx Write Attributes.vi function. However when it gets executed, I receive an error:
 

Error -1074360307 occured at IMAQdx Write Attributes.vi
Possible reasons: Acquisition in progress

 

image.png


How do I solve the error and successfully write the new attributes to a camera configuration file?
 

Solution

This error occurs when the IMAQdx Write Attributes.vi is called after the IMAQdx Configure Grab.vi because some specific acquisition attributes cannot be changed after the acquisition is already configured. The IMAQdx Write Attributes.vi not only saves a new camera configuration file with the attributes' current values but also writes those attributes to the camera.

To avoid this error, use the function IMAQdx Unconfigure Acquisition.vi before using the IMAQdx Write Attributes.vi. This step will ensure there is no actively configured attribute(which does not allow to write attributes) in the IMAQdx session. See an example code below, which does exactly what described above.

image.png


In the above scenario, the Width attribute has been configured, and it is not writeable while an active acquisition/configuration is running. Thus we need to unconfigure it, and write the new configuration. 

Note: The IMAQdx Unconfigure Acquisition.vi does not erase the new attribute values. Writing the attributes after this function will write the newest updated attributes. 

Additional Information

Additionally, it is worth noting that some attributes such as Connection Speed, Bus Type, etc. are not writable during the acquisition, even after unconfiguring it. Check the IsWriteable property of the attribute to determine when an attribute is writeable. See the Advanced Functionality with Attributes.vi example to view this property for all attributes while acquiring and while stopped.