LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do terminat an IVI session manually

Hello,

I am working with a very simple instrument that rotates a wheel to one of six positions. The manufacturer used a set of IVI based drivers. I am so far ignorant of IVI tools. From what I gather, using IVI drivers this allows them to handle any similar instrument without developing new vi's. Sounds reasonable.  

 

The issue is when I do something stupid like running non-looped vi's using the repetitive run. I only do this for developement purposes to prevent having to keep hitting the run button. However it is possible to hit the abort button and occasionally leaves the session open instead of cleaning up properly. The message I get is

Driver Status:  (Hex 0xBFFF00A6) The connection for the given session has been lost.

Primary Error: (Hex 0xBFFA1190) The session handle is not valid.

 

With standard drivers I seem to be able to do this and have no problems no matter how I terminate. 

 

So what is different about an IVI session that allows the session to hang and how do I clear a hung session without having to close Labview?   Is it even possible? Or do I just have to be smart and put a temporary while loop around everything using an IVI just for repetitive testing?

 

Thanks,

IVI Clueless.

David A. Taylor
0 Kudos
Message 1 of 5
(3,501 Views)

one thing you can try is to first use a stop button instead of abort. Let the loop run continously and exit (by pressing stop) and ensure the session gets closed.

 

You can still maintain your goal of not pressing the run button everytime.

0 Kudos
Message 2 of 5
(3,493 Views)
0 Kudos
Message 3 of 5
(3,492 Views)

Wouldn't I have put a while loop around it with the stop button wired to the stop condition? That works fine, I just have to clean it up when I'm done.

Thanks for your help!

David A. Taylor
0 Kudos
Message 4 of 5
(3,484 Views)
Yes while loop -simple and effective.:smileywink:
0 Kudos
Message 5 of 5
(3,482 Views)