Fftspa (dest, n, source, tau, units, option) – Campbell Scientific CR5000 Measurement and Control Module User Manual

Page 181

Advertising
background image

Section 8. Processing and Math Instructions

8-9

Exp

Returns e (the base of natural logarithms) raised to a power.

Syntax
x = Exp (
source)

Remarks
If the value of the source exceeds 709.782712893, an Overflow error occurs.
The constant e is approximately 2.718282.

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 e ^x so Exp(1) is e ^1 or e.

Dim ValueOfE

'Declare variables.

BeginProg
ValueOfE = Exp(1)

'Calculate value of e.

EndProg

FFTSpa (Dest, N, Source, Tau, 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

Enter

Dest

Array

The array in which to store the results of FFT.

Source

Variable

The name of the Variable array that contains the input data for the FFT.

N

Constant

Number of points in the original time series. The number of points must be a power
of 2 (i.e., 512, 1024, 2048, etc.).

Tau

Constant

The sampling interval of the time series.

NOTE

Advertising