0% found this document useful (0 votes)
31 views7 pages

Labview Programming Reference Manual Visa Resource Name Control 2025-06-17-17-25-56

The LabVIEW Programming Reference Manual provides detailed information on the VISA Resource Name Control, which is used to specify and maintain a VISA session for communication with various resources. It includes syntax for different interface types and examples of address strings for various devices. The document emphasizes the importance of class compatibility when wiring resource names to functions to avoid errors.

Uploaded by

Mein samay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views7 pages

Labview Programming Reference Manual Visa Resource Name Control 2025-06-17-17-25-56

The LabVIEW Programming Reference Manual provides detailed information on the VISA Resource Name Control, which is used to specify and maintain a VISA session for communication with various resources. It includes syntax for different interface types and examples of address strings for various devices. The document emphasizes the importance of class compatibility when wiring resource names to functions to avoid errors.

Uploaded by

Mein samay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

LabVIEW

Programming
Reference
Manual

2025-06-17
LabVIEW Programming Reference Manual

Contents
VISA Resource Name Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 ni.com
VISA Resource Name Control

VISA Resource Name Control


Use the VISA resource name control to specify the resource to which a VISA session
will be opened and to maintain the session and class. A VISA session is a unique logical
identifier used by VISA to communicate with a resource. The VISA session is
maintained by the VISA resource name control and is not seen by the user. VISA
resource name out is a copy of the resource name that is passed out of the VISA
functions. By passing the resource name in and out of functions and VIs, you can
simplify dataflow programming by chaining functions and VIs together. This is similar
to the file refnum outputs used by the File I/O functions.

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

Interface Syntax Classes

Instr;

VXI/GPIB-VXI MBD
VXI INSTR VXI[board]::VXI logical address[::INSTR] Instr;

VXI/GPIB-VXI/VME
RBD Instr

VXI/GPIB-VXI/VME
VXI MEMACC VXI[board]::MEMACC
MemAcc
VXI VXI/GPIB-VXI
VXI[board][::VXI logical address]::BACKPLANE
BACKPLANE Backplane
VXI SERVANT VXI[board]::SERVANT VXI Servant

VXI/GPIB-VXI MBD
Instr;
GPIB-VXI
GPIB-VXI[board]::VXI logical address[::INSTR]
INSTR
VXI/GPIB-VXI/VME
RBD Instr

© National Instruments 3
VISA Resource Name Control

Interface Syntax Classes


GPIB-VXI VXI/GPIB-VXI/VME
GPIB-VXI[board]::MEMACC
MEMACC MemAcc
GPIB-VXI VXI/GPIB-VXI
GPIB-VXI[board][::VXI logical address]::BACKPLANE
BACKPLANE Backplane
GPIB[board]::primary address[::GPIB secondary
GPIB INSTR GPIB Instr
address][::INSTR]
GPIB
GPIB INTFC GPIB[board]::INTFC
BoardInterface
GPIB
GPIB[board]::SERVANT N/A
SERVANT
PXI INSTR PXI[bus]::device[::function][::INSTR] PXI Instr
PXI INSTR PXI[interface]::[bus-]device[.function][::INSTR] PXI Instr
PXI MEMACC PXI[interface]::MEMACC PXI MemAcc
Serial INSTR ASRL[board][::INSTR] Serial Instr
TCPIP INSTR TCPIP[board]::host address[::LAN device name][::INSTR] TCP/IP Instr
TCPIP
TCPIP[board]::host address::port::SOCKET TCP/IP Socket
SOCKET
USB[board]::manufacturer ID::model code::serial
USB INSTR USB Instr
number[::USB interface number][::INSTR]
USB[board]::manufacturer ID::model code::serial
USB RAW USB Raw
number[::USB interface number]::RAW

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 RS232) device.

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

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

4 ni.com
VISA Resource Name Control

Optional String Segment Default Value


board 0
GPIB secondary address None
LAN device name inst0
PXI function 0
USB interface number lowest numbered relevant interface

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.
A VXI device at logical address 9 in a GPIB-VXI controlled
GPIB-VXI::9::INSTR
system.
A GPIB device at primary address 1 and secondary address 0 in
GPIB::1::0::INSTR
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.
Mainframe resource for chassis 1 on the default VXI system,
VXI::1::BACKPLANE
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.
TCPIP0::1.2.3.4::999::SOCKET Raw TCP/IP access to port 999 at the specified IP address.
A TCP/IP device using VXI-11 located at the specified address.
TCPIP::dev.company.com::INSTR
This uses the default LAN Device Name of inst0.
PXI::15::INSTR PXI device number 15 on bus 0.
PXI0::2-12.1::INSTR PXI bus number 2, device 12 with function 1.
PXI0::MEMACC PXI MEMACC session.

© National Instruments 5
VISA Resource Name Control

Address String Description


The resource on the specified remote system. The hostname
can be represented as either an IP address (dot-notation) or
visa://hostname/resource
network machine name. This remote system need not be
explicitly configured on the client system.
A USB Test & Measurement class device with manufacturer ID
0x1234, model code 125, and serial number A22-5. This uses the
USB::0x1234::125::A22-5::INSTR
first available USBTMC interface of the device. This is usually
number 0.
A raw USB nonclass device with manufacturer ID 0x5678, model
USB::0x5678::0x33::SN999::1::RAW code 0x33, and serial number SN999. This uses the device
interface number 1.

By default, the VISA resource name control is set to the Instr class, which also
corresponds to the class of the session to be opened. You can change the class type by
right-clicking the control in edit mode and selecting a different class from the shortcut
menu.

VISA functions vary in the class of VISA resource name that can be wired to them. The
valid classes for each function are listed in the NI-VISA Help. For example, the functions
on the Register Access and Low Level Register Access palettes do not accept VISA
sessions of class GPIB Instr or Serial Instr.

If you wire the VISA resource name control to a function that does not accept the class
of the session, or if you wire two resource names of differing classes together, the
block diagram will not run and a Class Conflict error is reported.

Note You can wire resource names set to the Event classes only to the VISA
Close function and a Property Node.

If you wire the VISA resource name control to a function that does not accept the class
of the session, or if you wire two resource names of differing classes together, the
block diagram will not run and a Class Conflict error is reported.

Note VISA name controls and constants are available on all platforms.

6 ni.com
VISA Resource Name Control

However, if you try to run a VI with a name control that contains a resource
string for a device that your platform does not support, you will receive an
error.

© 2025 National Instruments Corporation. © National Instruments 7

You might also like