Chapter 3 Developing Your Application
© National Instruments Corporation 3-7 VXI-MXI-Express Series User Manual
Table3-1 summarizes the topics the example programs address. All
files are found through the Windows Start menu under Programs»
National Instruments»VISA»Examples, in the subdirectories listed
below.
Note MAX includes configuration options that affect low-level functions and shared
memory, as well as trigger mappings and other attributes of your VXI system. Refer to
the MAX online help for information regarding these options.
Optimizing Large VXIbus Transfers
For best performance, keep the following in mind when using viMove()
or VXImove():
Make sure your buffers are 32-bit aligned.
Transfer 32-bit data whenever possible.
Use VXI block access privileges to significantly improve performance
to devices that can accept block transfers, and likewise use D64 access
privileges for devices that can accept the VME64 64-bit data transfer
protocol.
To optimize move performance on virtual memory systems such as the
Windows operating system, lock the user buffer in memory yourself so
the move operation does not need to lock the buffer.
To optimize move performance on paged memory systems such as
the Windows operating system, use a contiguous buffer so the move
operation does not need to build a scatter-gather list for the user buffer.
Note viMemAlloc() or VXImemAlloc() returns 32-bit aligned, page-locked,
continuous buffers that work efficiently with the move operations.
Table 3-1. NI-VISA/NI-VXI Examples
Coverage NI-VISA Example
NI-VXI
Example
(Optional)
Message-Based Access C\General\RdWrt.c VXIws.c
High-Level Register Access C\VXI-VME\HighReg.c VXIhigh.c
Low-Level Register Access C\VXI-VME\LowReg.c VXIlow.c
Interrupt Handling C\VXI-VME\AsyncIntr.c and WaitIntr.c VXIint.c
Trigger Handling C\VXI-VME\WaitTrig.c VXItrig.c