Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQdx Write Attributes.vi issue

I am using LabView 2011 and probably the latest IMAQdx drivers. I have an issue when I deploy my current GUI. There are two ways the user can alter the camera attributes and attempt to save them to a file. The first is when there are no images being acquired so the tool does an Imaq session open, Read Attributes, display as a tree, allow the user to change the attributes with Flush Control Value.vi, write the camera attributes to file and close Imaq session. This works perfectly every time and when the Read Attributes is called again, the expected values are there. HOWEVER, if the tool is in the process of acquiring images (continuous), the user can open the Read attributes tree (not a new session since acquisition is in progress) , alter the camera attribute such as exposure time, (in which the results are immediately seen via the displayed image), and then close the attribute tree window. Upon stopping the acquisition of images, the tool attempts to write the attributes to file but always produces an error. (It should be mentioned that this doesn't happen on the development station, only on the deployed station.) The deployed station has VAS_2011 installed and as mentioned before, if the tool did not acquire images, the tool has no problem writing the camera attributes to file.
These are the steps for which the Write Attribute.vi fail:
Imaqdx Open Session.vi
Imaqdx Read Attributes.vi
Camera Attribute PacketSize = 1500
Imaqdx Configure Grab.vi
Imaqdx Grab.vi (in while loop)
Use Imaqdx session to use Imaqdx Enumerate Attributes.vi
Tree window appears and user can alter attribute values and update with Flush Control Value.vi (Attribute values are immediately evident in the updated image.)
Quit the popup Tree window.
Continue to acquire images until done.
When done, Imaqdx Stop Acquisition.vi (Tried without the Stop Acquisition.vi as well.)
Write Attributes.vi (Same path as Read Attributes.vi, but also tested with a different file path as well.)
Imaqdx Close Camera.vi
This will produce a Write Attribute.vi error and therefore will not save the camera attribute values acquired during acquisition to file.
 
I know I can stop and close the session prior to allowing someone to change the values, but the ability to see the immediate effect of the attribute value change is appreciated. (Or, why doen't this happen on the development station but happens on the deployed station?)
 
Any thoughts???? 

 

0 Kudos
Message 1 of 4
(5,225 Views)

Hello,

First, when you use IMAQdx Write Attributes, this function writes all the parameters to the .icd file of your camera in order to load them the next time you use your camera. So I don't think it's a good idea to access this file each time you change only one parameter. What I suggest is to save your parameters only once at the end of your session.

Are you sure the error is generated by this step? Because if it works previous to any acquisition, it should work all the time.

Did you check you have full access to the path you specify?

 

Regards

NTA_LabView_certified_Developper.jpg
0 Kudos
Message 2 of 4
(5,217 Views)

"So I don't think it's a good idea to access this file each time you change only one parameter. What I suggest is to save your parameters only once at the end of your session." There is only a one time write when the tool is closed but since this is in the development phase all aspects of the write attributes.vi are being tested.
"Are you sure the error is generated by this step?" The error cluster denotes the 'source' as IMAQdx Write Attributes.vi
"Because if it works previous to any acquisition, it should work all the time." That is why I posted my confusion!
"Did you check if have full access to the path you specify?" Yes, I ensured that it was not write protected or 'open'. Since the Write Attribute.vi works endlessly (without the tool being closed) if no acquisition has taken place, and the same path is used for the Write Attribute.vi after an acquisition occurs, the Write Attribute.vi after an acquisition should work. (I know the tool should not write the attributes so many times but again this is the development phase and all aspects of the tool must be tested thoroughly.)
As a reminder, the built tool only fails on the deployed station, not the development station.
 
After saying all this, I am convinced this is a deployment bug. I did a little more work on this and found the following. The error is a "BFF6900D" error for source "IMAQdx Write Attributes.vi". The error explanation is "Possible reason(s): NI-IMAQdx: (Hex 0xBFF6900D) Acquisition in progress." So I added a 1 second delay after the IMAQdx Stop Acquisition.vi, verified the "AcquisitionInProgress" attibute is false, but the Write Attribute.vi still reports the same "Possible reason(s): NI-IMAQdx: (Hex 0xBFF6900D) Acquisition in progress."

0 Kudos
Message 3 of 4
(5,213 Views)

Old post, but unanswered. 

 

I am struggling with this same issue and since there's no answer here, I'll post my progress in case others search for the same question.

 

I have a similar issue in that IMAQdx Write Attributes.vi returns an "Acquisition in Progress" error, both in the development environment and deployed code.  The problem only occurs after I start an acquisition, even if I terminate the acquisition.

 

The solution appears to be that once IMAQdx Configure Acquision.vi has executed, you must execute IMAQdx UnConfigure Acquision.vi before IMAQdx Write Attributes.vi can work.

 

Martin

 

 

Message 4 of 4
(4,760 Views)