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.
| ||||||
![]() |
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.
|
The following table shows the syntax for the address string. Optional parameters are shown in square brackets ([ ]).
Interface | Syntax |
---|---|
VXI INSTR | VXI[board]::VXI logical address[::INSTR] |
VXI MEMACC | VXI[board]::MEMACC |
VXI BACKPLANE | VXI[board][::VXI logical address]::BACKPLANE |
VXI SERVANT | VXI[board]::SERVANT |
GPIB-VXI INSTR | GPIB-VXI[board]::VXI logical address[::INSTR] |
GPIB-VXI MEMACC | GPIB-VXI[board]::MEMACC |
GPIB-VXI BACKPLANE | GPIB-VXI[board][::VXI logical address]::BACKPLANE |
GPIB INSTR | GPIB[board]::primary address[::secondary address][::INSTR] |
GPIB INTFC | GPIB[board]::INTFC |
GPIB SERVANT | GPIB[board]::SERVANT |
PXI INSTR | PXI[board]::device[::function][::INSTR] |
Serial INSTR | ASRL[board][::INSTR] |
TCPIP INSTR | TCPIP[board]::host address[::LAN device name][::INSTR] |
TCPIP SOCKET | TCPIP[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 Segment | Default Value |
---|---|
board | 0 |
secondary address | None |
LAN device name | inst0 |
The following table shows examples of address strings.
Address String | Description |
---|---|
VXI0::1::INSTR | A VXI device at logical address 1 in VXI interface VXI0. |
GPIB-VXI::9::INSTR | A VXI device at logical address 9 in a GPIB-VXI controlled system. |
GPIB::1::0::INSTR | A GPIB device at primary address 1 and secondary address 0 in GPIB interface 0. |
ASRL1::INSTR | A serial device attached to interface ASRL1. |
VXI::MEMACC | Board-level register access to the VXI interface. |
GPIB-VXI1::MEMACC | Board-level register access to GPIB-VXI interface number 1. |
GPIB2::INTFC | Interface or raw resource for GPIB interface 2. |
VXI::1::BACKPLANE | Mainframe resource for chassis 1 on the default VXI system, which is interface 0. |
GPIB-VXI2::BACKPLANE | Mainframe resource for default chassis on GPIB-VXI interface 2. |
GPIB1::SERVANT | Servant/device-side resource for GPIB interface 1. |
VXI0::SERVANT | Servant/device-side resource for VXI interface 0. |
PXI::15::INSTR | PXI device number 15 on bus 0. |
TCPIP0::1.2.3.4::999::SOCKET | Raw TCP/IP access to port 999 at the specified IP address. |
TCPIP::dev@company.com::INSTR | A TCP/IP device using VXI-11 located at the specified address. This uses the default LAN Device Name of inst0. |