VISA Resource Syntax and Examples
The following table shows the grammar for the address string. Optional string segments are shown in square brackets ([ ]).
Interface | Syntax |
---|---|
ENET-Serial INSTR |
ASRL[0]::host address::serial port::INSTR |
FireWire INSTR |
FIREWIRE[board]::[vendorId]::[chipId]::INSTR |
GPIB INSTR |
GPIB[board]::primary address[::secondary address][::INSTR] |
GPIB INTFC |
GPIB[board]::INTFC |
GPIB-VXI BACKPLANE |
GPIB-VXI[board][::VXI logical address]::BACKPLANE |
GPIB-VXI INSTR |
GPIB-VXI[board]::VXI logical address[::INSTR] |
GPIB-VXI MEMACC |
GPIB-VXI[board]::MEMACC |
PXI BACKPLANE |
PXI[interface]::chassis number::BACKPLANE |
PXI INSTR |
PXI[bus]::device[::function][::INSTR] |
PXI INSTR |
PXI[interface]::[bus-]device[.function][::INSTR] |
PXI INSTR |
PXI[interface]::CHASSISchassis number::SLOTslot number[::FUNCfunction][::INSTR] |
PXI MEMACC |
PXI[interface]::MEMACC |
Remote NI-VISA |
visa://host address[:server port]/remote resource |
Serial INSTR |
ASRLboard[::INSTR] |
TCPIP INSTR |
TCPIP[board]::host address[::LAN device name][::INSTR] |
TCPIP SOCKET |
TCPIP[board]::host address::port::SOCKET |
USB INSTR |
USB[board]::manufacturer ID::model code::serial number[::USB interface number][::INSTR] |
USB RAW |
USB[board]::manufacturer ID::model code::serial number[::USB interface number]::RAW |
VXI BACKPLANE |
VXI[board][::VXI logical address]::BACKPLANE |
VXI INSTR |
VXI[board]::VXI logical address[::INSTR] |
VXI MEMACC |
VXI[board]::MEMACC |
VXI SERVANT |
VXI[board]::SERVANT |
Use the GPIB keyword to establish communication with GPIB resources. Use the VXI keyword for VXI resources via embedded, MXIbus, or 1394 controllers. Use the GPIB-VXI keyword for VXI resources via a GPIB-VXI controller. Use the ASRL keyword to establish communication with an asynchronous serial (such as RS-232 or RS-485) device. Use the PXI keyword for PXI and PCI resources. Use the TCPIP keyword for Ethernet communication.
The following table shows the default value for optional string segments.
Optional String Segments | Default Value |
---|---|
board |
0 |
GPIB secondary address |
none |
LAN device name |
inst0 |
PXI bus |
0 |
PXI function |
0 |
USB interface number |
lowest numbered relevant interface |
The following table shows examples of address strings.
Address String | Description |
---|---|
ASRL::1.2.3.4::2::INSTR |
A serial device attached to port 2 of the ENET Serial controller at address 1.2.3.4. |
ASRL1::INSTR |
A serial device attached to interface ASRL1. |
FIREWIRE::0x123456:: |
A FireWire device a with vendor ID of 0x123456 and a chip ID of 0x123456789A. |
GPIB::1::0::INSTR |
A GPIB device at primary address 1 and secondary address 0 in GPIB interface 0. |
GPIB-VXI::9::INSTR |
A VXI device at logical address 9 in a GPIB-VXI controlled system. |
GPIB-VXI1::MEMACC |
Board-level register access to GPIB-VXI interface number 1. |
GPIB-VXI2::BACKPLANE |
Mainframe resource for default chassis on GPIB-VXI interface 2. |
GPIB2::INTFC |
Interface or raw board resource for GPIB interface 2. |
PXI::15::INSTR |
PXI device number 15 on bus 0 with implied function 0. |
PXI::2::BACKPLANE |
Backplane resource for chassis 2 on the default PXI system, which is interface 0. |
PXI::CHASSIS1::SLOT3 |
PXI device in slot number 3 of the PXI chassis configured as chassis 1. |
PXI0::2-12.1::INSTR |
PXI bus number 2, device 12 with function 1. |
PXI0::MEMACC |
PXI MEMACC session. |
TCPIP::dev.company.com |
A TCP/IP device using VXI-11 or LXI located at the specified address. This uses the default LAN Device Name of inst0. |
TCPIP0::1.2.3.4::999 |
Raw TCP/IP access to port 999 at the specified IP address. |
USB::0x1234::125::A22-5 ::INSTR |
A USB Test & Measurement class device with manufacturer ID 0x1234, model code 125, and serial number A22-5. This uses the device's first available USBTMC interface. This is usually number 0. |
USB::0x5678::0x33:: |
A raw USB nonclass device with manufacturer ID 0x5678, model code 0x33, and serial number SN999. This uses the device's interface number 1. |
visa://hostname/ |
The resource ASRL1::INSTR on the specified remote system. |
VXI::1::BACKPLANE |
Mainframe resource for chassis 1 on the default VXI system, which is interface 0. |
VXI::MEMACC |
Board-level register access to the VXI interface. |
VXI0::1::INSTR |
A VXI device at logical address 1 in VXI interface VXI0. |
VXI0::SERVANT |
Servant/device-side resource for VXI interface 0. |