This application uses real time processing that is applied to raw data samples within the Data Acquisition Processor (DAP) board prior to transferring the data to the host PC. DAPstudio provides assistance for configuring this pre-defined processing supplied by the DAPL system. DAPstudio automatically can generate the declarations for the additional data pipes and variables needed to support the processing.
This application captures large amounts of data and averages them to reduce the effects of random noise. The AVERAGE
processing command is used to compute the arithmetic mean for data in blocks of 100 samples. The clean measurements can then be transferred to the host PC and displayed.
In applications where averaging is not desirable, the SKIP
command can be used to reduce the output rate.
DAPstudio automatically declares the necessary pipes, variables, and constants in the processing configuration. The Average
command requires three parameters: an input pipe, a constant to specify the block size, and an output pipe. The input and output pipes are defined in the Input
and Output
tabs. DAPstudio declares the constant when building the Average
command as shown in below.
File|New
.1
from the Channels
combo box.Processing|Procedure
tab.DAPL Listing
edit box, type "A
" between "pdefine MslProc
" and "end
". A drop-down list containing all DAPL commands starting with A will appear automatically. Or press F4
on the keyboard to bring up the drop-down list.AVERAGE
, then press the Enter key. The Average
command is inserted in the DAPL Listing
edit box.(
" and press the Enter key. The IP0
input pipe is inserted in the Average
command.,
" and press the Enter key. The new constant cCnt0
is declared and inserted in the Average
command.,
" and press the Enter key. The new pipe pAvg0
is declared and inserted in the Average
command.)
" and select the Processing|Declarations
tab.Processing|Declarations
edit box, change the value of cCnt0
from 10
to 100
.Processing|Send To PC
tab.Ctrl-A
. Then press the space bar. The IP0
checkbox is now unchecked, and instead the pAvg0
checkbox is now checked.Start!
or press Alt-S
on the keyboard.