Chapter 3
Developing Your Application
©
National Instruments
3-3
VXI-MXI-Express Series User Manual
•
The
NI-VXI compatibility layer
allows older programs that use the
NI-VXI API to communicate with VXI devices through VISA. Using
this compatibility layer, older programs can run in NI-VXI 3.0 or later
without being rewritten to use the VISA interface. This layer installs
with NI-VXI by default. It should be completely transparent and
provide a high level of performance; however, there may be some
slight changes in behavior for certain applications.
Programming for VXI
NI-VISA and the NI-VXI API are the two National Instruments
programming interfaces for accessing your VXI/VME instruments. With
NI-VXI 3.0 or later, NI-VISA is the native API for communicating with a
VXI or VME system, and NI recommends using it for all new applications.
Older programs that use the NI-VXI API now use the NI-VXI-to-NI-VISA
compatibility layer to communicate with the VXI devices.
Both NI-VISA and the NI-VXI API include functions for register-level
access to VXI instruments and messaging capability to message-based
devices. You can also use either interface to service asynchronous events
such as triggers, signals, and interrupts, and also assert them. Compatibility
with the NI-VXI API is included for legacy applications only—
NI recommends that you write all new VXI/VME applications in VISA.
The best way to learn NI-VISA programming is by reviewing the example
programs your software includes. The examples directory contains working
VISA programs that illustrate many different types of applications. You can
find these examples in the Windows Start menu under
Programs»
National Instruments»VISA»Examples
.
If you are just getting started, you should learn how to access registers
with high-level calls and send messages with word-serial functions. The
NI-VISA examples for these tasks are
HighReg.c
and
RdWrt.c
. Refer
to the other examples as you try more advanced techniques. Consult the
NI-VISA online help for additional information about these topics.
Table 3-1 summarizes the topics the example programs address. All
NI-VISA files are found through the Windows Start menu under
Programs»National Instruments»VISA»Examples
, in the
subdirectories listed below.