Do we still need to close VISA sessions?

I know it sounds like a silly question but do we?
Back in my early days (LabVIEW 5.1) I used to have a set of favorite VI's for my instruments that opened a VISA session, performed a task (like taking a measurement), then closed the VISA session. I used these a lot as I could drop them in and throw a program together without having to worry about wiring the VISA sessions. Fact this speed of test development really sold our company on LabVIEW...
Well later on I was having an issue with a larger program crashing. After spending some time on the phone with a NI Engineer troubleshooting he told me that the constant opening and closing VISA sessions was not a good idea and could be the cause of my issues. So I rewrote the program opening a VISA session once for each instrument and closing it at the end. This cured the crashing and forced me to abandon my library of drop-in VI's that had served me so well for so long, totally changing the way I was writing my programs.
Now fast forward to a couple years ago when my company made the jump from Labview 5.1 to 8.0 (that was a big step) now we are at LabVIEW 2009
Among the many other changes from 5.1 to 8.0 most notably VISA had changed, I/O wire types, VISA Open was gone, VISA Close was deprecated, all my old programs have the (old) tag on the VISA blocks... AND there was a Automatically close VISA sessions in the advanced options
The fact that VISA Close was deprecated kind of leads me to believe that we are being guided to used the auto-close option. It certainly makes programming faster not having to drag the VISA wires out and close them... But often I still do just out of habit.  
This also has me wondering if we even still have to open a VISA session and wire it all the way through?
So take a look at the attached overly simplified examples and explain what is the "best method"?
Attachments:
VISA.png ‏64 KB

When the option is checked, VISA sessions are only closed automatically when your VI stops running.  My understanding, based on this, is that your two auto-close VISA examples are identical.  The session is opened the first time a resource is used and remains open until it is explicitly closed or until your VI stops running (if the automatically close VISA sessions option is checked).  If you don't automatically close VISA sessions and you do not close them explicitly, they will stay open even when your VI is not executing, which means they will open faster when you restart your code but will not be available to other applications.  Of course, exiting LabVIEW closes all VISA sessions.

Similar Messages

  • When I click on Firefox I get a message saying Firefox is already running, that I need to close Firefox or restart my computer and it still will not start, Why?

    Firefox was working great until at least 3 persons were on my computer over the weekend. Now, when I want to open Firefox to go to the internet I get a message telling me that it is already running, that I need to close it down and if that doesn't work I should restart my computer. I have done all this, turned the computer off and back on many times, but I still get the same message. I do not know what the other people may have done when they were using my computer.

    See these posts about the same problem:
    *[/questions/798251]
    *[/questions/823473]

  • Im trying to install adobe flash player and it says i need to close firefox to continue i have and it still says its not closed

    Im installing adobe flash player and its telling me to close mozilla firefox to continue. i exited off the internet but it still says i need to close it

    Download and installation are two separate steps. The Adobe Flash '''installation''' procedure requires that Firefox be closed before installing Flash.
    orange Firefox button > '''''Exit''''' or File > Exit to close Firefox. Then wait a minute or so before starting to install Flash.

  • TS1717 Now I'm starting to get annoyed. I have tried several times today to open up iTunes a message pops up saying that iTunes has encountered a problem. Then it says it needs to close it and Windows will notify me of a solution. Still nothing.

    I have tried several times to open iTunes. First I get a message that says that it's encountered a problem and then it said that it needs to close. It also says that windows will notify me of a solution. I've even tried uninstalling it as well as installing it again even downloading it again and still no luck. Any suggestions?

    I guess I'm just lucky.
    I've had my black 5Gb Zen Micro over 2 years, used nearly daily and zero problems.
    I bought a red 8Gb Zen MicroPhoto last summer, for the car. Again, plugged it in, loaded a bunch of music, never looked back. Another daily player, and all it's done is play music flawlessly.
    I also bought a silver 52Mb MuVo TX FM last summer for outdoor stuff and it did have one problem around December, but re-loading the firmware took maybe 5 minutes and it's been perfect ever since.
    At least in my experience, Creative players have been trouble free and good value.
    My brother got an iPod Shuffle given to him for a Christmas present and it locked up the first day. He ended up selling it and buying a Gb Zen Nano Plus.

  • I am trying to update to 5.0 and the installer keeps saying that I need to close Firefox to continue, but I have closed it and it still says I need to close it.

    I then tried to uninstall Mozilla 4.0 and it keeps saying the same thing that I need to close firefox before I can continue, but it is closed. I have no browsers open and it still will not allow the uninstall or the install.

    No iPod touch is capable of running both iOS 4.2 and 7.1.2, and you appear to have a second generation iPod touch, which can't be updated past 4.2.1.
    (110784)

  • I have just opened my brand new Macbook Pro and I'm a first time mac user. I have tried to download flash to enable me to watch you tube clips, but on trying to download it, it says I need to close Safari but after doing so, it still won't respond.

    I have just opened my brand new Macbook Pro and I'm a first time mac user. I have tried to download flash to enable me to watch youtube clips, but on trying to download it, it says I need to close Safari but after doing so, it still won't respond. Any tips? Help?

    Actually you need to quit Safari which is different from closing.  With Safari open go the menu bar for Safari/Quit Safari. 
    Mac 101:  Get Started Using A Mac 

  • When I close Firefox, then later want to start up again, I get I message that Firefox is still running. With "START TASK MANAGER", I need to close Firefox in order to start again.

    When I close Firefox, then later want to start up again, I get I message that Firefox is still running. With "START TASK MANAGER", I need to close Firefox in order to start again.

    I have the same problem. Firefox won't unload regardless of how long I wait. Literally hours ... I must go in and 'end the process'. This has been a real hassle for a while now. Even considered giving up on firefox. Please look into this! An additional problem; I have to run firefox to get the updates, but I can't get the updates to take because I can't get firefox to unload so I can restart it.

  • I have removed every possible componet of Mozilla Firefox from my computer and I still get a message when I turn on my computer that Firefox had a problem and needed to close. How do I get this completely removed from my computer?

    I have removed every possible componet of Mozilla Firefox from my computer and I still get a message when I turn on my computer that Firefox had a problem and needed to close. How do I get this completely removed from my computer?

    See:
    * http://kb.mozillazine.org/Profile_backup
    You can transfer files from the old profile to that new profile (be careful not to copy corrupted files)<br />
    See:
    * http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • I use word for mac and keep getting an error message microsoft syn services has encountered a problem and needs to close.  tell microsoft about this problem. even if i clicked send info to m/soft the message still comes up repeatedly i've turned comp off

    i use word for mac & keep getting error message "microsoft sync services has encountered a problem & needs to close. tell m/soft about this prob" even if i tick send to m/soft and turn computer off & restart it just keeps reappearing repeatedly?

    i use word for mac & keep getting error message "microsoft sync services has encountered a problem & needs to close. tell m/soft about this prob" even if i tick send to m/soft and turn computer off & restart it just keeps reappearing repeatedly?

  • WHENEVER i LOAD ITUNES i GET A POP UP STATING THAT iTUNES HAS STOPPED WORKING AND NEEDS TO CLOSE. wHEN wINDOWS FINDS THE PROBLEM, THEY WILL NOTIFY ME. tHIS HAPPENS ALL THE TIME. i UNINSTALLED AND INSTALLED TWICE AND IT STILL HAPPENS. HOW DO I CORRRECT

    I keep getting a pop up on Itunes when I try to add a file saying that ITUNES HAS STOPPED WORKING AN NEEDS TO CLOSE. W     indows will notify me when corrected. iuninstalled and reinstalled 3 times to no avail. how do i fix?

    a further message  box states that Data Execution Prevention has closed the program.
    Try updating your QuickTime to the most recent version. Does that clear up the DEP errors in iTunes?

  • Why do I get an error message that tells me I need to close the current session of Firefox. It is open somewhere and I must restart my computer to get past this. Why?

    I cannot open Firefox on my system as a message opens that tells me I must close the session that is currently running. However, I have not opened it and it doesn't show anywhere on my computer that it is open. The error message tells me that I must restart my computer which I have to do to get past this point. Then it works fine after that. I have been using Firefox for about 5 months and it has happened about 6 times now. A bit frustrating I must say. Thank you for your assistance on this matter.

    Open Task Manager and click on the Processes tab. Scroll down to "Firefox.exe" , click on that line and click on "End Process" button.

  • Still with Error itunes needs to close

    I don't get it. I've installed uninstalled done all sorts of things and the fact is. I need itunes to work! Now my problem is that supposedly a new version of quicktime is installed yet I can't see it or delete it. I don't konw how it would help but I want redownload it.
    Other than that, any help with getting my itunes to open would be appreciated.

    +"iTunes has encountered a problem and needs to close."+
    let's first check to see if this is associated with a problem with your QuickTime. (iTunes needs a properly functioning QuickTime in order to work correctly.)
    try launching your QuickTime. does it:
    (a) launch perfectly fine?
    (b) fail to launch with an error message? (if so, what does it say?)
    (c) exhibit other peculiar behavior? (if so, could you describe it for us?)

  • I keep getting the msg 'Firefox is already running...need to close out or restart...'; can't get it to reopen a window w/o restarting

    During any session at my computer if I mistakenly close out Firefox and then need to reopen, I get the message that "Firefox is already running...need to close current (window)...or restart your system.." No matter what I do, I can't seem to reopen a Firefox browser window without restarting my computer. The same problem occurs when i leave my computer in Sleep mode for a few hours, and return for another session. I try to double click the desktop icon to open Firefox, and get the same message. Restarting my computer is the only way I am able to open a Firefox window.

    Do you still have a [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder] ?
    * [[Firefox is already running but is not responding]]
    * http://kb.mozillazine.org/Profile_in_use

  • Open VISA Session

    Hi to all,
    I'm newbie with Labview 8.5, I'm viewing some example to connect serial port with VISA blocks. I see that these examples use a VISA Resource Name control to define the resource (example selecting COM1) but after they don't use Visa Open block to open a VISA session with the device, but they use directly the sequence "VISA write - VISA read - VISA Close" blocks. Why don't they use VISA open session to open a session with device?
    I read in help that VISA Resource Name contains some informations on resource and it maintains VISA session also, instead VISA session is a unique identifier, I think that when I create new Visa Resource name Control, Labview automatically open a session with this resource, so it isn't necessary to use VISA Open block to create the session, isn't it?
    best regards

    It's not correct to say that just dropping a resource control itself on the front panel or diagram opens a session. The resource is automatically opened when calling VISA function (i.e. a write or a read), if the resource was not explicitly opened with the VISA Open function. You can see this yourself. Put just a resource control on the block diagram, select the resource and run the VI. Click the arrow on the control and look at the resources. Now, wire a VISA Write to the control, run the VI, and look at the resources. You will now see a little icon next to the resource you selected. This indicates that the resource is open. The automatic opening of a resource was a change made to VISA several years ago and you will still see the VISA Open in instrument drivers. It's not a bad idea to always use the VISA Open function. For serial, you would put it before the VISA Configure Serial Port.
    Attachments:
    Open Resource.PNG ‏4 KB

  • Open VISA sessions (including duplicates​)

    I would like to obtain a list of open visa sessions. I found this knowledge base article which should work, however when opening duplicate sessions (e.g. "COM6 (1)") the list contains empty entries or multiple COM1 references.
    Please try the attached vi to see the effect; on my system the visa resource name control shows COM1 & COM2 (default system ports), COM6 & COM12 (2 USB-serial converters) and LPT1 (system parallel port) at start up.
    This is shown after opening "COM6" (3x) > opening "COM12" (4x) > opening "COM1" (1x) > closing "COM12" and "COM12 (1)"
    Maybe there is a way to read the contents of the drop down menu of the VISA resource control which contains all the information and is also updated automatically.
    Any help is greatly appreciated, regards W@Work
    Note: I'm using LabVIEW 2009 (32-bit) on Windows XP
    Attachments:
    open visa sessions.vi ‏28 KB

    Thank you very much for your response,
    First I'll explain the duplication: the "VISA open" VI allows for opening a duplicate session (which refers to the same port). I want to use this so I can have a separate session for writing and reading which can be locked and unlocked separately. The example I attached to my original post opens duplicate sessions when you (try to) open the same port ("COM1" for example) multiple times. 
    Could you please try the example again selecting "COM1" as "VISA resource name", then click "Open" two times. Now you should see "COM1" and "COM1 (1)" in both lists. On my system clicking "Close" (while "COM1" is still selected) removes "COM1 (1)" from the "open sessions found" list while it should remove "COM1".
    MAX lists ports 1, 2, 6 & 12 that I mentioned in my original post. When running the example this list does not change (no "COM1 (1)" for example) so I think this is just a list of physical ports, not the open VISA sessions. 
    I think you forgot to attach the image but I guess this is the printscreen you're asking for:

Maybe you are looking for