VISA Resource Types

NI-VISA

VISA Resource Types

Currently, there are several VISA resource types—INSTR Resource, MEMACC Resource, INTFC Resource, BACKPLANE Resource, SERVANT Resource, SOCKET Resource, and RAW Resource. Most VISA applications and instrument drivers use only the INSTR resource.

INSTR

A VISA Instrument Control (INSTR) resource lets a controller interact with the device associated with the given resource. This resource type grants the controller the following services to perform message-based and/or register-based I/O, depending on the type of device and the interface to which the device is connected.

Basic I/O services include the ability to send and receive blocks of data to and from the device. The meaning of the data is device dependent, and could be a message, command, or other binary encoded data. For devices compliant with IEEE 488, the basic I/O services also include triggering (both software and hardware), servicing requests, reading status bytes, and clearing the device.

Formatted I/O services provide both formatted and buffered I/O capabilities for data transfers to and from devices. The formatting capabilities include those specified by ANSI C, with extensions for common protocols used by instrumentation systems. Buffering improves system performance by making it possible to not only transfer large blocks of data, but also send several commands at one time.

Memory I/O (or Register I/O) services allow register-level access to devices connected to interfaces that support direct memory access, such as the VXIbus or VMEbus. Both high-level and low-level access services have operations for individual register accesses, with a trade-off between speed and complexity. The high-level access services also have operations for moving large blocks of data to and from devices. When using an INSTR resource, all address parameters are relative to the device's assigned memory base in the given address space; knowing a device's base address is neither required by nor relevant to the user.

Shared Memory services make it possible to allocate memory on a particular device that is to be used exclusively by a given session. This is usually available only on devices that export shared memory specifically for such a purpose, such as a VXIbus or VMEbus controller.

MEMACC

A VISA Memory Access (MEMACC) resource lets a controller interact with the interface associated with the given resource. Advanced users who need to perform memory accesses directly between multiple devices typically use the MEMACC resource. This resource type gives the controller the following services to access arbitrary registers or memory addresses on memory-mapped buses.

Memory I/O (or Register I/O) services allow register level access to interfaces that support direct memory access, such as the VXIbus or VMEbus. Both high-level and low-level access services have operations for individual register accesses, with a trade-off between speed and complexity. The high-level access services also have operations for moving large blocks of data to and from arbitrary addresses. When using a MEMACC resource, all address parameters are absolute within the given address space; knowing a device's base address is both required by and relevant to the user.

INTFC

A VISA GPIB Bus Interface (INTFC) resource lets a controller interact with any devices connected to the board associated with the given resource. Advanced GPIB users who need to control multiple devices simultaneously or need to have multiple controllers in a single system typically use the INTFC resource. This resource type provides basic and formatted I/O services. In addition, the controller can directly query and manipulate specific lines on the bus, and also pass control to other devices with controller capability.

Basic I/O services include the ability to send and receive blocks of data onto and from the bus. The meaning of the data is device dependent, and could be a message, command, or other binary encoded data. The basic I/O services also include triggering devices on the bus and sending miscellaneous commands to any or all devices.

Formatted I/O services provide both formatted and buffered I/O capabilities for data transfers to and from devices. The formatting capabilities include those specified by ANSI C, with extensions for common protocols used by instrumentation systems. Buffering improves system performance by making it possible to not only transfer large blocks of data, but also send several commands at one time.

BACKPLANE

A VISA VXI Mainframe Backplane (BACKPLANE) resource encapsulates the operations and properties of each mainframe (or chassis) in a VXIbus system. This resource type lets a controller query and manipulate specific lines on a specific mainframe in a given VXI system. BACKPLANE services allow the user to map, unmap, assert, and receive hardware triggers, and also to assert and receive various utility and interrupt signals. This includes advanced functionality that might not be available in all implementations or on all controllers.

SERVANT

A VISA Servant (SERVANT) resource encapsulates the operations and properties of the capabilities of a device and a device's view of the system in which it exists. The SERVANT resource exposes the device-side functionality of the device associated with the given resource. The SERVANT resource is a class for advanced users who want to write firmware code that exports message-based device functionality across potentially multiple interfaces. This resource type provides basic and formatted I/O services.

Basic I/O services include the ability to receive blocks of data from a commander and respond with blocks of data in return. The meaning of the data is device dependent, and could be a message, command, or other binary encoded data. The basic I/O services also include setting a 488-style status byte and receiving device clear and trigger events.

Formatted I/O services provide both formatted and buffered I/O capabilities for data transfers from and to the given device's commander. The formatting capabilities include those specified by ANSI C, with extensions for common protocols used by instrumentation systems. Buffering improves system performance by making it possible to not only transfer large blocks of data, but also send several commands at one time.

A VXI Servant resource also provides services to assert and receive various utility and interrupt signals.

SOCKET

A VISA Ethernet Socket (SOCKET) resource encapsulates the operations and properties of the capabilities of a raw Ethernet connection using TCP/IP. The SOCKET resource exposes the capability of a raw socket connection over TCP/IP. This resource type provides basic and formatted I/O services.

Basic I/O services include the ability to send and receive blocks of data to and from the device. The meaning of the data is device dependent, and could be a message, command, or other binary encoded data. If the device is capable of communicating with 488.2-style strings, the basic I/O services also include software triggering, querying a 488-style status byte, and sending a device clear message.

Formatted I/O services provide both formatted and buffered I/O capabilities for data transfers to and from devices. The formatting capabilities include those specified by ANSI C, with extensions for common protocols used by instrumentation systems. Buffering improves system performance by making it possible to not only transfer large blocks of data, but also send several commands at one time.

RAW

A VISA USB Raw (RAW) Resource encapsulates the operations and properties of the capabilities of a raw USB device. The RAW Resource exposes generic functionality of USB devices. This resource type provides basic and formatted I/O services.

Basic I/O services include the ability to send and receive blocks of data to and from the device. The meaning of the data is device dependent, and could be a message, command, or other binary encoded data. If the device is capable of communicating with 488.2-style strings, the basic I/O services also include software triggering, querying a 488-style status byte, and sending a device clear message.

Formatted I/O services provide both formatted and buffered I/O capabilities for data transfers to and from devices. The formatting capabilities include those specified by ANSI C, with extensions for common protocols used by instrumentation systems. Buffering improves system performance by making it possible to not only transfer large blocks of data, but also send several commands at one time.