VISA Open Function

Owning Palette: VISA Advanced VIs and Functions

Requires: Base Development System

Opens a session to the device specified by VISA resource name and returns a session identifier that can be used to call any other operations of that device.

Details  Example

 Add to the block diagram  Find on the palette
VISA Open timeout specifies the maximum time period, in milliseconds, that VISA Open waits before returning an error. It does not set the I/O timeout. To specify the timeout used for future operations on the VISA session, use VISA Set Timeout.
VISA resource name specifies the resource to be opened. The VISA resource name control also specifies the session and class.
If duplicate session is TRUE and there is currently a session opened to the resource, another session is opened to the resource. If duplicate session is set to FALSE and a session is opened to the resource, the open session is used. A VISA session is a unique logical identifier used by VISA to communicate with a resource. The VISA session is maintained by the VISA resource name control and is not seen by the user.
access mode specifies how to access the device. This input accepts the following values.

0VISA Defaults (default)—Open session without using an exclusive lock or loading configuration information.
1Exclusive Lock—Acquire an exclusive lock immediately upon opening a session. If a lock cannot be acquired, the session is closed and an error is returned.
4Load Configured Settings—Configure attributes to values specified by an external configuration utility, such as the following utilities:
  • (Windows) Measurement & Automation Explorer
  • (Mac OS X) NI-VISA Configuration
  • (Linux) visaconf
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
VISA resource name out is the resource to which a VISA session is opened and its class. The class matches that of the VISA resource name input. Refer to VISA resource name control for more information.
error out contains error information. This output provides standard error out functionality.

VISA Open Details

If you open a significant number of VISA sessions without closing them, you decrease the available memory resources. Close the session with the VISA Close function.

Note  This function recognizes all resource strings returned by VISA Find Resource. However, VISA Find Resource does not necessarily return all strings that you pass to this function.

Example

Refer to the GPIB with VISA functions VI in the labview\examples\Instrument IO\GPIB directory for an example of using the VISA Open function.

 Open example  Find related examples