Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

are IMAQdx sessions autodisposed?

Solved!
Go to solution

I am trying to store the reference to an IMAQdx Session in a FGV, and I can't reconcile with the behavior shown by the following snippet:

 

IMAQdxFGV.png

In my understanding, the VI should throw an error at the property node the first time it is run, but not the next. The shift register should hold the session reference, and so it appears if probed (only shows "cam0"), and if compared with the constant input. But yet, the property node fails also in the subsequent run. What is going on, is there some hidden session status flag, which is released when the VI completes?

The  documentation says Session Out is a unique reference to the camera. Session Out is the same as Session In. Well maybe, almost the same?

This is LV 2015 32bit.

0 Kudos
Message 1 of 3
(3,704 Views)
Solution
Accepted by Enrico_Segre
Yes, when the top-level VI running stops, all IMAQdx sessions created by it are auto-disposed. Nearly all refunums in LabVIEW work like this.
0 Kudos
Message 2 of 3
(3,696 Views)

Makes sense. It's apparent that the last time I was doing something similar with a camera session, I was using one of these SDKs where the reference is an anonymous handle returned by the SDK and not a LV object. Thx.

0 Kudos
Message 3 of 3
(3,692 Views)