Chapter 4
Developing Your Application
VXIpc 770/870B Series User Manual
4-8
ni.com
Note
viMemAlloc()
or
VXImemAlloc()
returns 32-bit aligned, page-locked,
contiguous buffers which work efficiently with the move operations.
Shared Memory
In 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 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.
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.