From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How are VISA sessions managed by executables?

I have noticed that VISA sessions opened in the development environment (Labview version 6.0.2) do not show up in the VISA I/O reference control of compiled executables and visa versa. I assume that each EXE has its own memory space for open VISA sessions. Is it possible to get separate EXE's and the development environment to use the same VISA memory space so that all applications and uncompiled VI's show the same open VISA sessions?
0 Kudos
Message 1 of 3
(3,143 Views)
When opening a VISA Resource Name from a "control" in LabVIEW, you are given options based on what resources are available on the current machine. For instance a computer with one serial port and one gpib interface would provide resources similar to:
GPIB0::2::INSTR
COM1
These options are dynamically configured when you load your LabVIEW session. LabVIEW detects available and compatible VISA resources and them list them under "VISA resource name." Therefore, what resources are available are dependent on the setup of the machine where the executable is being run. As a result of LabVIEW detecting resources, there is no operation that allows you to set a constant list of resources for VISA sessions.

Best Regards,
Chris D
0 Kudos
Message 2 of 3
(3,143 Views)
This answer, while correct, doesn't address the issue of some VISA classes and how Labview addresses open VISA sessions. It is quite correct concerning the listing of available resources, that is not the nature of my problem. The heart of the matter is the Open VISA sessions and how they are returned by the "Open VISA sessions.vi" vi in the vi.lib utilities. Also, the VISA reference control does, as you say, display currently available resources (for some classes), but it also displays currently open sessions below a dividing line for those resources not usually displayed.

The best example of this is for the TCP/IP class. Resources of this class are not displayed unless a session for them has been opened.

I have written and compiled an executable tha
t opens a VISA session for a TCP/IP resource. After opening it, the session is displayed in the executable's VISA resource control below a dividing line that separates it from the available serial and GPIB resources. If, however, I have an uncompiled VI with a VISA control open in the development environment at the same time, the open session is not displayed in that VI's resource control. If I run the compiled executable as an uncompiled VI in the development environment along with other VI's containing VISA resource controls, the open TCP/IP session is displayed in all VI's. The same holds true for the "Open VI sessions.vi". Sessions opened by compiled VI's are not returned by this subVI when it is run from outside the executable.

As I stated before, it appears the executable creates its own separate memory space for listing open VISA sessions.

I would like to create a small executable that logs in to TCP/IP resources and makes those sessions available to other VI's that ar
e either uncompiled and running in the devel environment, or are running as separate executables.

Thanks for your comments

Steve
0 Kudos
Message 3 of 3
(3,143 Views)