VISA Open

Opens a session to the specified device and returns a session identifier that can be used to call any other operations of that device. Refer to VISA Close for more information. Details

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. This control also specifies the session and class. Refer to VISA Resource Name Control for more information.
duplicate session If TRUE, and there is currently a session opened to the resource, another session will be opened to the resource. If FALSE and a session has been opened to the resource, the open session will be used. Refer to the VISA Session RefNum for more information about sessions in VISA.
access mode should be set to zero (0). The value VI_EXCLUSIVE_LOCK (1) is used to acquire an exclusive lock immediately upon opening a session; if a lock cannot be acquired, the session is closed and an error is returned.

The value VI_LOAD_CONFIG (4) is used to configure attributes to values specified by some external configuration utility, such as Measurement & Automation Explorer (on Windows) or visaconf (on Solaris 2 and Linux).

error in describes error conditions that occur before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurs before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.
status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.
code is the error or warning code. The default is 0. If status is TRUE, code is a non-zero error code. If status is FALSE, code is 0 or a warning code.
source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.
VISA resource name is the resource to which a VISA session is opened and its class. The class must match that of the VISA resource name input. Refer to VISA Resource Name Control for more information.
error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.
status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.
code is the error or warning code. If status is TRUE, code is a non-zero error code. If status is FALSE, code is 0 or a warning code.
source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning.

VISA Open Details

The following table shows the syntax for the address string. Optional parameters are shown in square brackets ([ ]).

InterfaceSyntax
VXI INSTRVXI[board]::VXI logical address[::INSTR]
VXI MEMACCVXI[board]::MEMACC
VXI BACKPLANEVXI[board][::VXI logical address]::BACKPLANE
VXI SERVANTVXI[board]::SERVANT
GPIB-VXI INSTRGPIB-VXI[board]::VXI logical address[::INSTR]
GPIB-VXI MEMACCGPIB-VXI[board]::MEMACC
GPIB-VXI BACKPLANEGPIB-VXI[board][::VXI logical address]::BACKPLANE
GPIB INSTRGPIB[board]::primary address[::secondary address][::INSTR]
GPIB INTFCGPIB[board]::INTFC
GPIB SERVANTGPIB[board]::SERVANT
PXI INSTRPXI[board]::device[::function][::INSTR]
Serial INSTRASRL[board][::INSTR]
TCPIP INSTRTCPIP[board]::host address[::LAN device name][::INSTR]
TCPIP SOCKETTCPIP[board]::host address::port::SOCKET

The VXI keyword is used for VXI instruments through either embedded or MXIbus controllers. The GPIB keyword is used to establish communication with a GPIB device. The GPIB-VXI keyword is used for a GPIB-VXI controller. The ASRL keyword is used to establish communication with an asynchronous serial (such as RS-232) device.

The INSTR keyword specifies a VISA resource of the type INSTR.

The following table shows the default value for optional string segments.

Optional String SegmentDefault Value
board0
secondary addressNone
LAN device nameinst0

The following table shows examples of address strings.

Address StringDescription
VXI0::1::INSTRA VXI device at logical address 1 in VXI interface VXI0.
GPIB-VXI::9::INSTRA VXI device at logical address 9 in a GPIB-VXI controlled system.
GPIB::1::0::INSTRA GPIB device at primary address 1 and secondary address 0 in GPIB interface 0.
ASRL1::INSTRA serial device attached to interface ASRL1.
VXI::MEMACCBoard-level register access to the VXI interface.
GPIB-VXI1::MEMACCBoard-level register access to GPIB-VXI interface number 1.
GPIB2::INTFCInterface or raw resource for GPIB interface 2.
VXI::1::BACKPLANEMainframe resource for chassis 1 on the default VXI system, which is interface 0.
GPIB-VXI2::BACKPLANEMainframe resource for default chassis on GPIB-VXI interface 2.
GPIB1::SERVANTServant/device-side resource for GPIB interface 1.
VXI0::SERVANTServant/device-side resource for VXI interface 0.
PXI::15::INSTRPXI device number 15 on bus 0.
TCPIP0::1.2.3.4::999::SOCKETRaw TCP/IP access to port 999 at the specified IP address.
TCPIP::dev@company.com::INSTRA TCP/IP device using VXI-11 located at the specified address. This uses the default LAN Device Name of inst0.