![Teledyne SP Devices ADQ7-FWATD User Manual Download Page 20](http://html1.mh-extra.com/html/teledyne-sp-devices/adq7-fwatd/adq7-fwatd_user-manual_1081090020.webp)
Classification
Revision
Public
PA6
Document Number
Date
17-1957
2018-06-07
or the single-shot version of the data collection loop to execute. The implementation of the
single-shot mode is straight-forward and while its simplicity may seem attractive, it is not wit-
hout drawbacks (see Section
4.8.1
). The more powerful streaming mode is described further in
Section
4.8.2
.
Returning memory
Finally, any dynamically allocated memory is returned to the host computer.
5.2
Modifying Settings
The digitizer configuration parameters reside in the file
example_adq7.c
immediately following the de-
claration of the function
adq7()
. The example code is filled with comments intended to guide the user in
choosing the parameters.
5.3
Compiling
Compiling the example application is accomplished by generating object files from the three source files
and linking to the ADQAPI. A simple make file for Linux systems is provided as well as a Microsoft Visual
Studio solution.
5.4
Default Behavior
By default, the test pattern generator and level trigger are activated. This means that the example can
be run out of the box and data will be received even without connecting any input signals or triggers. The
test pattern can be deactivated by changing the test pattern mode from ‘4’ to ‘0’ on the following line:
const int test_pattern_mode = 4;
The test pattern is 16 bits whereas the accumulator is 14 bits. Therefore, the test pattern will update
every fourth samples. For example, the raw data stream will follow the pattern
N, N, N, N, N+1, N+1, N+1, N+1, N+2, ...
for the positive slope, and equivalently
N, N, N, N, N-1, N-1, N-1, N-1, N-2, ...
for the negative slope.
Note
The samples will update in groups of four if the test pattern is enabled.
The C example has no built-in plotting. Instead, the data is written to file. Channel 1 is written to
dataA.out
and channel 2 is written to
dataB.out
for the 2-channel firmware. For the 1-channel (10 GSPS)
firmware, the data is written to
dataA.out
.
Note
If file writing is activated, the data is written to
dataA.out
and
dataB.out
.
The data can either be stored in ASCII or binary format. The format is specified with
ADQ7-FWATD User Guide
www.teledyne-spdevices.com
Page 19 of 26