National Instruments 320571-01 Car Stereo System User Manual


 
Part 2 Introduction to the NI-DSP Analysis VIs
NI-DSP SRM for LabVIEW for Windows 1-9 Part 2: Introduction to the NI-DSP Analysis VIs
This example shows you how to obtain the power spectrum of a sine wave signal. First, generate a sine wave that
you want to analyze using the LabVIEW Analysis VIs, then use the Copy Mem(LV to DSP) VI to copy the data of
this sine signal to the DSP board. Before you copy the data, you must call the DSP Allocate Memory VI to allocate
a DSP Handle Cluster that reserves a data buffer on the DSP board. Connect this DSP Handle Cluster to the
destination in terminal of the Copy Mem(LV to DSP) VI to indicate where the data will be stored on the DSP
board. After the data is copied to the DSP board, call the DSP Power Spectrum VI to perform a power spectrum on
the data. After you finish the analysis, the results are stored in the data buffer indicated by the DSP Handle Cluster
you previously allocated. If you want to see the results, call the Copy Mem(DSP to LV) VI to copy data back to
LabVIEW. Figure 1-10 shows the power spectrum of a sine wave. The last step is to call the DSP Free Memory VI
to free the DSP Handle Cluster that you allocated. This example connects all of the error out clusters of the
previous VIs to the error in clusters of the subsequent VIs to establish the proper sequence and to pass through an
error, should it occur, without executing the rest of the VIs.