Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

close camera session

Solved!
Go to solution

Hello

I am using the Vision Acquisition Express VI in a while-loop. The vi itself is started with an event. Now if I am starting for the first time the Vision Acquisition Express VI I can see the live-image.

After stoping the while-loop and restart the event (Vision Acquisition Express VI) again, I always get the error message "NI-IMAQdx: (Hex 0xBFF69004) Invalid camera session".

 

Do I need to close the session prior or what I am doing wrong?

 

 

thanks in advance

0 Kudos
Message 1 of 14
(7,867 Views)

I am with lv 8.0 here so not able to view your vi in 9.0. But have you used the initialize outside the loop and close outside the loop and only the aquire inside the loop. I suppose if you do it this way you should not get the error.

0 Kudos
Message 2 of 14
(7,867 Views)

No, the initialisation is inside the loop because I want to acquire cont. image with inline processing. I think therefore I need to use the "NI Vision Acquisition Express.vi" inside the

Loop.

 

Please have a look at the attached vi (Version 8.0).

 

 

Thanks

0 Kudos
Message 3 of 14
(7,863 Views)

Why are you using a event structure here? While loop isnt connected to a control and how are you stopping the vi? Abruptly?

0 Kudos
Message 4 of 14
(7,860 Views)

This is only an example how I have implemented the vi in my SW. The problem is that I can not send you the complete structure.


1) An event "Track" starts the camera session and remains in the loop until

2) the user press "Stop" => the camera session stops the loop and

3) goes back to "timeout" and waits for next event (Track) to start the camera session again

4) at this point I get the mentioned error message

 

Any ideas what could be wrong?

 

Thanks

0 Kudos
Message 5 of 14
(7,859 Views)

has nobody any hint...?

0 Kudos
Message 6 of 14
(7,834 Views)

Hey There,

 

why dont you try to use the low-level-VIs and what muks wrote - put the initialization and closing the Imaq session outside the while-loop.

Its always better to use the low-level-vis, so i would suggest to try that!

 

Ramona Lombardo
Applications Engineer, NI Germany
Certified LabVIEW Developer
0 Kudos
Message 7 of 14
(7,786 Views)

ok but with the used express vi where I contin. acquire images I need automatically a while loop - isnt it?

0 Kudos
Message 8 of 14
(7,779 Views)

You will still need a while-loop, also with low-level VIs:

The initialisation and closing the references is outside the while loop and the acquisition itself is inside.

 

I hope that helps.

Ramona Lombardo
Applications Engineer, NI Germany
Certified LabVIEW Developer
0 Kudos
Message 9 of 14
(7,776 Views)

 


@Norick_17 wrote:

ok but with the used express vi where I contin. acquire images I need automatically a while loop - isnt it?


If I get it right properly that is automatically stop the while loop then it is not neccasary. You can configure the start and stop of the acquisition and along with the stop of acquisition you can stop the while loop and it is important to close the session here.

 

0 Kudos
Message 10 of 14
(7,775 Views)