
Chapter 3
Developing Your Application
©
National Instruments Corporation
3-9
Enhancements to the NI-VXI Software
The following sections describe the additional options beyond what is
documented in the NI-VXI online help.
Compatibility
NI-VXI applications that follow the guidelines documented in the NI-VXI
online help will work with NI-VXI for the VXI-8340 series.
System Configuration Functions
The
InitVXIlibrary()
function has a new return value of
INIT_RET_OK_RMERROR (2)
. If this value is returned, it means the
NI-VXI library successfully initialized, but the Resource Manager has not
been run successfully. Always run the Resource Manager before using the
NI-VXI library.
Low-Level VXIbus Access Functions
Do not make any assumptions about the size and features of a window
returned from
MapVXIAddress()
. You should use
GetWindowRange()
to determine the size of a window. The 32-bit value returned from
GetContext()
and passed to
SetContext()
has a new format.
Applications that set the context bits directly for use in
SetContext()
may not be compatible with the new format for context. Because the MITE
allows more flexible window mapping, extra bits have been added to this
field to reflect these new features. Do not manipulate the context bits
directly.
High-Level VXIbus Access Functions
For best performance, keep the following in mind when using
VXImove()
:
•
Make sure your buffers are 32-bit aligned.
•
Transfer 32-bit data whenever possible.
•
Using VXI block access privileges significantly improves
performance to devices that are capable of accepting block transfers.
•
VXImove()
must lock the user buffer in memory on virtual memory
systems, so locking the buffer yourself optimizes
VXImove()
.
•
Because
VXImove()
must build a scatter-gather list for the user buffer
on paged memory systems, using a contiguous buffer optimizes
VXImove()
.