National Instruments 320571-01 用户手册

下载
页码 157
Chapter 4
Using the DMA VIs
NI-DSP SRM for LabVIEW for Windows
4-3
Part 4:  NI-DSP Interface Utilities
DSP DMA Copy(DSP to LV)
Copies a buffer of size elements
from source(DSP Address) on
the DSP board to one of the
destination arrays in LabVIEW
using the onboard DMA transfer
method.
This VI uses only the DMA controller on the DSP board to transfer data.  Therefore, it does not interfere with the
other program that is running on the DSP board.
Note:
This VI does not convert floating-point data to the IEEE format while copying.  When you copy floating
data, convert to IEEE format in your program on the DSP board.  However, the Copy Mem(DSP to LV) VI
automatically converts data format during the copying procedure.
To copy data correctly from the DSP board to LabVIEW, you must indicate what type of data is stored in the
source(DSP Address) buffer on the DSP board, set the destination type to the appropriate type, and wire to the
corresponding destination terminal.  This VI has three destination types–float (32-bit), short (16-bit), and long
(32-bit). Remember, you must wire only one destination terminal.
slot is the board ID number.  slot defaults to 3.
source(DSP Address) is the actual DSP address from which you copy your data.  It should be a
24-bit integer (such as FFF000 hex) less than or equal to FFFFFF hex.  If you know the exact DSP
address where your data is stored, use this address directly.  Alternatively, you can use the DSP
Handle To Address VI to convert a DSP Handle Cluster to an actual DSP address.
size indicates the amount of data you want to copy back from the source(DSP Address) buffer on
the DSP board to the destination buffer in the LabVIEW.  size defaults to 0.
destination type indicates the type of the data in the source(DSP Address) buffer on the DSP board.
It has three options:
         0:  32-bit floating-point.
         1:  16-bit short integer.
         3:  32-bit long integer.
destination type defaults to 32-bit floating-point.
destination(float) is the terminal to which you must wire the destination buffer if the data you want
to copy is a 32-bit floating-point data array.  Remember, the program on the DSP board must convert
this data to IEEE format before it is copied.
destination(short) is the terminal to which you must wire the destination buffer if the data you want
to copy is a 16-bit short data array.
destination(long) is the terminal to which you must wire the destination buffer if the data you want
to copy is a 32-bit long data array.
error in(no error) contains the error information from a previous VI.  If an error occurs, it is passed
out error out and no other calls are made.
error out contains the error information for this call.