Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

NI IMAQ: The passed in sesssion or interface is invalid, Why??

please tell how to rectify the error.. i am using a webcam which is installed in my laptop.. when i assign the number of buffers to 5 and set the camera session to cam1 or cam0 the error is coming like this which i posted in the screenshot..

please let me know what to do to overcome this error..

Download All
0 Kudos
Message 1 of 4
(3,118 Views)

You're getting an error here because you're using two different APIs. A webcam should use the IMAQdx API, which you're doing correctly for the session open, configure, start, and stop. You can tell by the small "dx" in the bottom left corner of the icons. The Configure List, Configure Buffer, Get Buffer, and Extract Buffer VIs are from the IMAQ API, so they are not expected to work with an IMAQdx camera/session. Take a look at the IMAQdx example VIs to see which IMAQdx functions you should be using to get images (C:\Program Files (x86)\National Instruments\LabVIEW 2015\examples\Vision Acquisition\NI-IMAQdx\High Level\Grab.vi).

 

Hope this helps,

Katie

0 Kudos
Message 2 of 4
(3,112 Views)

i am new to labview can you please rectify the program in order to avoid the error.. i am still getting the same error..

otherwise can you tell in detail how to do it

0 Kudos
Message 3 of 4
(3,103 Views)

Take a look at the IMAQdx acquisition examples in the Example Finder (Help>>Find Examples...>>Hardware Input and Output>>Vision Acquisition>>NI-IMAQdx). You'll see lots of examples for doing different kinds of acquisitions.

 

-Jordan

0 Kudos
Message 4 of 4
(3,077 Views)