03-20-2015 10:04 AM
Any visa function such as Configure, Write, Read, etc. automatically opens the visa port, so why would you ever use the VISA Open block unless you wanted to set the access mode or the duplicate session?
My programs all have the same format, but they may be antiquated.
Initialize
-Open VISA
-Configure VISA
-Configure port (serial, etc.)
LOOP
-Write/Read
Cleanup
-Close VISA
Is the open visa unncessary? Should I just configure and skip the open?
03-20-2015 10:11 AM
03-20-2015 10:45 AM
By including an explicit open, you can use the error out to determine if the VISA name is valid and actually available before configuring it.
Think of it sort of like listening for the dial tone before dialing digits.
http://digital.ni.com/public.nsf/allkb/A2561CDE98B66DD4862566510078264F
03-20-2015 10:54 AM
03-20-2015 11:12 AM
@PhillipBrooks wrote:
By including an explicit open, you can use the error out to determine if the VISA name is valid and actually available before configuring it.
Think of it sort of like listening for the dial tone before dialing digits.
http://digital.ni.com/public.nsf/allkb/A2561CDE98B66DD4862566510078264F
Re Dial tone: like VISA Open, I haven't heard a Dial Tone on my Cell for quite some time.
VISA has gotten a lot smarter in the last decade. If a session exists to a named resource within the application that asks for access to it, it is used, if not one is attempted to be opened. There is an ini option to automatically close VISA sessions when the top level vi goes idle (this can be helpful if you are bouncing between PuTTY and LabVIEW but a real pain with some of the load / unload options in TestStand Sequences)
The ONLY VISA Session property that appears to have a need for an explicit Open and wired IO sessions through all modules is "User.Data" (I never did understand why that property does not "Properly" persist with implicitly re-opened sessions)