Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Interrupt acquisition to write camera attribute

Solved!
Go to solution

Hi all,

 

I'm using a Basler Pulse camera in an imaging setup, for which I only acquire a region of interest from the full camera view. I can set this ROI before starting image acquisition using the IMAQdx property node, no problem. The parameters are stored in a Settings-file, and loaded upon starting the VI.

Now I want to make a tool for other users of this setup to adjust the ROI via a different VI. For this I want them to be able to toggle between full camera view and the ROI-view. However, once I the grab is configured (IMAQdx > Configure Grab), I cannot change the image format parameters anymore ("Unable to set attribute"). Other parameters like fps and brightness can still be changed during acquisition.

 

I dug into the Configure Grab VI and found that it just does a lower-level configuration step and then starts acquisition. In my VI I tried to stop the acquisition, change the parameters, and restart the acquisition, but still the same error remains.

How can I interrupt the acquisition/session so I can adjust my image format parameters? I've added a minimal working example that reproduces the problem.

Thanks in advance!

0 Kudos
Message 1 of 3
(3,125 Views)

No ideas how to do this? I have been playing with this for a few days off and on now without results.

The only crude way I can think of is to fully close the session, reopen it, set the parameters and configure grab again. But that seems too crude to me.

Seeing the behind-the-scenes functioning of the Configure Grab VI, I cannot figure out why simply stopping the grab, adjusting the parameters and restarting the grab does not work.

0 Kudos
Message 2 of 3
(3,097 Views)
Solution
Accepted by topic author irPaul

Solved. The solution is to fully reverse the Configure Grab VI by using the low-level functions Stop, followed by Unconfigure. Then set the desired parameters, and start again with Configure Grab.

 

The Unconfigure VI actually does not wipe the configuration, it just enables writing of all parameters again. Upon restart, unaltered parameters remain as before.

Message 3 of 3
(3,087 Views)