Introduction to Programming VXI Devices in VISA

NI-VISA

Introduction to Programming VXI Devices in VISA

A VXI device has a unique logical address, which serves as a means of referencing the device in the VXI system. This logical address is analogous to a GPIB primary address. VXI uses an 8-bit logical address, allowing for up to 256 VXI devices in a VXI system. VISA addresses a specific VXI device with a resource string identifying the VXI system that the device is in and the logical address of this particular device: "VXI<system>::<logical address>::INSTR".

Each VXI device has a specific set of registers, called configuration registers. See the NI-VXI online help for a diagram. These registers are located in the upper 16KB of the 64KB A16 address space. The logical address of a VXI device determines the location of the device's configuration registers in the 16KB area reserved by VXI. The rest of A16 space is available for VME devices. The 16MB A24 address space and the 4GB A32 address space are available for VXI and VME devices. Each VXI system has a Resource Manager which is responsible for allocating each device's requests in the appropriate address space. When you open a VXI/VME INSTR resource in VISA, you have access to registers in the spaces that have been allocated by the Resource Manager for the device corresponding to that INSTR resource. Devices which provide only this minimal level of capability are called register-based devices, and support VISA operations such as viInX/viOutX (read/write a single register), viMoveInX/viMoveOutX (perform a block move to read or write a block of registers), viMapAddress (map a region of VXI memory into your application for low-level access), and others. These operations are discussed in more detail in Register-Based Communication.

In addition to register-based devices, the VXIbus specification also defines message-based devices, which are required to have communication registers in addition to configuration registers. All message-based VXIbus devices, regardless of the manufacturer, can communicate using the VXI-specified Word Serial Protocol. In addition, you can establish higher-performance communication channels, such as the shared-memory channels in Fast Data Channel (FDC), to take advantage of the VXIbus bandwidth capabilities (a diagram of these protocols is shown in the NI-VXI online help).

The VXIbus Word Serial Protocol is a standardized message-passing protocol. This protocol is functionally very similar to the IEEE 488 protocol, which transfers data messages to and from devices one byte at a time. Thus, VXI message-based devices communicate in a fashion very similar to GPIB instruments. In general, message-based devices typically contain a higher level of local intelligence that uses or requires a higher level of communication. In addition, the Word Serial Protocol has special messages for configuring message-based devices. All VXI message-based devices are required to support the Word Serial Protocol and support a basic level of standard communication. There are even higher level message-based protocols, such as Standard Commands for Programmable Instrumentation (SCPI); these are not required protocols, and not all VXI message-based devices support them. Message-based VXI devices support VISA operations such as viRead/viWrite (Word Serial read/write buffer), viClear (Word Serial clear), viPrintf/viScanf (formatted I/O), viAssertTrigger (Word Serial trigger), viVxiCommandQuery (Word Serial command and/or response), and others. These operations are discussed in more detail in Message-Based Communication.