Chapter 4 Developing Your Application
NI VXIpc-882 User Manual 4-8 ni.com
Shared MemoryIn the Hardware Configuration settings for your controller in MAX,
you can share memory from your embedded controller on the VXI/VME
bus. Right-click any setting or consult the MAX help for more information.
You can access shared memory on your computer using viMemAlloc() in
VISA (or VXImemAlloc() in the NI-VXI API).
NI-VXI API NotesThe 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 SymbolsYou 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 Vista/XP/2000/Me/9x/NT 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.
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 OptionsAlthough 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