LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

release queue and VISA connection

First to me, I use the queue mechanism in producer / consumer template.
If I don't release the queue used and exit the LV application(exe), what happens in LV or computer?
Before releasing the queue, should I always flush the buffer? 
 
In RS-232, I have met some problem from abnormal quit of program (without closing VISA).
After shut down the program, sometimes, I got a warning message in initializing VISA (open VISA).
How do I treat the code in starting part for after shut down abnormal?
Is there a function to check the closeness of VISA? 
Message 1 of 3
(2,847 Views)
Hi Labmaster,

If I don't release the queue used and exit the LV application(exe), what happens in LV or computer?
If you do not release the queue and you exit the application, the information in the queue gets treated as garbage by LabVIEW and gets cleaned up.

Before releasing the queue, should I always flush the buffer?
Flushing the buffer retrieves all the remaining information out of the buffer. Releasing the queue will erase all the information in the buffer. Ideally you would flush the buffer before your release the queue so that you can be sure that you have all the information that was in it.
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
How do I treat the code in starting part for after shut down abnormal?
What starting part are you referring to? And what do you mean by treating it?

Is there a function to check the closeness of VISA?
Exiting LabVIEW closes all your VISA sessions. There is a Open VISA Session Monitor Vi in the labview\vi.lib\Utility\visa.llb that you can use to close your open VISA sessions. It is strongly recommended that you use VISA Close to close all your open VISA sessions.

I hope this helps!
Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 2 of 3
(2,817 Views)
VISA doesn't break the Read Operation if you flush the RX buffer. How can I break VISA Read Loop if I want to Exit application? Should I use other Serial Libraries like LVSERIAL?
 
Timeout it set to a big value (10 Seconds), I can't wait 10 seconds to for exiting my application.
 
Eugen
0 Kudos
Message 3 of 3
(2,808 Views)