Classification
Revision
Public
PA6
Document Number
Date
17-1957
2018-06-07
blocks until the thread has closed properly and returns its return value. At this point, the digitizer is
once again in the user’s control.
5.
If the user wishes to restart the acquisition, another iteration of the outer loop is initiated. Otherwise,
the dynamically allocated memory is returned to the host and the application exits.
4.9
Converting from ADC Codes to Volts
The unit of the received data is ADC codes. The full scale input range is 1 V peak-to-peak. This is
mapped to the range
[-2
14-1
, 2
14-1
- 1]
, meaning one LSB is
LSB
Volt
=
1
2
14
V
.
(2)
The ADC codes may then be converted to Volt by using (
3
).
X
Volt
=
1
2
14
·
X
ADC
(3)
4.10
ADC Code Ranges
Vertical settings in the ADQAPI are defined using 16-bit ADC codes, i.e. in the range
[-32768, 32767]
regardless of the digitizer resolution. In the case of ADQ7-FWATD, which delivers 14-bit data aligned
with the LSB at bit index zero. For example, this means that there will be difference of a factor of four
between the configured level trigger threshold value and the corresponding sample value in the user
space record.
Note
Vertical settings in the ADQAPI are defined using 16-bit ADC codes regardless of the digitizer resolution
while ADQ7-FWATD returns data which should be interpreted in the 14-bit range. For example, setting
the level trigger to ADC code 1024 corresponds to a sample value of 256 ADC codes in the user space
record.
4.11
Threading
The ADQAPI is not thread safe. This means that if the user wishes to communicate with the digitizer from
multiple threads in the application, a locking mechanism (implemented by the user) is required in order
to avoid race conditions and undefined behavior. Section
4.5
explained that the WFA is partitioned and
that the final accumulation step is performed in software by the ADQAPI. This accumulator is running in
its own thread and as such, while the data is being collected (i.e. after calling
ATDStartWFA()
), there are
only a few functions that are safe to call, namely
•
ATDGetWFAStatus()
•
ATDRegisterWFABuffer()
•
ATDStopWFA()
ADQ7-FWATD User Guide
www.teledyne-spdevices.com
Page 17 of 26