Classification
Revision
Public
PA6
Document Number
Date
17-1957
2018-06-07
const unsigned int write_mode = 2;
and the valid writing modes are listed in Tab.
6
.
Table 6: The different file writing modes in the FWATD C-example.
Mode
Description
0
File writing disabled
1
ASCII
2
Binary
5.5
Interpreting the Data
The data stored as the raw accumulated waveforms, one after another with one file per channel. A
sample is represented as a 64-bit signed integer and the file format can be binary or ASCII. This makes it
impractical to have the data storage active for measurements which are expected to yield large amounts
of analog bias data, resulting in a large file (several gigabytes). Such a file is cumbersome to handle
for any operating system. If the example application has to be used for such a use case, an alternative
approach is to split the data file once a certain maximum file size has been reached.
Interpreting the data involves dividing the raw accumulated data with the number of accumulations
to convert the values back into ADC codes and subsequently Volts (see Section
4.9
.
5.6
MATLAB
On Windows systems, the ADQAPI has support for MATLAB through the use of a
MEX
file. This interme-
diate layer handles, among other things, the memory allocation and data transfers between the user’s
MATLAB code and the ADQAPI. The example scripts are located in
<Path to installation directory>/Matlab_examples/MATLAB_ExampleScripts/
Currently, only the single-shot mode (Section
4.8.1
) is supported and is demonstrated in the script
ADQ7_FWATD_example_script.m
This script should run right away provided a correctly configured ADQ7 digitizer is connected to the host
computer. The default behavior is to use the internal trigger to collect a single record (no accumulations)
on each channel.
The data grabbing function
ATDStartWFA()
returns a struct containing data and headers for all records
separated into channels. The struct fields are named after the channel label, i.e. ‘ChannelX’ in 1-channel
mode and ‘ChannelA’ and ‘ChannelB’ in 2-channel mode.
In order for MATLAB to correctly locate the MEX file, it is important to either extract the helper script
get_adq_installer_path.m
and place it in the working directory next to the example, or to manually add the path
ADQ7-FWATD User Guide
www.teledyne-spdevices.com
Page 20 of 26