DAPstudio provides an easy way to reproduce a command with auto-increment parameters. If you have a large number of channels, this feature is particularly useful. It allows you to copy and paste commands – even multiple commands – for multiple channels without manually changing the number in each command line.
This application samples four channels at 1000 samples per second per channel and decimates the data rate by a factor of 100 by applying the
AVERAGE command on each input channel pipe.
To see an example, enter a command line in the DAPstudio
Processing|Procedures|DAPL Listing edit box.
Average(IP0, cCnt0_, pAvg0)
You then can use a simple
Ctrl-C (copy) and
Ctrl-E (increment/paste/copy) keystroke sequence to add additional
Average command lines. They will look like this.
Average(IP1, cCnt0_, pAvg1) Average(IP2, cCnt0_, pAvg2) Average(IP3, cCnt0_, pAvg3)
Use this shortcut as many times as you need to. The increment/paste/copy operation does not just duplicate your lines of code with new numbers, it also duplicates all required structure declarations to support that code. So, after using Ctrl-C/Ctrl-E, you can run your application without any more work.
While in this application you only duplicate one command, the increment/paste/copy command works just as well for multiple commands.
Average(IP0, cCnt0_, pAvg0)" in the
Processing|Procedures|DAPL Listingedit box. Please see App0401 for step-by-step instructions on adding a DAPL command. Using the underscore ensures that the constant
cCnt0_will not be incremented.
Averagecommand and its parameters.
Ctrl-Con the keyboard to copy the highlighted items to the clipboard.
end, and press
Ctrl-Eto increment/paste/copy the items from the clipboard. Where a parameter has a number at the end, the number automatically is incremented when it is pasted to the new line. The new command line reads
Average(IP1, cCnt0_, pAvg1).
Processing|Declarationstab and change the value of constant
Processing|Send To PCtab.
Ctrl-A. Then press the space bar. The
IP3checkboxes are now unchecked, and instead the
pAvg3checkboxes are now checked.
Alt-Son the keyboard.