Chapter 3 Developing Your Application
VXI-USB User Manual 3-8 ni.com
NI-VXI API Notes
The following notes apply only if you are using the NI-VXI API. We
recommend that all new VXI/VME applications use the NI-VISA API, but
you can still develop with the older NI-VXI API for compatibility with
legacy code.
Compiler Symbols
You may need to define certain compiler symbols so that the NI-VXI
library can work properly with your program. The required symbol
indicates your operating system platform; for example, VXINT designates
the application as a Windows 2000/NT/XP/Me/98 application.
Note LabWindows/CVI automatically defines the correct symbol. You do not need to
define VXINT when using LabWindows/CVI.
The additional symbol BINARY_COMPATIBLE is optional. It ensures that
the resulting application is binary compatible with other National
Instruments VXI controllers using the same operating system. This symbol
may cause a slight performance degradation when you use low-level
VXIbus access functions on some controllers.
You can define these symbols using #define statements in your source
code or using the appropriate option in your compiler (typically either –D
or /D). If you use #define statements, they must appear in your code
before the line that includes the NI-VXI API header nivxi.h.
Compatibility Layer Options
Although NI-VXI supports multiple VXI controllers through NI-VISA, the
NI-VXI API supports only a single controller. To specify which controller
the emulation layer should use, run MAX. Select Tools»NI-VXI»VXI
Options. Select the VXI system that will support the emulation layer.
In NI-VXI 3.0 or later, when you enable for triggers or interrupts, only the
local controller is enabled. In the NI-VXI API functions for enabling
triggers and interrupts, the controller parameter is ignored. If you need to
enable a remote controller for triggers, use the MAX frame resource to map
the trigger back to the local controller.
The interrupt and trigger routing in the NI-VXI 3.0 or later low-level
drivers is somewhat different from the default routing in previous versions
of NI-VXI. Therefore, the compatibility layer may behave differently than
the original NI-VXI API with regard to these settings. In particular, if you