©
National Instruments Corporation
A-1
A
Using the NI-VISA Code
Instrument
This appendix formerly contained an overview of the functions,
applications, and implementations of software modules known as
Code Instruments (CIs), and presented comparisons and illustrations of
GPIB-VXI/C operation with and without CIs. Much of this functionality
has been included with the NI-VISA Code Instrument for the GPIB-VXI/C
(the
NI-VISA CI
), and this appendix now documents the NI-VISA CI.
CIs are a National Instruments GPIB-VXI/C proprietary feature. A CI is a
set of software routines running on the GPIB-VXI/C that the system sees
as its own message-based device. An external controller can communicate
directly with the CI via a GPIB secondary address. The NI-VISA CI
provides an optimized implementation of the VISA instrument control
standard running on your GPIB-VXI/C. The NI-VISA software on your
system automatically uses this to control VXI devices connected through
your GPIB-VXI/C controller.
VISA is the recommended means of controlling a GPIB-VXI/C system.
All new GPIB-VXI/C applications should use the NI-VISA API.
Introduction to Programming GPIB-VXI Devices in VISA
The GPIB-VXI makes VXI message-based devices appear as if they are
GPIB devices with secondary addresses. This provides an easy transition
into VXI for customers with existing GPIB systems, because they can use
the same NI-488 API to control both types of instruments. However, this is
problematic for VXI register-based devices, because their addresses are not
mapped directly into the GPIB system.
Message-Based Access with VISA
For message-based programming, an NI-488 program would typically call
ibdev()
with the VXI device’s primary and secondary GPIB addresses to
get a handle to the specific device. In VISA, a program calls
viOpen()
with the VXI device’s logical address—which is a more natural address