VISA Resource Syntax and Examples
- Updated2025-01-24
- 3 minute(s) read
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 |
GPIB INSTR |
GPIB[ board ]:: primary address [:: secondary address ][::INSTR] |
GPIB INTFC |
GPIB[ board ]::INTFC |
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 |
ASRL board [::INSTR] |
TCPIP INSTR |
TCPIP[ board ]:: host address [:: LAN device name ][::INSTR] |
TCPIP INSTR |
TCPIP[ board ]::[[credential information]@ host address [:: HiSLIP device name [,HiSLIP port]][::INSTR] |
TCPIP SOCKET |
TCPIP[ board ]:: host address :: port ::SOCKET |
TCPIP SOCKET |
TCPIP[ board ]::[[credential information]@ 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 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.
Optional String Segments | Default Value |
---|---|
board |
0 |
GPIB secondary address |
none |
LAN device name |
inst0 |
HiSLIP device name |
hislip0 |
HiSLIP port |
4880 |
PXI bus |
0 |
PXI function |
0 |
credential information |
none |
USB interface number |
lowest numbered relevant interface |
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. |
GPIB::1::0::INSTR |
A GPIB device at primary address 1 and secondary address 0 in GPIB interface 0. |
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::INSTR |
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::hislip0::INSTR |
A TCP/IP device using HiSLIP rev 2 located at IPv4 address 1.2.3.4. The connection is to be secured with an ANONYMOUS SASL authentication mechanism. |
TCPIP0::SecureCreds@1.2.3.4::hislip0::INSTR |
A TCP/IP device using HiSLIP rev 2 located at IPv4 address 1.2.3.4. The connection is to be secured using the credential information (user, password) specified by SecureCreds. |
TCPIP0::1.2.3.4::999::SOCKET |
Raw TCP/IP access to port 999 at the specified IP address. |
TCPIP0::SecureCreds@1.2.3.4::999::SOCKET |
Raw TCP/IP access to port 999 at the specified IP address. The TLS connection is to be secured using the credential information (user certificate) specified by the string SecureCreds. |
TCPIP0::@1.2.3.4::999::SOCKET |
Raw TCP/IP access to port 999 at the specified IP address. The TLS connection is to be secured using only the server certificate validation. |
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::SN999::1::RAW |
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/ASRL1::INSTR |
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. |