Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

how to create imaq session refnum?

Solved!
Go to solution

Good morning all,

 

I have an application where where I would like to pass an IMAQ Session by refnum to multiple sub VIs, however, I am unable to find any information on creating IMAQ Session refnums. I have seen it used in a prior post from an older version of labview, but cant seem to duplicate it (the snapvi example http://forums.ni.com/t5/Machine-Vision/how-to-pass-IMAQ-session-to-subVI/td-p/2089804 )

 

I am using LV2013 and I have the VDM 2013 installed with all options (and its being used for other imaq functions, so I dont believe its an installation issue)

 

I have tried looking in the following locations:

Controls palette (under Refnum or under the Controls->Vision palette).

Quick drop (searching for refnum or imaq or session)

Editing the IMAQ Session control and indicator (right click menu)

 

Hoping someone could point me in the right direction.

 

Thanks,

Stephen F.
System Integrator & Automation Engineer
0 Kudos
Message 1 of 5
(5,763 Views)
Solution
Accepted by topic author dpom

If you go to any IMAQ VI that takes this refnum and right-click on the session input you can select "Create Control" and it will create one for you.

Message 2 of 5
(5,740 Views)

@BlueCheese wrote:

If you go to any IMAQ VI that takes this refnum and right-click on the session input you can select "Create Control" and it will create one for you.


 

Thats the issue, not all the IMAQdx VI's seem to utilize refnum's. IMAQdx does not use the green refnum, IMAQ vi's do (disctinction between IMAQ and IMAQdx)

 

I am using "IMAQdx Get Image.vi" and when you create a control or indicator for the session inputs on that specific VI, it only returns the standard purple control.

 

Thanks for pointing that out. I didn't realize there were IMAQ VI's that allowed different types of session inputs. Much easier to see when you know what to look for.

Stephen F.
System Integrator & Automation Engineer
0 Kudos
Message 3 of 5
(5,736 Views)

Maybe I am misunderstanding your response, but maybe it is worth pointing out that IMAQ and IMAQdx are two distinct APIs and do not ever mix. IMAQ is used for all our framegrabber products (and some smartcameras) and IMAQdx is for everything else, with a camera-centric API rather than framegrabber-centric.

 

Note that IMAQ (for historical reasons) uses a green refnum wire while IMAQdx uses the newer purple reference wire. This difference is due to the type of refnum it internally is implemented inside of LabVIEW, but really does not make any difference in how you use them.

0 Kudos
Message 4 of 5
(5,732 Views)

Sorry for the confusion. I have "IMAQ Create" and "IMAQ SetImageSize" allocating memory for each image which is an input to "IMAQdx Get Image" vi.

 

The example I was looking at was a plain IMAQ Snap function and I made the wrong correlation there between the two API's. I have never used the old IMAQ api in the past, so thanks for the information.

Stephen F.
System Integrator & Automation Engineer
0 Kudos
Message 5 of 5
(5,728 Views)