Download Campbell DSP4 Specifications

Transcript
Section 8. Processing and Math Instructions
NOTE
The EXP function complements the action of the Log function
and is sometimes referred to as the antilogarithm.
Exp FunctionExample
The example uses Exp to calculate the value of e. Exp(1) is e raised to the
power of 1.
'Exp(x) is ex so Exp(1) is e1 or e.
Dim ValueOfE
BeginProg
ValueOfE = Exp(1)
EndProg
'Declare variables.
'Calculate value of e.
FFTSpa (Dest, N, SrcArray, SampleInterval, Units, Option)
The FFTSpa performs a Fast Fourier Transform on a time series of
measurements stored in an array and places the results in an array. It can also
perform an inverse FFT, generating a time series from the results of an FFT.
Depending on the output option chosen, the output can be: 0) The real and
imaginary parts of the FFT; 1) Amplitude spectrum. 2) Amplitude and Phase
Spectrum; 3) Power Spectrum; 4) Power Spectral Density (PSD); or 5) Inverse
FFT.
The difference between the FFT instruction (Section 6) and FFTSpa is that
FFT is an output instruction that stores the results in a data table and FFTSpa
stores its results in an array.
Parameter
& Data Type
Dest
Array
N
Constant
SrcArray
Variable
SampleInterval
Constant
Units
Constant
8-12
Enter
The array in which to store the results of FFT.
Number of points in the original time series. The number of points must
be a power of 2 (i.e., 512, 1024, 2048, etc.).
The name of the Variable array that contains the input data for the FFT
The sampling interval of the time series.
The units for SampleInterval.
Alpha
Numeric
Code
Code
Units
MSEC
1
milliseconds
SEC
2
seconds
MIN
3
minutes