LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it necessary to close a visa session?

Just wondering if it is necessary to close a visa session after every read and write?  I'm not that familiar with visa yet, and I am wondering if there are any dangers of leaving that port open?  I will make several read and writes intermittantly to this port, but sometimes they may be staggered by as much as 15 minutes....Suggestions?
 
Grub
 
Hell, there are no rules here...we're trying to accomplish something!!! - Thomas Edison
0 Kudos
Message 1 of 3
(2,536 Views)
You don't have to do an open and close after every read/write. All that you should have to do is a single open when your program starts and a single close when you stop it. There are no dangers associated with leaving the session open. What you can't do is have a session open and then have a different application try to communicate with the instrument using a different method. This would be something like your program using VISA to access the serial port and you trying to open Hyperterminal to talk to the same port. In the applications I write, I usually communicate to the UUT through the serial port. Engineers and technicians, if they wish to do some debug, like to be able to pause the program and use Hyperterminal or Procomm. Because of that, in my VISA serial routines I do an open and close each time but that's the only reason I've found to do it.
0 Kudos
Message 2 of 3
(2,532 Views)
Thank you....
Hell, there are no rules here...we're trying to accomplish something!!! - Thomas Edison
0 Kudos
Message 3 of 3
(2,529 Views)