Automatically declare pipes, variables, and constants

sample application animated gif

Click on the image to see the full-size animation.

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.

  1. Select File|New.
  2. Select 1 from the Channels combo box.
  3. Select the Processing|Procedure tab.
  4. In the 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.
  5. Press the down arrow key to select AVERAGE, then press the Enter key. The Average command is inserted in the DAPL Listing edit box.
  6. Type "(" and press the Enter key. The IP0 input pipe is inserted in the Average command.
  7. Type "," and press the Enter key. The new constant cCnt0 is declared and inserted in the Average command.
  8. Type "," and press the Enter key. The new pipe pAvg0 is declared and inserted in the Average command.
  9. Type ")" and select the Processing|Declarations tab.
  10. In the Processing|Declarations edit box, change the value of cCnt0 from 10 to 100.
  11. Select the Processing|Send To PC tab.
  12. Highlight all channels with the mouse or change focus to the checkbox area and select Ctrl-A. Then press the space bar. The IP0 checkbox is now unchecked, and instead the pAvg0 checkbox is now checked.
  13. Open Window|Graph.
  14. Select Start! or press Alt-S on the keyboard.