Command 12 Digital Data Capture; Command Sequence - Texas Instruments CBL 2 Reference Manual

Ti cbl 2 data collector: reference guide
Hide thumbs Also See for CBL 2:
Table of Contents

Advertisement

Notes on Operation
Certain algorithms are very time intensive to run in the calculator, and the CBL 2
product team has made an effort to include those algorithms in the CBL 2's optimized
code. This allows large data sets to be processed much more quickly.
Currently only one algorithm has been defined. This algorithm determines the number
of cycles of a repetitive waveform in the sampling buffer. (This routine is known as the
heartbeat algorithm for its frequent use in measuring the heart rate.)
This algorithm works as follows:
1.
First, the normal data collection (using commands {1, ...} and {3, ...}) must be
completed.
2.
Next, the algorithm must be started using the command {10,channel,1,P1,P2,P3}.
3.
The CBL 2 starts by finding the maximum and minimum points of the data set. The
lower threshold is set at P1 percent of the maximum point, and the upper threshold
is set at P2 percent of the minimum point.
4.
The CBL 2 checks the difference between the maximum point and minimum point
against P3. If the difference is less than P3, the algorithm is aborted and a 0.0 is
returned. (This is the case where the user expected the input data to have a certain
variation but, for some reason, the variation was not found.)
5.
The CBL 2 then finds the number of "rising edges" where the data in the data set is
increasing from below the upper threshold and the number of "falling edges"
where the data is decreasing to below the lower threshold. The total number of
rising edges and falling edges is stored.
6.
Next the CBL 2 determines how many samples are between the first edge and the
last edge. The frequency is then determined as the number of edges divided by the
number of samples and is returned to the host calculator or computer.
7.
The user program is responsible for taking the result from the CBL 2 and dividing it
by the sample time to get the true frequency in Hz.
Command 12
This command sets up the capture or measurement of motion data from the digital
input channel. It has seven syntaxes.

Command Sequence

In general, when you want to sample data, you should send commands in this
sequence: Reset the unit, setup the channels, start sampling, retrieve the data.
The commands used to do this are shown below:
Command 6,0 to force the CBL 2 to stop executing any prior commands (This
command may not be needed.)
Command 0 to reset CBL 2 to a known state
Command(s) 1 to set up any channels needed for sampling
34
Digital Data Capture
CBL 2 Technical Reference

Advertisement

Table of Contents
loading

Table of Contents