Main Content

RsrcName

Resource name for VISA instrument

Description

RsrcName indicates the resource name for a VISA instrument. When you create a VISA object, RsrcName is automatically assigned the value specified in the visa function.

The resource name is a symbolic name for the instrument. The resource name you supply to visa depends on the interface and has the format shown below. The components in brackets are optional and have a default value of 0, except port_number, which has a default value of 1.

Interface

Resource Name

VXI

VXI[chassis]::VXI_logical_address::INSTR

GPIB-VXI

GPIB-VXI[chassis]::VXI_logical_address::INSTR

GPIB

GPIB[board]::primary_address[::secondary_address]::INSTR

TCPIP

TCPIP[board]::remote_host[::lan_device_name]::INSTR

RSIB

RSIB::remote_host::INSTR

Serial

ASRL[port_number]::INSTR

USB

USB[board]::manid::model_code::serial_No[::interface_No]::INSTR

If you change the BoardIndex, ChassisIndex, InterfaceIndex, LANName, LogicalAddress, ManufacturerID, ModelCode, Port, PrimaryAddress, RemoteHost, SecondaryAddress, or SerialNumber property value, RsrcName is automatically updated to reflect the change.

Characteristics

Usage

VISA-GPIB, VISA-VXI, VISA-GPIB-VXI, VISA-serial

Read only

Always

Data type

Character vector

Values

The value is defined when the instrument object is created.

Examples

To create a VISA-GPIB object associated with a GPIB controller with board index 0 and an instrument with primary address 1, you supply the following resource name to the visa function.

vg = visa('ni','GPIB0::1::INSTR');

To create a VISA-VXI object associated with a VXI chassis with index 0 and an instrument with logical address 130, you supply the following resource name to the visa function.

vv = visa('keysight','VXI0::130::INSTR');

To create a VISA-GPIB-VXI object associated with a VXI chassis with index 0 and an instrument with logical address 80, you supply the following resource name to the visa function.

vgv = visa('keysight','GPIB-VXI0::80::INSTR');

To create a VISA-serial object associated with the COM1 serial port, you supply the following resource name to the visa function.

vs = visa('ni','ASRL1::INSTR');