ATSSDKGuide 750
ATSSDKGuide 750
ATSSDKGuide 750
Version 7.5.0
June 4, 2021
CONTENTS
1 License Agreement 3
1.1 Important . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Ownership . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Rights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4 Limited Warranty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Getting Started 7
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 Programming Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3 Sample code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.4 Contacting us . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3 Programmer’s Guide 15
3.1 Addressing a board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.2 Resetting a board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.3 Configuring a board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.4 Acquiring data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.5 Processing data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
5 Advanced Topics 75
5.1 External clock issues for OCT applications . . . . . . . . . . . . . . . . . . . . . . . 75
6 API Reference 79
6.1 AlazarAbortAsyncRead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
6.2 AlazarAbortCapture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
6.3 AlazarAllocBufferU16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
6.4 AlazarAllocBufferU16Ex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
6.5 AlazarAllocBufferU8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
6.6 AlazarAllocBufferU8Ex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
6.7 AlazarAsyncRead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
6.8 AlazarBeforeAsyncRead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
6.9 AlazarBoardsFound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
i
6.10 AlazarBoardsInSystemByHandle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
6.11 AlazarBoardsInSystemBySystemID . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
6.12 AlazarBusy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
6.13 AlazarConfigureAuxIO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
6.14 AlazarConfigureLSB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
6.15 AlazarConfigureRecordAverage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
6.16 AlazarConfigureSampleSkipping . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
6.17 AlazarCoprocessorDownload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
6.18 AlazarCoprocessorRegisterRead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
6.19 AlazarCoprocessorRegisterWrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
6.20 AlazarCreateStreamFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
6.21 AlazarDSPAbortCapture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
6.22 AlazarDSPGenerateWindowFunction . . . . . . . . . . . . . . . . . . . . . . . . . . 105
6.23 AlazarDSPGetBuffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
6.24 AlazarDSPGetInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
6.25 AlazarDSPGetModules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
6.26 AlazarDSPGetNextBuffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
6.27 AlazarDSPGetParameterFloat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
6.28 AlazarDSPGetParameterS32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
6.29 AlazarDSPGetParameterU32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
6.30 AlazarDSPSetParameterFloat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
6.31 AlazarDSPSetParameterS32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
6.32 AlazarDSPSetParameterU32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
6.33 AlazarErrorToText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
6.34 AlazarExtractFFTNPTFooters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
6.35 AlazarExtractNPTFooters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
6.36 AlazarExtractTimeDomainNPTFooters . . . . . . . . . . . . . . . . . . . . . . . . . 122
6.37 AlazarFFTBackgroundSubtractionGetRecordS16 . . . . . . . . . . . . . . . . . . . 123
6.38 AlazarFFTBackgroundSubtractionSetEnabled . . . . . . . . . . . . . . . . . . . . 123
6.39 AlazarFFTBackgroundSubtractionSetRecordS16 . . . . . . . . . . . . . . . . . . . 124
6.40 AlazarFFTGetMaxTriggerRepeatRate . . . . . . . . . . . . . . . . . . . . . . . . . . 124
6.41 AlazarFFTSetScalingAndSlicing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
6.42 AlazarFFTSetWindowFunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
6.43 AlazarFFTSetup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
6.44 AlazarForceTrigger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
6.45 AlazarForceTriggerEnable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
6.46 AlazarFreeBufferU16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
6.47 AlazarFreeBufferU16Ex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
6.48 AlazarFreeBufferU8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
6.49 AlazarFreeBufferU8Ex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
6.50 AlazarGetBoardBySystemHandle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
6.51 AlazarGetBoardBySystemID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
6.52 AlazarGetBoardKind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
6.53 AlazarGetBoardRevision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
6.54 AlazarGetCPLDVersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
6.55 AlazarGetChannelInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
6.56 AlazarGetChannelInfoEx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
6.57 AlazarGetDriverVersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
ii
6.58 AlazarGetMaxRecordsCapable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
6.59 AlazarGetParameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
6.60 AlazarGetParameterLL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
6.61 AlazarGetParameterUL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
6.62 AlazarGetSDKVersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
6.63 AlazarGetStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
6.64 AlazarGetSystemHandle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
6.65 AlazarGetTriggerAddress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
6.66 AlazarGetTriggerTimestamp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
6.67 AlazarGetWhoTriggeredBySystemHandle . . . . . . . . . . . . . . . . . . . . . . . 147
6.68 AlazarGetWhoTriggeredBySystemID . . . . . . . . . . . . . . . . . . . . . . . . . . 148
6.69 AlazarHyperDisp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
6.70 AlazarInputControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
6.71 AlazarInputControlEx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
6.72 AlazarNumOfSystems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
6.73 AlazarOCTIgnoreBadClock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
6.74 AlazarPostAsyncBuffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
6.75 AlazarQueryCapability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
6.76 AlazarQueryCapabilityLL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
6.77 AlazarRead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
6.78 AlazarReadEx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
6.79 AlazarResetTimeStamp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
6.80 AlazarSetADCBackgroundCompensation . . . . . . . . . . . . . . . . . . . . . . . 165
6.81 AlazarSetBWLimit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
6.82 AlazarSetCaptureClock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
6.83 AlazarSetExternalClockLevel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
6.84 AlazarSetExternalTrigger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
6.85 AlazarSetLED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
6.86 AlazarSetParameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
6.87 AlazarSetParameterLL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
6.88 AlazarSetParameterUL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
6.89 AlazarSetRecordCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
6.90 AlazarSetRecordSize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
6.91 AlazarSetTriggerDelay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
6.92 AlazarSetTriggerOperation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
6.93 AlazarSetTriggerOperationForScanning . . . . . . . . . . . . . . . . . . . . . . . . 180
6.94 AlazarSetTriggerTimeOut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
6.95 AlazarSleepDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
6.96 AlazarStartCapture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
6.97 AlazarTriggered . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
6.98 AlazarWaitAsyncBufferComplete . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
6.99 AlazarWaitNextAsyncBufferComplete . . . . . . . . . . . . . . . . . . . . . . . . . 184
iii
7.5 Possible input channel configurations . . . . . . . . . . . . . . . . . . . . . . . . . 190
7.6 Supported sample rates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
7.7 Miscellaneous features support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
7.8 External trigger level support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
7.9 Supported clock types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
7.10 Frequency limits for external clock types . . . . . . . . . . . . . . . . . . . . . . . 193
7.11 Valid frequencies in PLL mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
Index 195
iv
ATS-SDK Documenta on, Release 7.5.0
Note: This is the documentation for AlazarTech’s ATS-SDK version 7.5.0. Please visit our
documentation homepage to find documentation for other versions or products.
ONE
LICENSE AGREEMENT
1.1 Important
1.2 Ownership
You may only concurrently use the Software on the computers that have an AlazarTech
waveform digitizer card plugged in (for example, if you have purchased one AlazarTech
card, you have a license for one concurrent usage). If the number of users of the Software
exceeds the number of AlazarTech cards you have purchased, you must have a reasonable
process in place to assure that the number of persons concurrently using the Software does
not exceed the number of AlazarTech cards purchased.
This license is non-transferable.
3
ATS-SDK Documenta on, Release 7.5.0
You may not copy the documentation or Software except as described in the installation
section of the Software manual. You may not distribute, rent, sub-lease or lease the Software
or documentation, including translating or decomposing. You may not modify, reverse-
engineer, decompile, or disassemble any part of the Software or documentation, or produce
any derivative work other than software applications that communicate with AlazarTech
hardware using the published Application Programming Interface (API).
You may not remove, block, or modify any titles, logos, trademarks, copyright and/or patent
notices, digital watermarks, disclaimers, or other legal notices that are included in the Soft-
ware.
1.2.3 Termina on
This license and your right to use this Software automatically terminates if you fail to com-
ply with any provision of this license agreement.
1.3 Rights
AlazarTech retains all rights not expressly granted. Nothing in this agreement constitutes
a waiver of AlazarTech’s rights under the Canadian and U.S. copyright laws or any other
Federal or State law.
Although AlazarTech has tested the Software and reviewed the documentation,
ALAZARTECH MAKES NO WARRANTY OF REPRESENTATION, EITHER EXPRESSED OR
IMPLIED, WITH RESPECT TO THIS SOFTWARE OR DOCUMENTATION, ITS QUALITY,
PERFORMANCE, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. AS A
RESULT, THIS SOFTWARE AND DOCUMENTATION IS LICENSED “as is” AND YOU, THE
LICENSEE, ARE ASSUMING THE ENTIRE RISK AS TO ITS QUALITY AND PERFORMANCE. IN
NO EVENT WILL ALAZARTECH BE LIABLE FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL
OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THIS
SOFTWARE OR DOCUMENTATION, even if advised of the possibility of such damages. In
particular, AlazarTech shall have no liability for any data acquired, stored or processed
with this Software, including the costs of recovering such data.
THE WARRANTY AND REMEDIES SET FORTH ABOVE ARE EXCLUSIVE AND IN LIEU OF ALL
OTHERS, ORAL OR WRITTEN, EXPRESSED OR IMPLIED. No AlazarTech dealer, agent or em-
ployee is authorized to make any modifications or additions to this warranty.
Information in this document is subject to change without notice and does not represent
a commitment on the part of AlazarTech. The Software described in this document is fur-
nished under this license agreement. The Software may be used or copied only in accor-
dance with the terms of the agreement.
Some jurisdictions do not allow the exclusion of implied warranties or liability for inciden-
tal or consequential damages, so the above limitation or exclusion may not apply to you.
This warranty gives you specific legal rights, and you may also have other rights, which
vary from jurisdiction to jurisdiction.
TWO
GETTING STARTED
2.1 Introduc on
AlazarTech supplies device drivers for Windows and Linux that allow software to configure
AlazarTech digitizers, and transfer sample data from the digitizer to application buffers.
The AlazarTech software developer’s kit (ATS-SDK) includes header and library files re-
quired to call functions exported by these device drivers in user written applications, as
well as documentation and sample code describing how to use these functions.
This document is a part of the ATS-SDK. It describes how to call functions exported by
AlazarTech device drivers to control one or more digitizer boards. It is divided into the
following sections:
• A programming guide that describes how to configure, and acquire data from, digitizer
boards.
• A reference guide that describes the functions exported by the device drivers.
To get the most from your AlazarTech digitizer:
• Read the user manual supplied their digitizer board. It provides an overview of the
digitizer hardware, as well as detailed specifications.
• Read the “Programmer’s guide” section of this document. It describes how to program
the digitizer hardware to make an acquisition, and to transfer sample data into appli-
cation buffers.
• Browse the SDK sample programs. They include sample code that demonstrates how
to make many types of acquisitions supported by the digitizer.
Note that this document includes descriptions of board specific features and options that
may not be available on your digitizer board. Please refer your board’s user manual for its
specifications.
7
ATS-SDK Documenta on, Release 7.5.0
Document naviga on
This manual contains intra-document links. You will need a PDF viewer with “Previous
View” functionality to navigate through the manual with ease.
If you are opening this PDF manual with the built-in Mozilla® Firefox® PDF viewer, you
can right-click anywhere in the PDF window to access page navigation:
Otherwise, this PDF manual is best viewed using a PDF viewer with “Previous View” func-
tionality. If your preferred PDF viewer does not include this functionality, you may wish to
use one of the following1 options:
• Foxit® Reader: https://www.foxitsoftware.com/pdf-reader/ (available for Linux and
Windows)
• PDF Studio 2018: https://www.qoppa.com/pdfstudioviewer/download/ (available for
Linux and Windows)
• Adobe® Acrobat® Reader DC: https://get.adobe.com/reader/ (available for Windows)
If you are using Adobe Acrobat Reader, you will need to enable the Previous View and Next
View Page Navigation tools: Right-click on the top toolbar and go to Show Page Navigation
Tools, then select Previous View. Repeat the process for Next View.
1
This manual includes links to information created and maintained by other private and/or public orga-
nizations. Alazar Technologies Inc. (AlazarTech) provides these links solely for our users’ information and
convenience. AlazarTech does not control or guarantee the accuracy, relevance, or completeness of informa-
tion contained on a linked website. Furthermore, AlazarTech does not endorse these organizations or the views
they express or the products/services they offer. AlazarTech is not responsible for transmissions users receive
from linked websites, nor is it responsible for or liable in any way for commercial transactions which users
transact with linked websites.
C/C++ developers under Linux should include the following header files in source files that
use functions exported by the ATS-SDK library:
#include "AlazarError.h"
#include "AlazarApi.h"
#include "AlazarCmd.h"
C/C++ developers should include the following header files in source files that use functions
exported by the API library:
#include "AlazarError.h"
#include "AlazarApi.h"
#include "AlazarCmd.h"
These applications should also link against the 32- or 64-bit version of ATSApi.lib, as re-
quired.
The SDK setup program installs the header files in “Samples_C\Include”, and the library files
in “Samples_C\Library”.
2.2.3 C#
2.2.4 LabVIEW
2.2.5 Python
Python developers can use the atsapi.py module provided in the “Samples_Python\Library”
directory. It provides a very thin wrapper around the AlazarTech C/C++ API, with only mi-
nor differences:
• The ‘Alazar’ prefixes have been removed from the function names, and the first letter
is not capitalized. For example, ‘AlazarAbortAsyncRead’ becomes ‘abortAsyncRead’.
• Board handles have been removed. Instead, a Board class has been added. All the
functions that take a board handle as a parameter are moved to being member func-
tions of the Board class.
• A DMABuffer convenience class has been added, that takes care of memory allocation
of DMA transfers.
• Some functions of the API use return parameters to give back to the caller primitive
types. In Python, the signature of these functions is changed so that the return param-
eters are replaced with return types.
2.2.6 MATLAB
By opposition, a MATLAB program that wishes to call the same function should simply
use the following at the call site:
AlazarStartCapture(boardHandle);
Note that because this function will throw in case of an error, it is necessary for the
MATLAB program to include exception handling code higher in the call stack if termi-
nating upon error is not acceptable.
2. Output parameters in C functions are return values in their MATLAB equivalents.
Here is how AlazarGetChannelInfo() can be called from a C program:
U32 memorySize = 0;
U32 bitsPerSample = 0;
RETURN_CODE rc = AlazarGetChannelInfo(boardHandle,
&memorySize,
(continues on next page)
3. In C programs, arrays are always allocated by the user code, and are passed as a pair
of arguments (a pointer and a size). In MATLAB, arrays are passed to or returned from
functions by value instead.
This change significantly simplifies some function calls. For example, here is how to
generate a window function in a C program:
windowType = ...;
windowLength = ...;
paddingLength = ...;
window = AlazarDSPGenerateWindowFunction(windowType,
windowLength,
paddingLength);
Note: This change does not apply to DMA buffers. For performance reasons (to avoid
costly copies), buffers are passed by reference in MATLAB functions.
2.2.7 C++/CLI
ATS-SDK includes sample programs that demonstrate how to configure and acquire data
from AlazarTech digitizers.
The SDK setup program installs the sample programs to “C:\AlazarTech\ATS-
SDK\%API_VERSION%” under Microsoft Windows, and “/usr/local/AlazarTech” under
Linux. See the “ReadMe.htm” file in the ATS-SDK base directory for a description of the
samples included.
Sample programs are available for the following programming environments in the follow-
ing sub-directories:
Language Sub-directory
C/C++ Samples_C
C# Samples_CSharp
MATLAB Samples_MATLAB
LabVIEW Samples_LabVIEW
Python Samples_Python
Note: Note that the sample programs contain many parameters that should be modified.
These lines of code are preceded by “TODO” comments. Please search for these lines and
modify them as required for your application.
Warning: Many sample programs require a trigger input. These sample programs
configure a board to trigger when a signal connected to its CH A rises through 0V. Before
running these samples, connect a 1 kHz sine waveform of amplitude about 90% of the
board’s input range from a function generator to the CH A connector, or modify trigger
parameters as required. For example, the ATS9360 has an input range of +/- 400 mV. For
this board, a sine wave of 700 mVpp is appropriate. If an appropriate trigger signal is
not supplied, these samples will fail with an acquisition timeout error.
2.4 Contac ng us
Contact us if you have any questions or comments about this document, or the sample code.
Web https://www.alazartech.com/
Email support@alazartech.com
Phone +1-514-426-4899
Fax +1-514-426-2723
Mail
Note that you can download the latest drivers and documentation from our web site.
https://www.alazartech.com/Support/Downloads
THREE
PROGRAMMER’S GUIDE
AlazarTech organizes its digitizer boards into “board systems”. A board system is a group
of one or more digitizer boards that share trigger and clock signals. To create a “board
system” comprised of two or more boards, the boards need to be connected together using
an AlazarTech SyncBoard. All of the channels in a board system trigger and are sampled
simultaneously.
ATS-SDK assigns a “system identifier” number to each board system. The first system de-
tected is assigned system ID number of 1. In addition, a “board identifier” number is as-
signed to each board in a board system. This number uniquely identifies a board within its
board system.
• If a digitizer board is not connected to any other boards using a SyncBoard, then the
SDK assigns it a board ID of 1.
• If two or more boards are connected together using a SyncBoard, then the SDK as-
signs each board an ID number that depends on how the board is connected to the
SyncBoard. The board connected to the “master” slot on the SyncBoard is the master
board in the board system and is assigned a board ID number of 1.
Call the AlazarNumOfSystems() function to determine the number of board systems detected
by the SDK, and call the AlazarBoardsInSystemBySystemID() function to determine the num-
ber of boards in the board system specified by its system identifier. The following code
fragment lists the system and board identifiers of each board detected by the device drivers:
15
ATS-SDK Documenta on, Release 7.5.0
ATS-SDK associates a handle with each digitizer board. Most functions require a board
handle as a parameter. For example, the AlazarSetLED() function allows an application to
control the LED on the PCI/PCIe mounting bracket of a board specified by its handle.
Use the AlazarGetBoardBySystemID() API function to get a handle to a board specified by its
system identifier and board identifier numbers.
If only one board is installed in a computer, ATS-SDK assigns it system ID 1 and board ID 1.
The following code fragment gets a handle to such a board, and uses this handle to toggle
the LED on the board’s PCI/PCIe mounting bracket:
// Select a board
U32 systemId = 1;
U32 boardId = 1;
If more than one board is installed in a PC, the boards are organized into board systems, and
are assigned system and board identifier numbers. The following code fragment demon-
strates how to obtain a handle to each board in such an installation, and use the handle to
toggle the LED on the board’s PCI/PCIe mounting bracket:
System handles
Several ATS-SDK functions require a “system handle”. A system handle is the handle of the
master board in a board system.
• If a board is not connected to other boards using a SyncBoard, then its board handle
is the system handle.
• If a board is connected to other boards using a SyncBoard, then the board that is con-
nected to the master connector on the SyncBoard is the master board, and its board
handle is the system handle.
ATS-SDK maintains a list of board handles in order to support master-slave board systems.
The SDK creates board handles when it is loaded into memory, and destroys these handles
when it is unloaded from memory. An application should not need to close a board handle.
ATS-SDK includes a number of functions that return information about a board specified
by its handle. These functions include:
AlazarGetBoardKind() Get a board’s model from its handle.
AlazarGetChannelInfo() Get the number of bits per sample, and on-board memory size in
samples per channel.
AlazarGetCPLDVersion() Get the CPLD version of a board.
AlazarGetDriverVersion() Get the driver version of a board.
AlazarGetParameter() Get a board parameter as a signed 32-bit value.
AlazarGetParameterUL() Get a board parameter as an unsigned 32-bit value.
AlazarQueryCapability() Get a board capability as an unsigned 32-bit value.
The sample program “%ATS_SDK_DIR%\Samples\AlazarSysInfo” demonstrates how get a
board handle and use it to obtain board properties. The API also exports functions that use
a board handle to configure a board, arm it to make an acquisition, and transfer sample data
from the board to application buffers. These topics are discussed in the following sections.
The ATS-SDK resets all digitizer boards during its initialization procedure. This initializa-
tion procedure automatically runs when the API library is loaded into memory.
• If an application statically links against the API library, the API resets all boards when
the application is launched.
• If an application dynamically loads the API library, the API resets all boards when the
application loads the API into memory.
Warning: Note that when an application using the API is launched, all digitizer boards
are reset. If one application using the API is running when a second application using
the API is launched, configuration settings written by the first application to a board may
be lost. If a data transfer between the first application and a board was in progress, data
corruption may occur.
Before acquiring data from a board system, an application must configure the timebase,
analog inputs, and trigger system settings of each board in the board system.
3.3.1 Timebase
The timebase of the ADC converters on AlazarTech digitizer boards may be supplied by:
• Its on-board oscillators.
• A user supplied external clock signal.
• An on-board PLL clocked by a user supplied 10 MHz reference signal.
Internal clock
See AlazarSetCaptureClock() or the board reference manual for a list of sample rate identi-
fiers appropriate for a board.
External clock
AlazarTech boards optionally support using a user-supplied external clock signal input to
the ECLK connector on its PCI/PCIe mounting bracket to clock its ADC converters.
To use an external clock signal as a timebase, call AlazarSetCaptureClock() specifying SAM-
PLE_RATE_USER_DEF as the sample rate identifier, and select a clock source identifier appro-
priate for the board model and the external clock properties. The following code fragment
shows how to configure an ATS460 to acquire at 100 MS/s with a 100 MHz external clock:
AlazarSetCaptureClock(handle, // HANDLE -- board handle
FAST_EXTERNAL_CLOCK, // U32 -- clock source Id
SAMPLE_RATE_USER_DEF, // U32 -- sample rate Id or value
CLOCK_EDGE_RISING, // U32 -- clock edge Id
0 // U32 -- decimation
);
See the board reference manual for the properties of an external clock signal that are appro-
priate for a board, and AlazarSetCaptureClock() for a list of external clock source identifiers.
Some boards allow adjusting the comparator level of the external clock input receiver to
match the receiver to the clock signal supplied to the ECLK connector. If necessary, call
AlazarSetExternalClockLevel() to set the relative external clock input receiver comparator
level, in percent.
AlazarSetExternalClockLevel( handle, // HANDLE –- board handle
level_percent, // float –- external clock level in percent );
10 MHz PLL
Some boards can generate a timebase from an on-board PLL clocked by user supplied ex-
ternal 10 MHz reference signal input to its ECLK connector.
ATS660
In 10 MHz PLL external clock mode, the ATS660 can generate a sample clock between 110
and 130 MHz, in 1 MHz, steps from an external 10 MHz reference input. Call AlazarSetCap-
tureClock() specifying EXTERNAL_CLOCK_10MHZ_REF as the clock source identifier, the desired
sample rate between 110 and 130 MHz in 1 MHz steps, and a decimation factor of 1 to
100000. Note that the decimation value should be one less than the desired decimation fac-
tor. The following code fragment shows how to generate a 32.5 MS/s sample rate (130 MHz
/ 3) from a 10 MHz PLL external clock input:
AlazarSetCaptureClock(
handle, // HANDLE �- board handle
EXTERNAL_CLOCK_10MHZ_REF, // U32 �- clock source Id
130000000, // U32 �- sample rate Id or value
CLOCK_EDGE_RISING, // U32 �- clock edge Id
2 // U32 �- decimation value
);
ATS9325
In 10 MHz PLL external clock mode, the ATS9325 generates a 500 MHz sample clock from
an external 10 MHz reference input. The 500 MS/s sample data can be decimated by a factor
of 2, 4, or any multiple of 5.
Call AlazarSetCaptureClock() specifying EXTERNAL_CLOCK_10MHZ_REF as the clock source and
500 MHz as the sample rate, and select a decimation factor of 2, 4, or any multiple of 5, up
to 100000. For example, the following code fragment shows how to generate a 100 MS/s
sample rate (500 MHz / 5) from a 10 MHz external clock input:
AlazarSetCaptureClock(
handle, // HANDLE -- board handle
EXTERNAL_CLOCK_10MHZ_REF, // U32 -- clock source Id
500000000, // U32 -- sample rate Id
CLOCK_EDGE_RISING, // U32 -- clock edge Id
5 // U32 -- decimation
);
ATS9350/ATS9351/ATS9352/ATS9353
In 10 MHz PLL external clock mode, the ATS9350, ATS9351, ATS9352 and ATS9553 generate a
500 MHz sample clock from an external 10 MHz reference input. The 500 MS/s sample data
can be decimated by a factor of 1, 2, 4, or any multiple of 5. Call AlazarSetCaptureClock()
specifying EXTERNAL_CLOCK_10MHZ_REF as the clock source and 500 MHz as the sample rate,
and select a decimation factor of 1, 2, 4, or any multiple of 5 up to 100000. For example, the
following code fragment shows how to generate a 100 MS/s sample rate (500 MHz / 5) from
a 10 MHz external clock input:
AlazarSetCaptureClock(
handle, // HANDLE �- board handle
EXTERNAL_CLOCK_10MHZ_REF, // U32 �- clock source Id
500000000, // U32 �- sample rate Id
CLOCK_EDGE_RISING, // U32 �- clock edge Id
5 // U32 �- decimation
);
ATS9360
In 10 MHz PLL external clock mode, the ATS9360 can generate any sample clock frequency
between 300 MHz and 1800 MHz that is a multiple of 1 MHz. Call AlazarSetCaptureClock()
specifying EXTERNAL_CLOCK_10MHZ_REF as the clock source identifier, the desired sample rate
between 300 MS/s and 1800 MS/s, and 1 as the decimation ratio. The sample rate must be
a multiple of 1 MHz. For example, the following code fragment shows how to generate a
1.382 GS/s sample clock from a 10 MHz reference:
AlazarSetCaptureClock(
handle, // HANDLE �- board handle
EXTERNAL_CLOCK_10MHZ_REF, // U32 �- clock source Id
1382000000, // U32 �- sample rate
CLOCK_EDGE_RISING, // U32 �- clock edge Id
1 // U32 �- decimation
);
ATS9371
In 10 MHz PLL external clock mode, the ATS9371 can generate any sample clock frequency
between 300 MHz and 1000 MHz that is a multiple of 1 MHz. Call AlazarSetCaptureClock()
specifying EXTERNAL_CLOCK_10MHZ_REF as the clock source identifier, the desired sample rate
between 300 MS/s and 1000 MS/s, and 1 as the decimation ratio. The sample rate must be a
multiple of 1 MHz. For example, the following code fragment shows how to generate a 882
MS/s sample clock from a 10 MHz reference:
AlazarSetCaptureClock(
handle, // HANDLE �- board handle
EXTERNAL_CLOCK_10MHZ_REF, // U32 �- clock source Id
882000000, // U32 �- sample rate
CLOCK_EDGE_RISING, // U32 �- clock edge Id
1 // U32 �- decimation
);
ATS9373
In 10 MHz PLL external clock mode, the ATS9373 can generate any sample clock frequency
between 500 MHz and 2000 MHz that is a multiple of 1 MHz in either single or dual channel
mode. In addition, it can generate any sample clock frequency between 2000 MHz and 4000
MHz that is a multiple of 2 MHz in single channel mode.
Call AlazarSetCaptureClock() specifying EXTERNAL_CLOCK_10MHZ_REF as the clock source iden-
tifier, the desired sample rate between 300 MS/s and 4000 MS/s, and 1 as the decimation
ratio. The sample rate must be a multiple of 1 MHz in dual channel if the frequency is less
than or equal to 2000 MHz, and a multiple of 2 MHz if the frequency is above 2000 MHz.
For example, the following code fragment shows how to generate a 1.382 GS/s sample clock
from a 10 MHz reference:
AlazarSetCaptureClock(
handle, // HANDLE �- board handle
EXTERNAL_CLOCK_10MHZ_REF, // U32 �- clock source Id
1382000000, // U32 �- sample rate
CLOCK_EDGE_RISING, // U32 �- clock edge Id
1 // U32 �- decimation
);
ATS9440
In 10 MHz PLL external clock mode, the ATS9440 can generate either a 125 MHz or 100 MHz
sample clock from an external 10 MHz reference input. The 125 MS/s or 100 MS/s sample
data can be decimated by a factor of 2, 4, or any multiple of 5.
Call AlazarSetCaptureClock() specifying EXTERNAL_CLOCK_10MHZ_REF as the clock source either
125 MHz or 100 MHz as the sample rate, and select a decimation radio between 1 and
100000. For example, the following code fragment shows how to generate a 25 MS/s sample
rate (125 MHz / 5) from a 10 MHz external clock input:
AlazarSetCaptureClock(
handle, // HANDLE �- board handle
EXTERNAL_CLOCK_10MHZ_REF, // U32 �- clock source Id
125000000, // U32 �- sample rate Id
CLOCK_EDGE_RISING, // U32 �- clock edge Id
5 // U32 �- decimation
);
ATS9462
In 10 MHz PLL external clock mode, the ATS9462 can generate a sample clock between 150
and 180 MHz in 1 MHz steps from an external 10 MHz reference input. Sample data can be
decimated by a factor of 1 to 100000.
Call AlazarSetCaptureClock() specifying EXTERNAL_CLOCK_10MHZ_REF as the clock source, the
desired sample rate between 150 and 180 MHz in 1 MHz steps, and the decimation factor of
1 to 100000. Note that the decimation value should be one less than the desired decimation
factor. For example, the following code fragment shows how to generate a 15 MS/s sample
rate (150 MHz / 10) from a 10 MHz external clock input:
AlazarSetCaptureClock(
handle, // HANDLE �- board handle
EXTERNAL_CLOCK_10MHZ_REF, // U32 �- clock source Id
150000000, // U32 �- sample rate Id or value
CLOCK_EDGE_RISING, // U32 �- clock edge Id
9 // U32 �- decimation value
);
ATS9625/ATS9626
In 10 MHz PLL external clock mode, the ATS9625/ATS9626 can generate a 250 MHz sample
clock from an external 10 MHz reference input. Sample data can be decimated by a factor
of 1 to 100000.
Call AlazarSetCaptureClock() specifying EXTERNAL_CLOCK_10MHZ_REF as the clock source, 250
MHz has the sample rate value, and a decimation ratio of 1 to 100000. For example, the
following code fragment shows how to generate a 25 MS/s sample rate (250 MHz / 10) from
a 10 MHz external clock input:
AlazarSetCaptureClock(
handle, // HANDLE �- board handle
EXTERNAL_CLOCK_10MHZ_REF, // U32 �- clock source Id
250000000, // U32 �- sample rate Id or value
CLOCK_EDGE_RISING, // U32 �- clock edge Id
10 // U32 �- decimation value
);
ATS9850
In 10 MHz PLL external clock mode, the ATS9850 generates a 500 MHz sample clock from
an external 10 MHz reference input. The 500 MS/s sample data can be decimated by a factor
of 1, 2, 4, or any multiple of 10.
Call AlazarSetCaptureClock() specifying EXTERNAL_CLOCK_10MHZ_REF as the clock source and
500 MHz as the sample rate value, and a decimation of 1, 2, 4, or any multiple of 10 up
to 100000. For example, the following code fragment shows how to generate a 125 MS/s
sample rate (500 MHz / 4) from a 10 MHz external clock input:
AlazarSetCaptureClock(
handle, // HANDLE �- board handle
EXTERNAL_CLOCK_10MHZ_REF, // U32 �- clock source Id
500000000, // U32 �- sample rate Id or value
CLOCK_EDGE_RISING, // U32 �- clock edge Id
4 // U32 �- decimation value
);
ATS9870
In 10 MHz PLL external clock mode, the ATS9870 generates a 1 GHz sample clock from an
external 10 MHz reference input. The 1 GS/s sample data can be decimated by a factor of 1,
2, 4, or any multiple of 10.
Call AlazarSetCaptureClock() specifying EXTERNAL_CLOCK_10MHZ_REF as the clock source and 1
GHz as the sample rate value, and a decimation of 1, 2, 4, or any multiple of 10 up to 100000.
For example, the following code fragment shows how to generate a 250 MS/s sample rate (1
GHz / 4) from a 10 MHz external clock input:
AlazarSetCaptureClock(
handle, // HANDLE �- board handle
EXTERNAL_CLOCK_10MHZ_REF, // U32 �- clock source Id
1000000000, // U32 �- sample rate Id or value
CLOCK_EDGE_RISING, // U32 �- clock edge Id
4 // U32 �- decimation value
);
AlazarTech digitizers have analog amplifier sections that process the signals input to its
analog input connectors before they are sampled by its ADC converters. The gain, coupling,
and termination of the amplifier sections should be configured to match the properties of
the input signals.
Call AlazarInputControl() to specify the desired input range, termination, and coupling of
an input channel. The following code fragment configures input CH A for a range of ±800
mV, DC coupling, and 50Ω termination:
AlazarInputControl(
boardHandle, // HANDLE -- board handle
CHANNEL_A, // U8 -- input channel
DC_COUPLING, // U32 -- input coupling id
INPUT_RANGE_PM_800_MV, // U32 -- input range id
IMPEDANCE_50_OHM // U32 -- input impedance id
);
See AlazarInputControl() and the board reference manual for a list of input range, coupling,
and impedance identifiers appropriate for the board.
Bandwidth filter
Some digitizers have a low pass filters that attenuate signals above about 20 MHz. By de-
fault, these filters are disabled. Call AlazarSetBWLimit() to enable or disable the bandwidth
limit filter. The following code fragment enables the CH A bandwidth limit filter:
AlazarSetBWLimit (
boardHandle, // HANDLE -- board handle
CHANNEL_A, // U32 -- channel identifier
1 // U32 -- 0 = disable, 1 = enable
);
Amplifier bypass
Some digitizer models support “amplifier bypass” mode. In this mode, the analog signal
supplied to an input connector is connected directly the ADC driver of that channel, by-
passing its amplifier section. Amplifier bypass mode must be enabled in hardware either
through DIP switches on the board, or as a factory option. Once enabled in hardware, the
following code fragment shows how to configure this option in software:
AlazarInputControl(
handle, // HANDLE -- board handle
CHANNEL_A, // U8 -- input channel
DC_COUPLING, // U32 �- not used
INPUT_RANGE_HI_FI, // U32 -- input range id
IMPEDANCE_50_OHM // U32 �- not used
);
Note that when amplifier bypass mode option is enabled for an input channel, the channel’s
full-scale input range is fixed. The following table lists the nominal full-scale input range
values that may be used to convert sample code values to volts.
See your board’s hardware reference manual for more information about using amplifier
bypass.
AlazarTech digitizer boards have a flexible triggering system with two separate trigger en-
gines that can be used independently, or combined together to generate trigger events.
Warning: As opposed to what earlier documentation mentioned, the only way to com-
bine trigger events is with the OR operator.
AlazarSetTriggerOpera on
Use the AlazarSetTriggerOperation() API function to configure each of the two trigger en-
gines, and to specify how they should be used to make the board trigger:
RETURN_CODE
AlazarSetTriggerOperation (
HANDLE handle,
U32 TriggerOperation,
U32 TriggerEngineId1,
U32 SourceId1,
U32 SlopeId1,
U32 Level1,
U32 TriggerEngineId2,
U32 SourceId2,
U32 SlopeId2,
U32 Level2
);
The following paragraphs describe each of the function’s parameters, and provide examples
showing how to use the function.
Trigger engine
The trigger engine identifier parameter specifies which of the two trigger engines you wish
to configure. The parameter may have one of the following values:
TRIG_ENGINE_J Configure trigger engine J
TRIG_ENGINE_K Configure trigger engine K
Data source
The data source identifier parameter selects the where the specified trigger engine should
get its data. Refer to the documentation of the AlazarSetTriggerOperation() function for a
list of all possible values.
Trigger slope
The trigger slope identifier parameter selects whether rising or falling edges of the trigger
source are detected as trigger events.
TRIGGER_SLOPE_POSITIVE The trigger engine detects a trigger event when sample values from
the trigger source rise above a specified level.
TRIGGER_SLOPE_NEGATIVE The trigger engine detects a trigger event when sample values from
the trigger source fall below a specified level.
Trigger level
The trigger level parameter sets the level that the trigger source must rise above, or fall
below, for the selected trigger engine to become active. The trigger level is specified as an
unsigned 8-bit code that represents a fraction of the full-scale input range of the trigger
source; 0 represents the negative full-scale input, 128 represents a 0-volt input, and 255
represents the positive full-scale input. For example, if the trigger source is CH A, and the
CH A input range is ± 800 mV, then 0 represents a –800 mV trigger level, 128 represents a 0
V trigger level, and 255 represents +800 mV trigger level.
In general, the trigger level value is given by:
The following table gives examples of how trigger level codes map to trigger levels in volts
according to the full-scale input range of the trigger source.
Code Frac on of input range Level with ±1 V range Level with ±5 V range
0 -100% -1V -5V
64 -50% -500 mV -2.5 V
96 -25% -250 mV -1.25 V
128 0% 0V 0V
160 +25 % 250 mV 1.25 V
192 +50% +500 mV +2.5 V
255 +100% +1V +5V
Trigger opera on
Finally, the trigger operation identifier specifies how the trigger events detected by the trig-
ger engines are combined to make the board trigger. Possible values are:
TRIG_ENGINE_OP_J The board triggers when trigger engine J detects a trigger event. Events
detected by engine K are ignored.
TRIG_ENGINE_OP_K The board triggers when trigger engine K detects a trigger event. Events
detected by engine J are ignored.
TRIG_ENGINE_OP_J_OR_K The board triggers when a trigger event is detected by any of trigger
engines J and K.
AlazarSetTriggerOpera on examples
The following code fragment configures a board to trigger when the signal connected to CH
A rises above 0V. This example only uses trigger engine J:
AlazarSetTriggerOperation(
handle, // HANDLE -- board handle
TRIG_ENGINE_OP_J, // U32 -- trigger operation
TRIG_ENGINE_J, // U32 -- trigger engine id
TRIG_CHAN_A, // U32 -- trigger source id
TRIGGER_SLOPE_POSITIVE, // U32 -- trigger slope id
128, // U32 -- trigger level (128 = 0V)
TRIG_ENGINE_K, // U32 -- trigger engine id
TRIG_DISABLE, // U32 -- trigger source id for engine K
TRIGGER_SLOPE_POSITIVE, // U32 -- trigger slope id
128 // U32 -- trigger level (0 � 255)
);
The following code fragment configures a board to trigger when the signal connected to CH
B rises above 500 mV, or falls below -200 mV, if CH B’s input range is ±1V. This example uses
both trigger engine J and K:
External trigger
AlazarTech digitizer boards can trigger on a signal connected to its TRIG IN connector. To
use an external trigger input:
• Call AlazarSetTriggerOperation() with TRIG_EXTERNAL as the trigger source identifier of
at least one of the trigger engines; and
• Call AlazarSetExternalTrigger() to select the range and coupling of the external trigger
input.
The following code fragment configures a board to trigger when the signal connected to the
TRIG IN falls below +2 V, assuming the signal’s range is less than ± 5V with DC coupling:
// Calculate the trigger level code from the level and range
double triggerLevel_volts = 2.; // trigger level
double triggerRange_volts = 5.; // input range
U32 triggerLevel_code =
(U32)(128 + 127 * triggerLevel_volts / triggerRange_volts);
Trigger meout
AlazarTech digitizer boards can be configured to automatically trigger when the board is
waiting for a trigger event, but no trigger events arrive after a specified time interval. This
behavior is similar to the “automatic” trigger mode of oscilloscopes, and may be useful to
capture waveforms when trigger conditions are unknown. Call AlazarSetTriggerTimeOut()
to specify the amount of time that a board should wait for a hardware trigger event before
automatically generating a software trigger event and, as a result, acquiring one record.
Note: The trigger timeout value should be set to zero once stable trigger parameters have
been found. Otherwise, a board may generate unexpected trigger events if the trigger time-
out interval expires before a hardware trigger event occurs.
The following code fragment configures a board to automatically trigger and acquire one
record if it does not receive a trigger event after some time:
AlazarSetTriggerTimeOut(
boardHandle, // HANDLE -- board handle
1000 // U32 -- Timeout in ticks
);
The following code fragment configures a board to wait forever for trigger events:
AlazarSetTriggerTimeOut(
boardHandle, // HANDLE -- board handle
0 // U32 -- timeout in ticks
);
Trigger delay
An AlazarTech digitizer board can be configured to wait for a specified amount of time after
it receives a trigger event before capturing a record for the trigger. Call AlazarSetTriggerDe-
lay() to specify a time, in sample clock periods, to wait after receiving a trigger event for a
record before capturing samples for that record. The following code fragment shows how
to set a trigger delay of 1 ms, given a sample rate of 100 MS/s:
AlazarTech digitizer boards with an AUX I/O connector can be configured to supply a
5V TTL-level output signal, or to receive a TTL-level input signal on this connector. Use
AlazarConfigureAuxIO() to configure the function of the AUX I/O connector.
The ATS9440 has two AUX I/O connectors: AUX I/O 1 and AUX I/O 2. AUX I/O 1 is configured
by firmware as a trigger output signal, while AUX I/O 2 is configured by software using
AlazarConfigureAuxIO(). A custom FPGA is required to change the operation of AUX I/O 1.
The ATS9625 and ATS9626 have two AUX I/O connectors: AUX1 and AUX2. AUX1 is config-
ured by software using AlazarConfigureAuxIO(), while AUX2 is configured by the main FPGA
as a trigger output signal by default. AUX2 can be controlled by its user-programmable
FPGA as desired by the FPGA designer.
Trigger output
The AUX I/O connector can be configured to supply a trigger output signal, where the edge
of the trigger output signal is synchronized with the edge of the sample clock. Note that
this is the default power-on mode for the AUX I/O connector. The following code fragment
configures the AUX I/O connector as a trigger output signal:
AlazarConfigureAuxIO(
handle, // HANDLE -- board handle
AUX_OUT_TRIGGER, // U32 -- mode
0 // U32 -- parameter
);
Pacer output
The AUX I/O connector can be configured to output the sample clock divided by a pro-
grammable value. This option may be used to generate a clock signal synchronized with
the sample clock of the digitizer board. The following code fragment generates a 10 MHz
signal on an AUX I/O connector, given a sample rate of 180 MS/s:
AlazarConfigureAuxIO(
handle, // HANDLE -- board handle
AUX_OUT_PACER, // U32 -- mode
18 // U32 �- sample clock divider
);
Note that the sample rate divider value must be greater than 2, and that the signal output
may be limited by the bandwidth of the output’s TTL drivers.
Digital output
The AUX I/O connector can be configured to output a TTL high or low signal. This mode
allows a programmer to use the AUX I/O connector as a general purpose digital output. The
following code fragment configures the AUX I/O connector as a digital output:
AlazarConfigureAuxIO(
handle, // HANDLE -- board handle
AUX_OUT_SERIAL_DATA, // U32 -- mode
0 // U32 �- 0 = low, 1 = high
);
The AUX I/O connector can be configured as an AutoDMA trigger enable input signal. When
enabled, a board will:
• Wait for a rising or falling edge on the AUX I/O.
• Wait for the number of trigger events necessary to capture the number of “records
per buffer” in one AutoDMA segment specified at the start of the acquisition.
• Repeat.
The following code fragment configures the AUX I/O connector to acquire “records per
buffer” records after it receives the rising edge of a TTL pulse connected on the AUX I/O
connector:
AlazarConfigureAuxIO(
handle, // HANDLE -- board handle
AUX_IN_TRIGGER_ENABLE, // U32 -- mode
TRIGGER_SLOPE_POSITIVE // U32 -- parameter
);
Digital input
The AUX I/O connector can be configured to read the TTL level of a signal input to the AUX
connector. This mode allows a programmer to use the AUX I/O connector as a general-
purpose digital input. The following code fragment configures the AUX I/O connector as a
digital input:
AlazarConfigureAuxIO(
handle, // HANDLE -- board handle
AUX_IN_AUXILIARY, // U32 -- mode
0 // U32 �- not used
);
Once configured as a serial input, the following code fragment reads the AUX input level:
long level;
AlazarGetParameter(
handle, // HANDLE -- board handle
0, // U8 -- channel
GET_AUX_INPUT_LEVEL, // U32 -- parameter
&level // long* �- 0 = low, 1 = high
);
By default, all the boards that have more than 8-bit per sample sampling transfer data to
the host computer with 2 bytes (16 bit) per sample. This behavior can be changed on some
boards by packing the data, either to 8- or 12-bits per sample. This is done by calling the
AlazarSetParameter function with the PACK_MODE parameter and a packing option (either
PACK_DEFAULT, PACK_8_BITS_PER_SAMPLE or PACK_12_BITS_PER_SAMPLE). The parameter must be
set before calling AlazarBeforeAsyncRead.
For a list of boards that implement 8-bit packing, 12-bit packing and both; please refer to
Table 9 – Miscellaneous Features Support.
Some AlazarTech digitizers are capable of dual edge sampling (DES), meaning that sample
data is acquired both at the rising and falling edge of the clock signal. This mode can apply
both to internal and external clocks. For example, ATS9373 is capable of 2 GS/s sampling
in non-DES mode, and 4 GS/s in DES mode. When using the internal clock, DES sampling
is activated automatically. Data must be acquired from channel A only. To use DES sam-
pling in external clock mode, one must call AlazarSetParameter as follows before calling
AlazarSetCaptureClock():
AlazarSetParameterUL(
handle, // HANDLE -- board handle
channelMask, // U8 -- channel to acquire
SET_ADC_MODE,
ADC_MODE_DES
);
Programs that wish to use DES-capable digitizers in non-DES mode (i.e. ATS9373 at sampling
frequencies at or below 2GS/s) do not need to be modified.
Footers can be included to the data and contain additional information about the acqui-
sition of each record. The footers include a timestamp, the record number in the current
acquisition, a frame count and the state of the AUX I/O signal at the time of the acquisition.
As the name implies, this option is only available in NPT acquisition mode.
Depending if on-FPGA FFT is used or not, the function to retrieve the NPT footers and their
position in memory is different. If FFT is not enabled, NPT footers will replace the last 16
bytes of a record, leading to a loss of a few data points. These NPT footers are labeled Time-
Domain to highlighting the fact that FFT is not used. When one channel is enabled, the last
8 samples of the data will be removed. When two channels are enabled, only one footer will
be appended per record and will take the place of the last 4 samples from each channel.
When using on-FPGA FFT, a 128-byte word will be appended to each record. The last 16
bytes of this 128-byte word contain the footer.
For convenience, a structure named NPTFooter should be used. Here is how to enable and
obtain the NPT footers:
• Connect the start of frame signal to the AUX I/O connector.
• Append the flag ADMA_ENABLE_RECORD_FOOTERS to the options passed to AlazarBeforeAsyn-
cRead() by using a binary OR (|). Make sure the acquisition mode is set to ADMA_NPT and
FFT processing is enabled if applicable.
• Call AlazarConfigureAuxIO() specifying AUX_IN_AUXILIARY as the mode with 0 as param-
eter.
• Create an array that will contain the NPT footers. This array needs to be contiguous
in memory and can thus be a standard C array or a std::vector with preallocated size.
• Call AlazarExtractTimeDomainNPTFooters() or AlazarExtractFFTNPTFooters() to retrieve
the NPT footers for each buffer and store them in the array. The recordSize_bytes pa-
rameter needs to take into account the number of active channels.
• Browse the array to see the frame associated with each record and count the number
of records in each frame if needed.
See the API reference documentation for details about the specific parameters to use with
each function.
Note: Dual-port AutoDMA is the recommended acquisition mode for data acquisition with
AlazarTech digitizers, because it offers much better performance and flexibility. Single-port
acquisitions should only be used with PCI bus digitizers that do not have dual-port memory
(i.e. ATS460 and ATS860 without dual-port memory upgrade, ATS310, ATS330, ATS850).
AutoDMA allows a board to capture sample data to on-board dual-port memory while – at
the same time – transferring sample data from on-board dual-port memory to a buffer in
host memory. Data acquisition and data transfer are done in parallel, so any trigger events
that occur while the board is transferring data will not be missed.
AutoDMA may be used if:
• A board has dual-port or FIFO on-board memory.
• An application acquires at an average rate, in MB/s, that is less than maximum transfer
rate of your board’s PCI or PCIe host bus interface.
AutoDMA must be used if:
• A board has FIFO on-board memory.
• An application cannot miss trigger events that occur while it transfers data to host
memory, or re-arms for another acquisition.
• An application acquires more sample points or records than can be stored in on-board
memory.
Applications such as ultrasonic testing, OCT, radar, and imaging should use AutoDMA. An
AutoDMA acquisition is divided into segments. AutoDMA hardware on a board transfers
sample data, one segment at a time, from on-board memory to a buffer in host memory.
There may be an unlimited number of segments in an AutoDMA acquisition, so a board can
be armed to make an acquisition of infinite duration. There are four AutoDMA operating
modes:
Traditional AutoDMA This mode acquires multiple records, one per trigger event. Each
record may contain samples before and after its trigger event. Each buffer contains
one or more records. A record header may optionally precede each record. Supports
low trigger repeat rates.
NPT AutoDMA Acquires multiple records, one per trigger event. Some boards support a
very limited number of pre-trigger samples. Otherwise, only post-trigger samples are
possible. Each buffer contains one or more record. Supports high trigger repetition
rates.
Triggered streaming AutoDMA Acquires a single, gapless record spanning one or more
DMA buffers. Each DMA buffer then contains only a segment of the record. This mode
waits for a trigger event before acquiring the record.
Continuous streaming AutoDMA Acquires a single, gapless record spanning one or more
DMA buffers. Each DMA buffer then contains only a segment of the record. This mode
does not wait for a trigger event before acquiring the record.
To make an AutoDMA acquisition, an application must:
• Specify the AutoDMA mode, samples per record, records per buffer, and records per
acquisition.
• Arm the board to start the acquisition.
• Wait for an AutoDMA buffer to be filled, process the buffer, and repeat until the ac-
quisition is complete.
Note: An additional acquisition mode called Synchronous AutoDMA was available in ad-
dition to the modes presented here in former versions of the SDK. Support for this API was
removed with ATSApi version 6.0.0. Refer to Annex 1 for more information.
Use traditional mode to acquire multiple records – one per trigger event – with sample
points after, and optionally before, the trigger event in each record. A record header may
optionally precede each record in the AutoDMA buffer. The programmer specifies the num-
ber of samples per record, records per buffer, and buffers in the acquisition. Traditional
AutoDMA supports low trigger repeat rates. For high trigger repeat rates, use NPT AutoDMA
mode. Digitizers with four analog input channels do not support 3-channel operation, and
require sample interleave to allow for high transfer rates from on-board memory.
Each buffer is organized in memory as follows if a board has on-board memory. Rxy rep-
resents a contiguous array of samples from record x of channel y.
Each buffer is organized in memory as follows if a board does not have on-board memory, or
if sample interleave is enabled. Rxy represents a contiguous array of samples from record
x of channel y, Rx[uv] represents interleaved samples from record x of channels u and v,
and Rx[uvyz] represents interleaved samples from channels u, v, y, and z.
NPT AutoDMA
Use NPT mode to acquire multiple records – one per trigger event – with no sample points
before the trigger event in each record, and with no record headers. The programmer
specifies the number of samples per record, records per buffer, and buffers in the acquisi-
tion. Note that NPT mode is highly optimized, and supports higher trigger repeats rate than
possible in Traditional mode. Digitizers with four analog input channels do not support
3-channel operation, and require sample interleave to allow for high transfer rates from
on-board memory.
Each buffer is organized in memory as follows if a board has on-board memory. Rxy rep-
resents a contiguous array of samples from record x of channel y.
Each buffer is organized in memory as follows if a board does not have on-board memory, or
if sample interleave is enabled. Rxy represents a contiguous array of samples from record
x of channel y, Rx[uv] represents interleaved samples from record x of channels u and v,
and Rx[uvyz] represents interleaved samples from record x of channels u, v, y, and z.
Use continuous streaming mode to acquire a single, gapless record that spans multiple
buffers without waiting for a trigger event to start the acquisition. The programmer speci-
fies the number of samples per buffer, and buffers per acquisition. Each buffer is organized
as follows if a board has on-board memory. R1x represents a contiguous array of samples
from channel x.
Each buffer is organized as follows if a board does not have on-board memory, or if sample
interleave is enabled. R1x represents a contiguous array of samples from channel x, R1[uv]
represents samples interleaved from channels u and v, and R1[uvyz] represents samples
interleaved from channels u, v, y, and z.
Use triggered streaming mode to acquire a single, gapless record that spans two or more
buffers after waiting for a trigger event to start the acquisition. The programmer specifies
the number of samples in each buffer, and buffers in the acquisition. Each buffer is orga-
nized as follows if a board has on-board memory. R1x represents a contiguous array of
samples from channel x.
Each buffer is organized as follows if a board does not have on-board memory, or if sample
interleave is enabled. R1x represents a contiguous array of samples from channel x, R1[uv]
represents samples interleaved from channels u and v, and R1[uvyz] represents samples
interleaved from channels u, v, y, and z.
In traditional AutoDMA mode, a 16-byte record header may optionally precede each record
in a buffer. When record headers are enabled, the following table shows the buffer layout if
a board has on-board memory. Record headers are not supported if a board does not have
on-board memory. Rxy represents a contiguous array of samples from record x of channel
y, and Hxy is a 16-byte record header from record x of channel y.
Record headers
struct _HEADER0 {
unsigned int SerialNumber:18; // bits 17..0
unsigned int SystemNumber:4; // bits 21..18
unsigned int WhichChannel:1; // bit 22
unsigned int BoardNumber:4; // bits 26..23
unsigned int SampleResolution:3; // bits 29..27
unsigned int DataFormat:2; // bits 31..30
};
struct _HEADER1 {
unsigned int RecordNumber:24; // bits 23..0
unsigned int BoardType:8; // bits 31..24
};
struct _HEADER2 {
U32 TimeStampLowPart; //bits 31..0
};
struct _HEADER3 {
unsigned int TimeStampHighPart:8; // bits 7..0
unsigned int ClockSource:2; // bits 9..8
unsigned int ClockEdge:1; // bit 10
unsigned int SampleRate:7; // bits 17..11
unsigned int InputRange:5; // bits 22..18
unsigned int InputCoupling:2; // bits 24..23
unsigned int InputImpedance:2; // bits 26..25
unsigned int ExternalTriggered:1; // bit 27
unsigned int ChannelBTriggered:1; // bit 28
unsigned int ChannelATriggered:1; // bit 29
(continues on next page)
See ALAZAR_HEADER for more information about each of the fields of this structure. See
“%ATS_SDK_DIR%\Samples\DualPort\TR_Header” for a full sample program that demon-
strates how to make an AutoDMA acquisition in Traditional mode with record headers.
Record mestamps
AlazarTech digitizer boards include a high-speed 40-bit counter that is clocked by the sam-
ple clock source scaled by a board specific divider. When a board receives a trigger event to
capture a record to on-board memory, it latches the value of this counter. This timestamp
value gives the time, relative to when the counter was reset, when the trigger event for this
record occurred. By default, this counter is reset to zero at the start of each acquisition. Use
AlazarResetTimeStamp() to control when the record timestamp counter is reset. The follow-
ing code fragment demonstrates how to extract the timestamp from a record header, and
covert the value from counts to seconds:
The AutoDMA functions allow an application to add user-defined number of buffers to a list
of buffers available to be filled by a board, and to wait for the board to receive sufficient
trigger events to fill the buffers with sample data. The board uses AutoDMA to transfer data
directly into a buffer without making any intermediate copies in memory. As soon as one
buffer is filled, the driver automatically starts an AutoDMA transfer into the next available
buffer.
AlazarPostBuffer
ADMA_ALLOC_BUFERS
C#, and LabVIEW applications may find it more convenient to allow the API to allocate and
manage a list of buffers available to be filled by the board. These applications should call
AlazarBeforeAsyncRead() with the AMDA_ALLOC_BUFFERS option selected in the “Flags” param-
eter. This option will cause the API to allocate and manage a list of buffers available to be
filled by the board. The application must call AlazarWaitNextAsyncBufferComplete() to wait
for a buffer to be filled. When the board receives sufficient trigger events to fill a buffer, the
API will copy the data from the internal buffer to the user-supplied buffer. The following
code fragment outlines how make an AutoDMA acquisition using the ADMA_ALLOC_BUFFERS
flag and AlazarWaitNextAsyncBufferComplete():
// Allow the API to allocate and manage AutoDMA buffers
flags |= ADMA_ALLOC_BUFFERS;
AlazarAsyncRead
Some C/C++ applications under Windows may require waiting for an event to be set to the
signaled state to indicate when an AutoDMA buffer is full. These applications should use
the AlazarAsyncRead() API. The following code fragment outlines how use AlazarAsyncRead()
to make an asynchronous AutoDMA acquisition:
// Stop the acquisition. This function must be called if unfilled buffers are
// pending.
AlazarAbortAsyncRead(handle);
AlazarAbortAsyncRead
The asynchronous API driver locks application buffers into memory so that boards may
DMA directly into them. When a buffer is completed, the driver unlocks it from memory.
An application must call AlazarAbortAsyncRead() if, at the end of an acquisition, any of the
buffers that it supplies to a board have not been completed. AlazarAbortAsyncRead() com-
pletes any pending buffers, and unlocks them from memory.
Buffer count
An application should supply at least two buffers to a board. This allows the board to fill
one buffer while the application consumes the other. As long as the application can con-
sume buffers faster than the board can fill them, the acquisition can continue indefinitely.
However, Microsoft Windows and general-purpose Linux distributions are not real time
operating systems. An application thread may be suspended for an indeterminate amount
of time to allow other threads with higher priority to run. As a result, buffer processing
may take longer than expected. The board is filling AutoDMA buffers with sample data in
real time. If an application is unable to supply buffers as fast a board fills them, the board
will run out of buffers into which it can transfer sample data. The board can continue to ac-
quire data until it fills is on-board memory, but then it will abort the acquisition and report
a buffer overflow error.
It is recommended that an application supply three or more buffers to a board. This allows
some tolerance for operating system latencies. The programmer may need to increase the
number of buffers according to the application.
Note: The number of buffers required by a board is not the same as the number of buffers
required by an application. There may be little benefit in supplying a board with more
than a few tens of buffers, each of a few million samples. If an application requires much
more sample data for data analysis or other purposes, the programmer should consider
managing application buffers separately from AutoDMA buffers.
Scanning applications divide an acquisition into frames, where each frame is composed of
a number of scan lines, and each scan line is composed of a number of sample points. These
applications typically:
• Wait for a “start of frame” event.
• Wait for a number of “start of line” events, capturing a specified number of sample
points after each “start of line” event.
• Wait for the next “start of frame” event and repeat.
To implement a scanning application using a hardware “start of frame” signal:
• Connect a TTL signal that will serve as the “start of frame” event to the AUX I/O con-
nector.
• Call AlazarConfigureAuxIO() specifying AUX_IN_TRIGGER_ENABLE as the mode, and
the active edge of the trigger enable signal as the parameter.
• Configure the board to make an NPT() or Traditional() mode AutoDMA acquisition
where the number of “records per buffer” is equal to the number of scan lines per
frame.
• Call AlazarStartCapture() to being the acquisition.
• Supply a TTL pulse to the AUX I/O connector (or call AlazarForceTriggerEnable()) to
arm the board to capture one frame. The board will wait for sufficient trigger events
to capture the number of records in an AutoDMA buffer, and then wait for the next
trigger enable event.
To implement a scanning application using a software “start of frame” command:
• Call AlazarConfigureAuxIO() specifying AUX_OUT_TRIGGER_ENABLE as the mode,
along with the signal to output on the AUX I/O connector.
In some other applications, an acquisition is divided several frames, but the number of
records per frame is not constant. This happens in imaging applications such as intravascu-
lar OCT. The rotation speed of the imaging probe is not constant and the number of records
(A-lines) may vary from one frame to the other.
For this situation, the AUX I/O connector should not be used as a trigger enable input as
in conventional scanning application. Instead, it can be used a frame counter. The frame
number can be appended to each data record so the used can recover the frame number
for each record and then reconstruct each frame correctly. These are called footers and can
only be used in NPT acquisition mode. See the NPT footers section for more details about
using NPT footers.
Data format
By default, AlazarTech digitizers generate unsigned sample data. For example, 8-bit digitiz-
ers such as the ATS9870 generate sample codes between 0 and 255 (0xFF) where: 0 repre-
sents a negative full-scale input voltage, 128 (0x80) represents ~0V input voltage, 255 (0xFF)
represents a positive full-scale input voltage. Some AlazarTech digitizer can be configured
to generate signed sample data in two’s complement format. For example, the ATS9870
can be configured to generate sample codes where: 0 represents ~0V input voltage, 127
(0x7F) represents a positive full-scale input voltage, and –128 (0x80) represents a negative
full-scale input voltage.
Call AlazarSetParameter() with parameter SET_DATA_FORMAT before the start of an acquisi-
tion to set the sample data format, and call AlazarGetParameter() with GET_DATA_FORMAT
to get the current data format. The following code fragment demonstrates how to select
signed sample data output:
AlazarSetParameter(
handle, // HANDLE -- board handle
0, // U8 -- channel Id (not used)
SET_DATA_FORMAT, // U32 -- parameter to set
DATA_FORMAT_SIGNED // long -- value (0 = unsigned, 1 = signed)
);
The single-port acquisition API allows an application to capture records to on-board mem-
ory – one per trigger event – and transfer records from on-board to host memory. Data
acquisition and data transfer are made serially, so trigger events may be missed if they
occur during data transfers.
Note: The single port acquisition mode is not recommended for new designs. It should
only be used with PCI bus digitizers that are not capable of making dual-port acquisitions:
ATS460 and ATS860 without dual-port memory upgrade, ATS310, ATS330, ATS850.
By default, AlazarTech digitizer boards share on-board memory equally between both of a
board’s input channels. A single-port acquisition in dual-channel mode captures samples
from both input channels simultaneously to on-board memory and, after the acquisition
is complete, allows samples from either input channel to be transferred from on-board
memory to an application buffer. To program a board acquire to on-board memory in dual-
channel mode:
1. Call AlazarSetRecordSize() to set the number of samples per record, where a record
may contain samples before and after its trigger event.
2. Call AlazarSetRecordCount() to set the number records per acquisition – the board cap-
tures one record per trigger event.
3. Call AlazarStartCapture() to arm the board to wait for trigger events.
4. Call AlazarBusy() in a loop to poll until the board has received all trigger events in the
acquisition, and has captured all records to on-board memory.
5. Call AlazarRead(), AlazarReadEx(), or AlazarHyperDisp() to transfer records from on-
board memory to host memory.
6. Repeat from step 3, if necessary.
The following code fragment acquires to on board memory with on-board memory shared
between both input channels:
// 4. Wait for the board to receive all trigger events and capture all
// records to on-board memory
Note: The single port acquisition mode is not recommended for new designs. It should
only be used with digitizers that are not capable of making dual-port acquisitions: ATS310,
ATS330 and ATS850.
ATS9325, ATS9350, ATS9351, ATS9440, ATS9625, ATS9626, ATS9850, and ATS9870 and digi-
tizer boards can be configured to dedicate all on-board memory to one of a board’s input
channels. A single-port acquisition in single-channel mode only captures samples from the
specified channel to on-board memory and, after the acquisition is complete, only allows
samples from the specified channel to be transferred from on-board memory to an appli-
cation buffer.
To program a board to acquire to on-board memory in single-channel mode:
1. Call AlazarSetRecordSize() to set the number of samples per record, where a record
may contain samples before and after its trigger event.
2. Call AlazarSetRecordCount() to set the number records per acquisition – the board cap-
tures one record per trigger event.
3. Call AlazarSetParameter() with the parameter SET_SINGLE_CHANNEL_MODE, and specify the
channel to use all memory.
4. Call AlazarStartCapture() to arm the board to wait for trigger events.
5. Call AlazarBusy() in a loop to poll until the board has received all trigger events in the
acquisition, and has captured all records to on-board memory.
Using AlazarRead
Use AlazarRead() to transfer samples from records acquired to on-board memory to a buffer
in host memory.
The following code fragment transfers a full CH A record from on-board memory to a buffer
in host memory:
AlazarRead() can transfer a segment of a record from on-board memory to a buffer in host
memory. This may be useful if:
• The number of bytes in a full record in on-board memory exceeds the buffer size in
bytes that an application can allocate in host memory.
• An application wishes to reduce the time required for data transfer when it acquires
relatively long records to on-board memory, but is only interested in a relatively small
part of the record.
Use the transferOffset parameter in the call to AlazarRead() to specify the offset, in samples
from the trigger position in the record, of the first sample to transfer from on-board memory
to the application buffer. And use the transferLength parameter to specify the number of
samples to transfer from on-board memory to the application buffer, where this number of
samples may be less than the number of samples per record. The following code fragment
divides a record into segments, and transfers the segments from on-board to host memory:
Using AlazarReadEx
AlazarRead() can transfer samples from records acquired to on-board memory that con-
tain up to 2,147,483,647 samples. If a record contains 2,147,483,648 or more samples, use
AlazarReadEx() rather than AlazarRead(). AlazarReadEx() uses signed 64-bit transfer off-
sets, while AlazarRead() uses signed 32-bit transfer offsets. Otherwise, AlazarReadEx() and
AlazarRead() are identical.
Using AlazarHyperDisp
HyperDisp technology enables the FPGA on an AlazarTech digitizer board to process sample
data. The FPGA divides a record in on-board memory into intervals, finds the minimum
and maximum sample values during each interval, and transfers an array of minimum
and maximum value pairs to host memory. This allows the acquisition of relatively long
records to on-board memory, but the transfer of relatively short processed records across
the PCI/PCIe bus to host memory.
For example, an ATS860-256M would require over 2 seconds per channel to transfer
256,000,000 samples across the PCI bus. However, with HyperDisp enabled the ATS860
would require a fraction of a second to calculate HyperDisp data, and transfer a few kilo-
bytes of processed data across the PCI bus. If an application was searching these records
for glitches, it may save a considerable amount of time by searching HyperDisp data for the
glitches and, if a glitch were found, transfer the raw sample data from the interval from
on-board memory to host memory.
Use AlazarHyperDisp() to enable a board to process records in on-board memory, and trans-
fer processed records to host memory. The following code fragment enables an ATS860-
256M to process a record in on-board memory containing 250,000,000 samples into an array
of 100 HyperDisp points, where each point contains the minimum and maximum sample
values over an interval of 2,500,000 samples in the record:
AlazarHyperDisp (
boardHandle, // HANDLE -- board handle
NULL, // void* -- reserved
samplesPerRecord, // U32 -- BufferSize
(U8*) buffer, // U8* -- ViewBuffer
bytesPerBuffer, // U32 -- ViewBufferSize
pointsPerRecord, // U32 -- NumOfPixels
(continues on next page)
Record mestamps
AlazarTech digitizer boards include a 40-bit counter clocked by the sample clock source
scaled by a board specific divider. When a board receives a trigger event to capture a record
to on-board memory, it latches and saves the value of this counter. The counter value gives
the time, relative to when the counter was reset, when the trigger event for the record
occurred.
By default, this counter is reset to zero at the start of each acquisition. Use AlazarReset-
TimeStamp() to control when the record timestamp counter is reset.
Use AlazarGetTriggerAddress() to retrieve the timestamp, in timestamp clock ticks, of a
record acquired to on-board memory. This function does not convert the timestamp value
to seconds. The following code fragment gets the record timestamp of a record acquired to
on-board memory, and converts the timestamp value from clocks ticks to seconds:
AlazarGetTriggerAddress (
boardHandle, // HANDLE -- board handle
record, // U32 -- record number (1-indexed)
&triggerAddress, // U32* -- trigger address
×tampHigh, // U32* -- timestamp high part
×tampLow // U32* -- timestamp low part
);
If the single-port API is used to acquire from master-slave board system, only the master
board in the board system should receive calls to the following API functions: AlazarStart-
Capture(), AlazarAbortCapture(), AlazarBusy(), AlazarTriggered() and AlazarForceTrigger().
See “%ATS_SDK_DIR%\Samples\SinglePort\AR_MasterSlave” for a sample program that
demonstrates how to acquire from a master-slave system.
The data acquisition APIs transfer an array of sample values into an application buffer.
Each sample value occupies 1 or 2 bytes in the buffer, where a sample code is stored in the
most significant bits of the sample values. Sample values that occupy two bytes are stored
with their least significant bytes at the lower byte addresses (little-endian byte order) in the
buffer. To convert sample values in the buffer to volts:
• Get a sample value from the buffer.
• Get the sample code from the most-significant bits of the sample value.
• Convert the sample code to volts.
Note that the arrangement of samples values in the buffer into records and channels de-
pends on the API used to acquire the data.
• Single-port acquisitions return a contiguous array of samples for a specified channel.
(See Single Port Acquisition above.)
• Dual-port AutoDMA acquisitions return sample data whose arrangement depends on
the AutoDMA mode and options chosen. (See section Dual port AutoDMA Acquisition
above.)
Also note that AlazarTech digitizer boards generate unsigned sample codes by default. (See
Data format above.)
The hexadecimal editor view below shows the first 128-bytes of data in a buffer from an
8-bit digitizer such as the ATS850, ATS860, ATS9850, and ATS9870.
00000 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F
00010 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F
00020 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F
00030 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F
00040 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F
00050 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F
00060 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F
00070 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F
Each 8-bit sample occupies 1-byte in the buffer, so the block above displays 128 samples
(128 bytes / 1 byte per sample). The following code fragment demonstrates how to access
each 8-bit sample value in a buffer:
Each 8-bit sample value stores an 8-bit sample code. For example, the first byte in buffer
above stores the sample code 0x7F, or 127 decimal.
A sample code of 128 (0x80) represents ~0V input voltage, 255 (0xFF) represents a positive
full-scale input voltage, and 0 represents a negative full-scale input voltage. The following
table illustrates how unsigned 8-bit sample codes map to values in volts according to the
full-scale input range of the input channel.
Hex value Frac on of input range Volts for ±100 mV range Volts for ±1 V range
0x00 -100% -100 mV -1 V
0x40 -50% -50 mV -.5 V
0x80 0% 0V 0V
0xC0 +50% 50 mV +.5 V
0xFF +100% +100 mV +1 V
The following code fragment shows how to convert a 1-byte sample value containing an
unsigned 8-bit code to in volts:
A signed code of 0 represents ~0V input voltage, 127 (0x7F) represents a positive full-scale
input voltage, and –128 (0x80) represents a negative full-scale input voltage. The following
table illustrates how signed 8-bit sample codes map to values in volts according to the full-
scale input range of the input channel.
Hex value Frac on of input range Volts for ±100 mV range Volts for ±1 V range
0x81 -100% -100 mV -1 V
0xC0 -50% -50 mV -.5 V
0x00 0% 0V 0V
0x40 +50% 50 mV +.5 V
0x7F +100% +100 mV +1 V
The following code fragment shows how to convert a 1-byte sample value containing a
signed 8-bit sample code to in volts:
The hexadecimal editor view below displays the first 128-bytes of data in a buffer from a
12-bit digitizer such as the ATS310, ATS330, ATS9325, ATS9350, ATS9351, ATS9352, ATS9353,
ATS9360, ATS9371, and ATS9373.
00000 E0 7F F0 7F 00 80 F0 7F F0 7F 10 80 E0 7F 00 80
00010 F0 7F 00 80 E0 7F E0 7F 00 80 E0 7F F0 7F F0 7F
00020 E0 7F F0 7F 00 80 F0 7F F0 7F 10 80 E0 7F 00 80
00030 F0 7F 00 80 E0 7F E0 7F 00 80 E0 7F F0 7F F0 7F
00040 E0 7F F0 7F 00 80 F0 7F F0 7F 10 80 E0 7F 00 80
00050 F0 7F 00 80 E0 7F E0 7F 00 80 E0 7F F0 7F F0 7F
00060 E0 7F F0 7F 00 80 F0 7F F0 7F 10 80 E0 7F 00 80
00070 F0 7F 00 80 E0 7F E0 7F 00 80 E0 7F F0 7F F0 7F
Each 12-bit sample value occupies a 2-bytes in the buffer, so the view above displays 64
sample values (128 bytes / 2 bytes per sample). The first 2 bytes in the buffer are 0xE0 and
0x7F. Two-byte sample values are stored in little-endian byte order in the buffer, so the first
sample value in the buffer is 0x7FE0. The following code fragment demonstrates how to
access each 16-bit sample value in a buffer:
A 12-bit sample code is stored in the most significant bits (MSB) of each 16-bit sample value,
so right-shift each 16-bit value by 4 (or divide by 16) to obtain the 12-bit sample code. In the
example above, the 16-bit sample value 0x7FE0 right-shifted by four results in the 12-bit
sample code 0x7FE, or 2046 decimal.
An unsigned code of 2048 (0x800) represents ~0V input voltage, 4095 (0xFFF) represents a
positive full-scale input voltage, and 0 represents a negative full-scale input voltage. The fol-
lowing table illustrates how unsigned 12-bit sample codes map to values in volts according
to the full-scale input range of the input channel.
Hex value Frac on of input range Volts for ±100 mV range Volts for ±1 V range
0x000 -100% -100 mV -1 V
0x400 -50% -50 mV -.5 V
0x800 0% 0V 0V
0xC00 +50% 50 mV +.5 V
0xFFF +100% +100 mV +1 V
The following code fragment demonstrates how to convert a 2-byte word containing an
unsigned 12-bit sample code to in volts:
A signed code of 0 represents ~0V input voltage, 2047 (0x7FF) represents a positive full-
scale input voltage, and -2048 (0x801) represents a negative full-scale input voltage. The
following table illustrates how signed 12-bit sample codes map to values in volts according
to the full-scale input range of the input channel.
Hex value Frac on of input range Volts for ±100 mV range Volts for ±1 V range
0x801 -100% -100 mV -1 V
0xC00 -50% -50 mV -.5 V
0x000 0% 0V 0V
0x400 +50% 50 mV +.5 V
0x7FF +100% +100 mV +1 V
The following code fragment shows how to convert a 2-byte sample word containing a
The hexadecimal editor view below displays the first 128-bytes of data in a buffer from a
14-bit digitizer such as the ATS460 and ATS9440.
00000 4C 7F EC 7f 3c 80 98 80 D0 80 24 81 7C 81 B4 81
00010 3C 82 B4 82 A8 82 60 83 9C 83 14 84 40 84 88 84
00020 E0 84 50 85 D0 85 FC 85 2C 86 B0 86 10 87 56 87
00030 4C 7F EC 7f 3c 80 98 80 D0 80 24 81 7C 81 B4 81
00040 3C 82 B4 82 A8 82 60 83 9C 83 14 84 40 84 88 84
00050 E0 84 50 85 D0 85 FC 85 2C 86 B0 86 10 87 56 87
00060 4C 7F EC 7f 3c 80 98 80 D0 80 24 81 7C 81 B4 81
00070 E0 84 50 85 D0 85 FC 85 2C 86 B0 86 10 87 56 87
Each sample value occupies a 2-bytes in the buffer, so the figure displays 64 sample values
(128 bytes / 2 bytes per sample). The first 2 bytes in the buffer, shown highlighted, are 0x4C
and 0x7F. Two-byte sample values are stored in little-endian byte order in the buffer, so the
first sample value in the buffer is 0x7F4C. The following code fragment demonstrates how
to access each 16-bit sample value in a buffer:
A 14-bit sample code is stored in the most significant bits of each 16-bit sample value in
the buffer, so right-shift each 16-bit value by 2 (or divide by 4) to obtain the 14-bit sample
code. In the example above, the 16-bit value 0x7F4C right-shifted by two results in the 14-bit
sample code 0x1FD3, or 8147 decimal.
An unsigned code of 8192 (0x2000) represents ~0V input voltage, 16383 (0x3FFF) represents
a positive full-scale input voltage, and 0 represents a negative full-scale input voltage. The
following table illustrates how unsigned 14-bit sample codes map to values in volts accord-
ing to the full-scale input range of an input channel.
Hex value Frac on of input range Volts for ±100 mV range Volts for ±1 V range
0x0000 -100% -100 mV -1 V
0x1000 -50% -50 mV -.5 V
0x2000 0% 0V 0V
0x3000 +50% 50 mV +.5 V
0x3FFF +100% +100 mV +1 V
The following code fragment demonstrates how to convert a 2-byte sample value containing
an unsigned 14-bit sample code to in volts:
A signed code of 0 represents ~0V input voltage, 8191 (0x1FFF) represents a positive full-
scale input voltage, and –8192 (0x2000) represents a negative full-scale input voltage. The
following table illustrates how signed 14-bit sample codes map to values in volts depending
on the full-scale input range of the input channel.
Hex value Frac on of input range Volts for ±100 mV range Volts for ±1 V range
0x2001 -100% -100 mV -1 V
0x3000 -50% -50 mV -.5 V
0x0000 0% 0V 0V
0x1000 +50% 50 mV +.5 V
0x1FFF +100% +100 mV +1 V
The following code fragment demonstrates how to convert a 2-byte sample value containing
a signed 14-bit sample code to in volts:
The hexadecimal editor view below displays the first 128-bytes of data in a buffer from a
16-bit digitizer such as the ATS660, ATS9462, ATS9625, or ATS9626.
00000 14 80 FB 7F FB 7F 08 80 FB 7F 00 80 02 80 ED 7F
00010 0B 80 FF 7F F8 7F 0B 80 09 80 0E 80 F3 7F FE 7F
00020 14 80 FB 7F FB 7F 08 80 FB 7F 00 80 02 80 ED 7F
00030 0B 80 FF 7F F8 7F 0B 80 09 80 0E 80 F3 7F FE 7F
00040 14 80 FB 7F FB 7F 08 80 FB 7F 00 80 02 80 ED 7F
00050 0B 80 FF 7F F8 7F 0B 80 09 80 0E 80 F3 7F FE 7F
00060 14 80 FB 7F FB 7F 08 80 FB 7F 00 80 02 80 ED 7F
00070 14 80 FB 7F FB 7F 08 80 FB 7F 00 80 02 80 ED 7F
Each 16-bit sample value occupies 2 bytes in the buffer, so the figure displays 64 sample
values (128 bytes / 2 bytes per sample). The first 2 bytes in the buffer are 0x14 and 0x80.
Two-byte samples values are stored in little-endian byte order in the buffer, so the first
sample value is 0x8014. The following code fragment demonstrates how to access each
16-bit sample value in a buffer:
A 16-bit sample code is stored in each 16-bit sample value in the buffer. In the example
above, the first sample code is 0x8014, or 32788 decimal.
An unsigned code of 32768 (0x8000) represents ~0V input voltage, 65535 (0xFFFF) repre-
sents a positive full-scale input voltage, and 0 represents a negative full-scale input voltage.
The following table illustrates how unsigned 16-bit sample codes map to values in volts
according to the full-scale input range of an input channel.
Hex value Frac on of input range Volts for ±100 mV range Volts for ±1 V range
0x0000 -100% -100 mV -1 V
0x4000 -50% -50 mV -.5 V
0x8000 0% 0V 0V
0xC000 +50% 50 mV +.5 V
0xFFFF +100% +100 mV +1 V
The following code fragment demonstrates how to convert a 2-byte sample value containing
an unsigned 16-bit sample code to in volts:
A signed code of 32767 (0x7FFF) represents a positive full-scale input voltage, 0 represents
~0V input voltage, and –32768 (0x8000) represents a negative full-scale input voltage. The
following table illustrates how signed 16-bit sample codes map to values in volts according
to the full-scale input range of the input channel:
Hex value Frac on of input range Volts for ±100 mV range Volts for ±1 V range
0x8001 -100% -100 mV -1 V
0xC000 -50% -50 mV -.5 V
0x0000 0% 0V 0V
0x4000 +50% 50 mV +.5 V
0x7FFF +100% +100 mV +1 V
The following code fragment demonstrates how to convert a 2-byte sample word containing
a signed 16-bit sample code to in volts:
If an application saves sample data to a binary data file for later processing, it may be pos-
sible to improve disk write speeds by considering the following recommendations.
If the application is written in C/C++ and is running under Windows, use the Win-
dows CreateFile API with the FILE_FLAG_NO_BUFFERING flag for file I/O, if possible. Se-
quential disk write speeds are often substantially higher when this option is selected.
See “%ATS_SDK_DIR%\Samples\DualPort\TS_DisableFileCache” for a sample program that
demonstrates how to use this API to stream data to disk.
// Create a binary data file, and enable the API save each
// AutoDMA buffer to this file.
AlazarCreateStreamFile(handle, "data.bin");
FOUR
This document presents the AlazarDSP API that allows accessing the on-board digital signal
processing (DSP) features provided with some AlazarTech digitizers. Knowledge of the ATS-
SDK API is required to take full advantage of the information presented here.
4.1 Introduc on
The first DSP module to make it into AlazarDSP is a Fast Fourier Transform (FFT) block im-
plemented in ATS9350, ATS9351, ATS9352, ATS9353, ATS9360, ATS9370, ATS9371 and ATS9373. This
is a very versatile module that allows its users to compute the Fourier Transform of the in-
put signal acquired on channel A, and to retrieve the processed data in a variety of output
formats. The acquired records can be padded then mutiplied with a complex window func-
tion before going in the FFT processing block. The resulting data can optionaly be scaled to
get its logarithm. The nature of the output data can be chosen (amplitude, real, imaginary),
and it is then possible to set the output format from a variety of combinations (floating
point, 32-bit unsigned integer, etc.). Lastly, it is possible to get at the output either FFT data,
raw (time domain) data or both. The following diagram is a high-level overview of the FFT
processing module.
71
ATS-SDK Documenta on, Release 7.5.0
All the functions from the AlazarDSP module are defined in AlazarDSP.h, and are imple-
mented in the usual ATSApi library (ATSApi.dll under Windows, and libATSApi.so under
Linux).
Function are prefixed either with AlazarDSP if they apply to any DSP block, or by AlazarFFT
if they are specific to fast Fourier transform modules.
The AlazarDSP API introduces a new type called dsp_module_handle, which represents a DSP
module within a digitizer. Depending on their scope, function calls either require a board
or a DSP module handle to be passed.
Note: The AlazarDSP functions must be used in the context of AutoDMA NPT applications.
This section details all the steps that are required to take a working AutoDMA NPT program
and turn it into a FFT program. These code samples can be found in AlazarTech’s ATS-SDK
Function calls to the AlazarTech API are usually split into two categories: board configura-
tion and data acquisition. This is best seen in the code samples provided with the ATS-SDK,
where this separation is shown by sub-routines. Most of the AlazarDSP function calls fall
into the second category. This means that the board configuration routine of the existing
code samples is left mostly untouched.
Programs that use the AlazarDSP API need to get the handle of the DSP module they want
to use. This is done by calling AlazarDSPGetModules(). Information about the DSP module
can be retrieved at any time using AlazarDSPGetInfo().
The board configuration section is left untouched when compared to a standard AutoDMA
NPT acquisition.
In the data acquisition section, the following changes must be made:
1. AlazarSetRecordSize() is not called. This function is called internally by AlazarFFT-
Setup().
2. AlazarFFTSetup() is called before AlazarBeforeAsyncRead() and before allocating the
DMA buffers. This is due to the fact that the number of bytes of data returned by
the FFT engine may vary from one mode to the next, e.g. U16 log of amplitude output,
U32 real part, etc. AlazarFFTSetup() returns the effective number of bytes per record
that need to be allocated and passed to AlazarBeforeAsyncRead()
3. AlazarBeforeAsyncRead() is called by passing:
a. The number of bytes per record to the fourth parameter (SamplesPerRecord)
b. 0x7FFFFFFF to RecordsPerAcquisition
4. AlazarWaitAsyncBufferComplete() is replaced with AlazarDSPGetBuffer().
Features offered by DSP processing modules can vary from one board to another. An ex-
ample of such variation is the maximum record size, which is generally lower on ATS9350
than on other board models. In order to query these information at runtime, AlazarDSP
offers the AlazarDSPGetInfo() function. A generic interface to retrieve parameters has also
been added with AlazarDSPGetParameterU32(). Each call to this function allows to retrieve
one attribute of a DSP module. Available attributes to query are listed in DSP_PARAMETERS.
In addition, FFT module have specific parameters that are not indicated by AlazarDSPGet-
Info(). For these modules, another introspection method is AlazarFFTGetMaxTriggerRe-
peatRate(). The maximum FFT input length can be read from the maxLength output param-
eter of AlazarDSPGetInfo().
The output data format of the FFT module is determined by the outputFor-
mat parameter to AlazarFFTSetup(). This parameter can be any element of the
FFT_OUTPUT_FORMAT enumeration except FFT_OUTPUT_FORMAT_RAW_PLUS_FFT, optionnaly OR’ed
with FFT_OUTPUT_FORMAT_RAW_PLUS_FFT. The meaning of each element is described in
FFT_OUTPUT_FORMAT.
If the RAW + FFT mode is selected, a number of samples that correspond to the FFT length
is prepended to each record during the output. These samples contain the acquired time-
domain data in U16 format, followed with padding to bring the number of samples to the
FFT input length.
On the board, the Fourier Transform output is a 53-bit unsigned integer that gets converted
in various blocks to match the requested output format. Along the conversion, it is possible
to set a scaling a slicing parameter. These values are set to sane default in AlazarFFTSetup().
It is possible however for users to change these values manually, using the AlazarFFT-
SetScalingAndSlicing() function. The block diagram below shows where the conversions
happen.
Starting with version 4.6, the on-FPGA FFT module offers a background subtraction feature.
A record to subtract is downloaded on the board with AlazarFFTBackgroundSubtractionSe-
tRecordS16(), and the feature is activated by AlazarFFTBackgroundSubtractionSetEnabled().
Once background subtraction is enabled, the background is subtracted to all acquired time-
domain records before they are sent in the FFT processing module.
It is not necessary to re-download the background record in between multiple acquisitions
in the same program. The dowloaded record remains on the board. On the other hand, the
default background record should not be assumed to be made of zeros. As the values can
remain in the board, even after a reboot of the computer.
For 12-bit digitizers, the record is downloaded at 16 bits per sample, but only the 12 most
significant bits are actually used. The 4 least significant bits are discarded. This behaviour
is consistent with the way the boards acquire and send data back to user applications.
FIVE
ADVANCED TOPICS
The external clocking feature of AlazarTech boards is commonly used in Optical Coherence
Tomography (OCT) applications, where swept laser sources generate a signal to be used for
clocking the acquisition. However, in some cases the external clock signal does not meet
the requirements of the digitizers, which can lead to various issues. This section discusses
the steps that need to be taken to diagnose and troubleshoot external clock problems.
External clock issues can be of two natures; trigger jumps, or unexpected (glitchy) ac-
quired data. These issues can also arise as the result of a board misconfiguration (bad
record length, bad trigger configuration…). Before proceeding with the external clock trou-
bleshooting, you must ensure that the external clock is indeed the cause of your problems.
One way to do that is to make sure that your acquisition works fine when using the internal
clock. Another way is to reproduce your acquisition configuration in AlazarDSO, and make
sure that the problem also shows up there. Once having made sure that the external clock
is the issue, the next step is to identify the problematic regions of the signal. To do this,
please acquire a few record acquisition cycles (laser sweeps) with a high speed oscilloscope
(ideally 20GS/s, 4GHz), and to send the results to us.
75
ATS-SDK Documenta on, Release 7.5.0
Here is an example of an external clock analysis plot, annotated to show the problem:
Some AlazarTech digitizers support a feature called OCT Ignore Bad Clock, which can be
used to make the board ignore the external clock signal for a given period of time. This
can be used if the external clock signal is bad when the board is not acquiring data. Note
that the external clock signal must be good when trigger events are received, and when the
board needs to acquire data.
In order to activate OCT Ignore Bad Clock, customers must first measure how long the ex-
ternal clock signal is good1 after the trigger event, and how long it is bad. For example, the
data of the Example of external clock analysis figure shows that the clock signal stays good
1
The external clock signal is considered good when it meets the digitizer’s specified limits in terms of am-
plitude and frequency. The limits can be found on the digitizer’s datasheet.
SIX
API REFERENCE
79
ATS-SDK Documenta on, Release 7.5.0
• AlazarCreateStreamFileW()
• AlazarFreeBufferU16()
• AlazarFreeBufferU16Ex()
• AlazarFreeBufferU8()
• AlazarFreeBufferU8Ex()
• AlazarPostAsyncBuffer()
• AlazarWaitAsyncBufferComplete()
• AlazarWaitNextAsyncBufferComplete()
Single-port acquisition functions:
• AlazarAbortCapture()
• AlazarBusy()
• AlazarConfigureRecordAverage()
• AlazarGetStatus()
• AlazarGetTriggerAddress()
• AlazarGetTriggerTimestamp()
• AlazarGetWhoTriggeredBySystemHandle()
• AlazarGetWhoTriggeredBySystemID()
• AlazarHyperDisp()
• AlazarRead()
• AlazarReadEx()
• AlazarSetRecordCount()
• AlazarTriggered()
DSP functions:
• AlazarDSPAbortCapture()
• AlazarDSPGenerateWindowFunction()
• AlazarDSPGetBuffer()
• AlazarDSPGetInfo()
• AlazarDSPGetModules()
• AlazarDSPGetNextBuffer()
• AlazarDSPGetParameterFloat()
• AlazarDSPGetParameterS32()
• AlazarDSPGetParameterU32()
• AlazarDSPSetParameterFloat()
• AlazarDSPSetParameterS32()
• AlazarDSPSetParameterU32()
on-FPGA FFT functions:
• AlazarFFTBackgroundSubtractionGetRecordS16()
• AlazarFFTBackgroundSubtractionSetEnabled()
• AlazarFFTBackgroundSubtractionSetRecordS16()
• AlazarFFTGetMaxTriggerRepeatRate()
• AlazarFFTSetScalingAndSlicing()
• AlazarFFTSetup()
• AlazarFFTSetWindowFunction()
Miscellaneous functions:
• AlazarBoardsFound()
• AlazarBoardsInSystemByHandle()
• AlazarBoardsInSystemBySystemID()
• AlazarCoprocessorDownloadA()
• AlazarCoprocessorDownloadW()
• AlazarCoprocessorRegisterRead()
• AlazarCoprocessorRegisterWrite()
• AlazarErrorToText()
• AlazarExtractFFTNPTFooters()
• AlazarExtractTimeDomainNPTFooters()
• AlazarForceTrigger()
• AlazarForceTriggerEnable()
• AlazarGetBoardBySystemHandle()
• AlazarGetBoardBySystemID()
• AlazarGetBoardKind()
• AlazarGetBoardRevision()
• AlazarGetCPLDVersion()
• AlazarGetChannelInfo()
• AlazarGetChannelInfoEx()
• AlazarGetDriverVersion()
• AlazarGetFPGAVersion()
• AlazarGetMaxRecordsCapable()
• AlazarGetParameter()
• AlazarGetParameterLL()
• AlazarGetParameterUL()
• AlazarGetSDKVersion()
• AlazarGetSystemHandle()
• AlazarNumOfSystems()
• AlazarQueryCapability()
• AlazarQueryCapabilityLL()
• AlazarSetLED()
Deprecated functions:
• AlazarOpen
• AlazarClose
• AlazarExtractNPTFooters
6.1 AlazarAbortAsyncRead
Remark If you have started an acquisition and/or posted DMA buffers to a board,
you must call AlazarAbortAsyncRead() before your application exits. If you do
not, when your program exists, Microsoft Windows may stop with a blue screen
error number 0x000000CB (DRIVER_LEFT_LOCKED_PAGES_IN_PROCESS). Linux may leak
the memory used by the DMA buffers.
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Note This function is part of the dual-port API. It should be used only in this context.
To abort single-port acquisitions using, see AlazarAbortCapture().
Parameters
• [in] handle: Handle to board
6.2 AlazarAbortCapture
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Note This function is part of the single-port API. It should be used only in this context.
To abort dual-port acquisitions, see AlazarAbortAsyncRead().
Parameters
• [in] handle: Board handle
6.3 AlazarAllocBufferU16
6.4 AlazarAllocBufferU16Ex
6.5 AlazarAllocBufferU8
6.6 AlazarAllocBufferU8Ex
6.7 AlazarAsyncRead
Return If the function succeeds in adding the buffer to end of the list of buffers avail-
able to be filled by the board, it returns ApiDmaPending. When the board fills the
buffer, the event in the OVERLAPPED structure is set to the signaled state.
Return If the function fails because the board overflowed its on board memory, it re-
turns ApiBufferOverflow. The board may overflow its on board memory because
the rate at which it is acquiring data is faster than the rate at which it is transfer-
ring data from on-board memory to host memory. If this is the case, try reducing
the sample rate, number of enabled channels, or amount of time spent processing
each buffer.
Return If the function fails because the buffer is too large for the driver or operat-
ing system to prepare for scatter-gather DMA transfer, it returns ApiLockAnd-
ProbePagesFailed. Try reducing the size of each buffer, or reducing the number
of buffers queued by the application.
Return If the function fails for some other reason, it returns an error code that indi-
cates the reason that it failed. See RETURN_CODE for more information.
Remark AlazarAsyncRead() is only available under Windows
Warning You must call AlazarAbortAsyncRead() before your application exits if you
have called AlazarAsyncRead() and buffers are pending.
Parameters
• [in] handle: Handle to board
• [in] buffer: Pointer to a buffer to receive sample data from the digitizer
board
• [in] bytesToRead: Number of bytes to read from the board
• [in] overlapped: Pointer to an OVERLAPPED structure. The event in thestructure
is set to the signaled state when the read operation completes.
6.8 AlazarBeforeAsyncRead
For best performance, AutoDMA parameters should be selected so that the total num-
ber of bytes per buffer is greater than about 1 MB. This allows for relatively long DMA
transfer times compared to the time required to prepare a buffer for DMA transfer
and re-arm the DMA engines.
ATS460, ATS660 and ATS860 digitizer boards require that AutoDMA parameters be
selected so that the total number of bytes per buffer is less than 4 MB. Other boards
require that the total number of bytes per buffer be less than 64 MB. It is however
recommended to keep the DMA buffer size below 16 MB for all boards.
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Remark transferLength must meet certain alignment criteria which depend on the
board model and the acquisition type. Please refer to board-specific documenta-
tion for more information.
Remark recordsPerBuffer must be set to 1 in continuous streaming and triggered
streaming AutoDMA modes.
Remark recordsPerAcquisition must be 0x7FFFFFFF in Continuous Streaming and Trig-
gered Streaming modes. The acquisition runs continuously until AlazarAbortA-
syncRead() is called. In other modes, it must be either:
• A multiple of recordsPerBuffer
• 0x7FFFFFFF to indicate that the acquisition should continue indefinitely.
Parameters
• [in] handle: Handle to board
• [in] channelSelect: Select the channel(s) to control. This can be one or more
of the channels of ALAZAR_CHANNELS, assembled with the OR bitwise oper-
ator.
• [in] transferOffset: Specify the first sample from each on-board record to
transfer from on-board to host memory. This value is a sample relative to the
trigger position in an on-board record.
• [in] transferLength: Specify the number of samples from each record to
transfer from on-board to host memory. In DSP-mode, it takes the number
of bytes instead of samples. See remarks.
• [in] recordsPerBuffer: The number of records in each buffer. See remarks.
• [in] recordsPerAcquisition: The number of records to acquire during one
acquisition. Set this value to 0x7FFFFFFF to acquire indefinitely until the ac-
quisition is aborted. This parameter is ignored in Triggered Streaming and
Continuous Streaming modes. See remarks.
• [in] flags: Specifies AutoDMA mode and option. Must be one ele-
ment of ALAZAR_ADMA_MODES combined with zero or more element(s) of
ALAZAR_ADMA_FLAGS using the bitwise OR operator.
enum ALAZAR_ADMA_MODES
AutoDMA acquisition modes. See AlazarBeforeAsyncRead().
Values:
ADMA_TRADITIONAL_MODE = 0x00000000
Acquire multiple records: one per trigger event. Each record may include pre-and
post-trigger samples, and a record header that includes its trigger timestamp. If
a board has on-board memory and sample interleave is not enabled, each buffer
will contain samples organized as follows: R1A, R1B, R2A, R2B ...
If a board does not have on-board memory, or sample interleave is enabled, the
buffer will contain samples organized as follows: R1[AB...], R2[AB...] ...
ADMA_CONTINUOUS_MODE = 0x00000100
Acquire a single, gapless record spanning multiple buffers. Do not wait for trigger
event before starting the acquisition.
If a board has on-board memory and sample interleave is not enabled, each buffer
will contain samples organized as follows: R1A, R1B.
If a board does not have on-board memory, or sample interleave is enabled, the
buffer will contain samples organized as follows: R1[AB...]
ADMA_NPT = 0x00000200
Acquire multiple records: one per trigger event. Each record contains only post-
trigger samples.
If a board has on-board memory and sample interleave is not enabled, each buffer
will contain samples organized as follows: R1A, R2A, ... R1B, R2B ...
If a board does not have on-board memory, or sample interleave is enabled, the
buffer will contain samples organized as follows: R1[AB...], R2[AB...] ...
ADMA_TRIGGERED_STREAMING = 0x00000400
Acquire a single, gapless record spanning multiple buffers. Wait for a trigger
event before starting the acquisition.
If a board has on-board memory and sample interleave is not enabled, each buffer
will contain samples organized as follows: R1A, R1B.
If a board does not have on-board memory, or sample interleave is enabled, the
buffer will contain samples organized as follows: R1[AB...]
enum ALAZAR_ADMA_FLAGS
AutoDMA acquisition options. See AlazarBeforeAsyncRead().
Values:
ADMA_EXTERNAL_STARTCAPTURE = 0x00000001
The acquisition only starts when AlazarStartCapture() is called if this flag is set.
Otherwise, it starts before the current function returns.
ADMA_ENABLE_RECORD_HEADERS = 0x00000008
If this flag is set, precede each record in each buffer with a 16-byte header that
includes the record’s trigger timestamp.
Note that this flag can only be used in “traditional” AutoDMA mode. Record head-
ers are not available in NPT, streaming, or triggered streaming modes.
ADMA_ALLOC_BUFFERS = 0x00000020
If this flag is set, the API will allocate and manage a list of DMA buffers. This flag
may be used by LabVIEW, and in other high-level development environments,
where it may be more convenient for the application to let the API manage a list
of DMA buffers, and to receive a copy of data in an application buffer. When this
flag is set, the application must call AlazarWaitNextAsyncBufferComplete() to wait
for a buffer to complete and receive a copy of the data. The application can spec-
ify the number of DMA buffers for the API to allocate by calling AlazarSetParame-
ter with the parameter SETGET_ASYNC_BUFFCOUNT before calling AlazarBefore-
AsyncRead.
ADMA_FIFO_ONLY_STREAMING = 0x00000800
Enable the board to data from its on-FPGA FIFO rather than from on-board mem-
ory. When the flag is set, each buffer contains data organized as follows: R0[ABAB.
..], R1[ABAB...], R2[ABAB] .... That is, each sample from CH A is followed by a
sample from CH B.
When this flag is not set, each record in a buffer contains a contiguous array of
samples for CH A followed by a contiguous array of samples for CH B, where the
record arrangement depends on the acquisition mode. Note that this flag must
be set if your board does not have on-board memory. For example, an ATS9462-
FIFO requires this flag. Also note that this flag must not be set if your board has
on-board memory.
ADMA_INTERLEAVE_SAMPLES = 0x00001000
Enable a board to interleave samples from both digitizer channels in dual-
channel acquisition mode. This results in higher data transfer rates on boards
Public Members
Public Members
Public Members
Public Members
Public Members
6.9 AlazarBoardsFound
U32 AlazarBoardsFound(void)
Determine the number of digitizer boards that were detected in all board systems.
6.10 AlazarBoardsInSystemByHandle
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
6.11 AlazarBoardsInSystemBySystemID
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] systemId: The system identification number
6.12 AlazarBusy
Return If the board is busy acquiring data to on-board memory, this function returns
1. Otherwise, it returns 0.
Note This function is part of the single-port data acquisition API. It cannot be used
with the dual-port AutoDMA APIs.
Parameters
• [in] handle: Board handle
6.13 AlazarConfigureAuxIO
Remark The ATS9440 has two AUX I/O connectors: AUX 1 and AUX 2. AUX 1 is config-
ured by firmware as a trigger output signal, while AUX 2 is configured by software
using AlazarConfigureAuxIO(). A firmware update is required to change the op-
eration of AUX 1.
Remark ATS9625 and ATS9626 have two AUX I/O connectors; AUX 1 and AUX 2. AUX
1 is configured by software using AlazarConfigureAuxIO(), while AUX 2 is config-
ured by default as a trigger output signal. A custom user-programmable FGPA
can control the operation of AUX 2 as required by the FPGA designer.
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Handle to board
• [in] mode: The AUX I/O mode. Can be selected from ALAZAR_AUX_IO_MODES.
If an output mode is selected, the parameter may be OR’ed with
AUX_OUT_TRIGGER_ENABLE to enable the board to use software trigger
enable. When this flag is set, the board will wait for software to call
AlazarForceTriggerEnable() to generate a trigger enable event; then wait for
sufficient trigger events to capture the records in an AutoDMA buffer; then
wait for the next trigger enable event and repeat.
• [in] parameter: The meaning of this value varies depending on mode. See
ALAZAR_AUX_IO_MODES for more details.
enum ALAZAR_AUX_IO_MODES
Alazar AUX I/O identifiers.
Values:
AUX_OUT_TRIGGER = 0U
Outputs a signal that is high whenever data is being acquired to on-board mem-
ory, and low otherwise. The parameter argument of AlazarConfigureAuxIO() is
ignored in this mode.
AUX_IN_TRIGGER_ENABLE = 1U
Uses the edge of a pulse to the AUX I/O connector as an AutoDMA trigger enable
signal. Please note that this is different from a standard trigger signal. In this
mode, the parameter argument of AlazarConfigureAuxIO() can takes an element
of ALAZAR_TRIGGER_SLOPES, which defines on which edge of the input signal a
trigger enable event is generated.
AUX_OUT_PACER = 2U
Output the sample clock divided by the value passed to the parameter argument
of AlazarConfigureAuxIO(). Please note that the divider must be greater than 2.
AUX_OUT_SERIAL_DATA = 14U
Use the AUX I/O connector as a general purpose digital output. The paramter argu-
ment of AlazarConfigureAuxIO() specifies the TTL output level. 0 means TTL low
level, whereas 1 means TTL high level.
AUX_IN_AUXILIARY = 13U
Configure the AUX connector as a digital input. Call AlazarGetParameter() with
GET_AUX_INPUT_LEVEL to read the digital input level.
6.14 AlazarConfigureLSB
bits of each sample value are zero-filled. Use this option to use these otherwise unused
bits as digital outputs.
This feature is not available on all boards. See board-specific documentation for more
information.
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Handle to board
• [in] valueLsb0: Specifies the signal to output to the least significant bit of each
sample value. Must be one of ALAZAR_LSB.
• [in] valueLsb1: Specifies the signal to output to the least significant bit of each
sample value. Must be one of ALAZAR_LSB.
enum ALAZAR_LSB
Least significant bit identifiers.
Values:
LSB_DEFAULT = 0
Default LSB setting.
LSB_EXT_TRIG = 1
Use external trigger state as LSB.
LSB_AUX_IN_2 = 2
Use AUX I/O 2 state as LSB.
LSB_AUX_IN_1 = 3
Use AUX I/O 1 state as LSB.
6.15 AlazarConfigureRecordAverage
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Remark FPGA record averaging is currently supported on the following digitizers:
• ATS9870 with FPGA version 180.0 and above, and driver version 5.9.8 and
above
• AXI9870 with FPGA version 180.0 and above, and driver version 5.9.23 and
above
Note This function is part of the dual-port API. It should be used only in this context.
To abort single-port acquisitions using, see AlazarAbortCapture().
Parameters
• [in] handle: Handle to board
• [in] mode: Averaging mode. Should be one element of ALAZAR_CRA_MODES.
• [in] samplesPerRecord: The number of ADC samples per accumulator record.
• [in] recordsPerAverage: The number of records to accumulate per average.
• [in] options: The averaging options. Can be one of ALAZAR_CRA_OPTIONS.
enum ALAZAR_CRA_MODES
AlazarConfigureRecordAverage() modes.
Values:
CRA_MODE_DISABLE = 0
Disables record average.
CRA_MODE_ENABLE_FPGA_AVE = 1
Enables record average.
enum ALAZAR_CRA_OPTIONS
AlazarConfigureRecordAverage() options.
Values:
CRA_OPTION_UNSIGNED = (0U << 1)
Unsigned data.
CRA_OPTION_SIGNED = (1U << 1)
Signed data.
6.16 AlazarConfigureSampleSkipping
• 1’s in the bitmap specify the clock edges that should generate a sample point. The
total number of 1’s in the bitmap must be equal to the number of post-trigger
samples per record specified in the call to AlazarSetRecordSize().
• 0’s in the bitmap specify the clock edges that should not be used to generate a
sample point.
• The total total number of bits in the bitmap is equal to the number of sample
clocks in one record.
For example, to receive 16 samples from 32 sample clocks where every other sample
clock is ignored, create a bitmap of 32 bits with values { 1 0 1 0 1 0 ... 1 0 }, or {
0x5555, 0x5555 }. Note that 16 of the 32 bits are 1’s.
And to receive 24 samples from 96 sample clocks where data from every 3 of 4 samples
clocks is ignored, create a bitmap of 96 bits with values { 1 0 0 0 1 0 0 0 1 0 0 0 ...
1 0 0 0 }, or in { 0x1111, 0x1111, 0x1111, 0x1111, 0x1111, 0x1111 }. Note that 24 of
the 96 bits are 1’s.
After creating a bitmap, call AlazarConfigureSampleSkipping() with:
• Mode equal to SSM_ENABLE
• SampleClocksPerRecord equal to the total number of sample clocks per record.
• pSampleSkipBitmap with the address of the U16 array.
To disable data skipping, call AlazarConfigureSampleSkipping with Mode equal to
SSM_DISABLE. The SampleClocksPerRecord and pSampleSkipBitmap parameters are
ignored.
Note that data skipping currently is supported by the ATS9371, ATS9373, ATS9360 and
ATS9440. For ATS9440, data skipping only works with post-trigger data acquired at
125 MSPS or 100 MSPS.
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Handle to board
• [in] mode: The data skipping mode. 0 means disable sample skipping and 1
means enable sample skipping.
• [in] sampleClocksPerRecord: The number of sample clocks per record. This
value cannot exceed 65536.
• [in] sampleSkipBitmap: An array of bits that specify which sample clock edges
should be used to capture a sample point (value = 1) and which should be
ignored (value = 0).
enum ALAZAR_SAMPLE_SKIPPING_MODES
Data skipping modes. See AlazarConfigureSampleSkipping()
Values:
SSM_DISABLE = 0
Disable sample skipping.
SSM_ENABLE = 1
Enable sample skipping.
6.17 AlazarCoprocessorDownload
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Handle to board
• [in] fileName: Path to RBF file
• [in] options: Download options chosen from
ALAZAR_COPROCESSOR_DOWNLOAD_OPTIONS
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Handle to board
• [in] fileName: Path to RBF file
• [in] options: Download options chosen from
ALAZAR_COPROCESSOR_DOWNLOAD_OPTIONS
enum ALAZAR_COPROCESSOR_DOWNLOAD_OPTIONS
Coprocessor download options.
Values:
CPF_OPTION_DMA_DOWNLOAD = 1
6.18 AlazarCoprocessorRegisterRead
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Handle to board
• [in] offset: Register offset
• [out] value: Address of a variable to receive the register’s value
6.19 AlazarCoprocessorRegisterWrite
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Handle to board
• [in] offset: Register offset
• [in] value: Value to write
6.20 AlazarCreateStreamFile
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Handle to board
• [in] filePath: Pointer to a NULL-terminated string that specifies the name of
the file.
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Handle to board
• [in] filePath: Pointer to a NULL-terminated string that specifies the name of
the file.
6.21 AlazarDSPAbortCapture
6.22 AlazarDSPGenerateWindowFunc on
Please note that the windows length can take any integer value. It does not need to
meet the alignment requirements that apply to the record length, nor the power-of-
two requirement of the FFT length. This can allow users a very high level of control
over the effective acquired record length.
For example, if a laser source guarantees 1396 good data points at a particular fre-
quency, the number of samples per record on ATS9360 should be set to 1408 (the next
multiple of 128) and the FFT length should be 2048 points. The window function will
be generated with a windowLength_samples of 1396, and a paddingLength_samples of 652
(2048 - 1396).
Remark Using Python, the window array is not allocated first then passed as an out-
put parameter. Instead, it is directly returned from the function as a newly allo-
cated NumPy array.
Return ApiSuccess upon sucess.
Parameters
• windowType: Type of window to generate. Pass an item from
DSP_WINDOW_ITEMS enum.
• window: Array to be filled with the window function. It must be at least win-
dowLength_samples + paddingLength_samples long.
• windowLength_samples: The size of the window to generate.
• paddingLength_samples: The number of samples after the window function to
pad with zeros.
enum DSP_WINDOW_ITEMS
Various types of window functions.
Used by AlazarDSPGenerateWindowFunction().
Values:
DSP_WINDOW_NONE = 0
DSP_WINDOW_HANNING
DSP_WINDOW_HAMMING
DSP_WINDOW_BLACKMAN
DSP_WINDOW_BLACKMAN_HARRIS
DSP_WINDOW_BARTLETT
6.23 AlazarDSPGetBuffer
Parameters
• boardHandle: Board that filled the buffer we want to retrieve
• buffer: Pointer to the DMA buffer we want to retrieve. This must correspond
to the first DMA buffer posted to the board that has not yet been retrieved.
• timeout_ms: Time to wait for the buffer to be ready before returning with an
ApiWaitTimeout error.
6.24 AlazarDSPGetInfo
enum DSP_MODULE_TYPE
DSP module type.
Used by AlazarDSPGetInfo().
Values:
DSP_MODULE_NONE = 0xFFFF
DSP_MODULE_FFT
FFT multisample.
DSP_MODULE_PCD
PC Decoder Averager.
DSP_MODULE_SSK
Sample SKipper.
DSP_MODULE_DIS
DeInterlacer re-Scaling.
6.25 AlazarDSPGetModules
// Error handling
// Error handling
6.26 AlazarDSPGetNextBuffer
Parameters
• boardHandle: Board that filled the buffer we want to retrieve
• buffer: Pointer to a buffer to receive sample data from the digitizer board.
• bytesToCopy: The number of bytes to copy into the buffer.
• timeout_ms: Time to wait for the buffer to be ready before returning with an
ApiWaitTimeout error.
6.27 AlazarDSPGetParameterFloat
enum DSP_PARAMETERS_FLOAT
Parameters that can be queried with AlazarDSPGetParameter*() or set with AlazarD-
SPSetParameter*()
See AlazarDSPGetParameterFloat() and AlazarDSPGetParameterFloat() for informa-
tion about the way to use these parameters.
Values:
DSP_FFT_POSTPROC_REAL_B = 0
IEEE754 single precision value of “b” for real FFT output value calculation “(Re +
6.28 AlazarDSPGetParameterS32
enum DSP_PARAMETERS_S32
Parameters that can be queried with AlazarDSPGetParameter*() or set with AlazarD-
SPSetParameter*()
See AlazarDSPGetParameterS32() and AlazarDSPGetParameterS32() for information
about the way to use these parameters.
Values:
DSP_FFT_POSTPROC_REAL_A = 0
25-bit signed integer value of “a” for real FFT output value calculation “(Re + a)
* b + c”. To set this parameter in your program, it is necessary to set it after
AlazarFFTSetup() call, because this is where its default value is set.
DSP_FFT_POSTPROC_IMAG_A
25-bit signed integer value of “a” for imaginary FFT output value calculation “(Im
+ a) * b + c”. To set this parameter in your program, it is necessary to set it after
AlazarFFTSetup() call, because this is where its default value is set.
6.29 AlazarDSPGetParameterU32
enum DSP_PARAMETERS_U32
Parameters that can be queried with AlazarDSPGetParameter*()
See AlazarDSPGetParameterU32() for information about the way to use these param-
eters.
Values:
DSP_RAW_PLUS_FFT_SUPPORTED = 0
Tells if an FFT module supports RAW+FFT mode. This parameter returns 0 if
RAW+FFT mode is not supported, and 1 if it is.
DSP_FFT_SUBTRACTOR_SUPPORTED
Tells if an FFT module supports the background subtraction feature. This param-
eter returns 0 if the feature is not supported, and 1 if it is.
DSP_FFT_DATAPATH
Tells which data path an FFT module uses.
6.30 AlazarDSPSetParameterFloat
6.31 AlazarDSPSetParameterS32
6.32 AlazarDSPSetParameterU32
6.33 AlazarErrorToText
enum RETURN_CODE
API functions return codes. Failure is ApiSuccess.
Values:
ApiSuccess = API_RETURN_CODE_STARTS
512 - The operation completed without error
ApiFailed = 513
The operation failed.
ApiAccessDenied = 514
Access denied.
ApiDmaChannelUnavailable = 515
Channel selection is unavailable.
ApiDmaChannelInvalid = 516
Channel selection in invalid.
ApiDmaChannelTypeError = 517
Channel selection is invalid.
ApiDmaInProgress = 518
A data transfer is in progress. This error code indicates that the current action
cannot be performed while an acquisition is in progress. It also returned by
AlazarPostAsyncBuffer() if this function is called with an invalid DMA buffer.
ApiDmaDone = 519
DMA transfer is finished.
ApiDmaPaused = 520
DMA transfer was paused.
ApiDmaNotPaused = 521
DMA transfer is not paused.
ApiDmaCommandInvalid = 522
A DMA command is invalid.
ApiNullParam = 531
One of the parameters of the function is NULL and should not be.
ApiUnsupportedFunction = 533
This function is not supported by the API. Consult the manual for more informa-
tion.
ApiInvalidPciSpace = 534
Invalid PCI space.
ApiInvalidIopSpace = 535
Invalid IOP space.
ApiInvalidSize = 536
Invalid size passed as argument to the function.
ApiInvalidAddress = 537
Invalid address.
ApiInvalidAccessType = 538
Invalid access type requested.
ApiInvalidIndex = 539
Invalid index.
ApiInvalidRegister = 543
Invalid register.
ApiConfigAccessFailed = 550
Access for configuration failed.
ApiInvalidDeviceInfo = 551
Invalid device information.
ApiNoActiveDriver = 552
No active driver for the board. Please ensure that a driver is installed.
ApiInsufficientResources = 553
There were not enough system resources to complete this operation. The most
common reason of this return code is using too many DMA buffers, or using DMA
buffers that are too big. Please try reducing the number of buffers posted to the
board at any time, and/or try reducing the DMA buffer sizes.
ApiNotInitialized = 556
The API has not been properly initialized for this function call. Please review one
of the code samples from the ATS-SDK to confirm that API calls are made in the
right order.
ApiInvalidPowerState = 558
Power state requested is not valid.
ApiPowerDown = 559
The operation cannot be completed because the device is powered down. For
example, this error code is output if the computer enters hiberanation while an
acquisition is running.
ApiNotSupportThisChannel = 561
The API call is not valid with this channel selection.
ApiNoAction = 562
The function has requested no action to be taken.
ApiHSNotSupported = 563
HotSwap is not supported.
ApiVpdNotEnabled = 565
Vital product data not enabled.
ApiInvalidOffset = 567
Offset argument is not valid.
ApiPciTimeout = 569
Timeout on the PCI bus.
ApiInvalidHandle = 572
Invalid handle passed as argument.
ApiBufferNotReady = 573
The buffer passed as argument is not ready to be called with this API. This error
code is most often seen is the order of buffers posted to the board is not respected
when querying them.
ApiInvalidData = 574
Generic invalid parameter error. Check the function’s documentation for more
information about valid argument values.
ApiDoNothing = 575
ApiDmaSglBuildFailed = 576
Unable to lock buffer and build SGL list.
ApiPMNotSupported = 577
Power management is not supported.
ApiInvalidDriverVersion = 578
Invalid driver version.
ApiWaitTimeout = 579
The operation did not finish during the timeout interval. try the operation again,
or abort the acquisition.
ApiWaitCanceled = 580
The operation was cancelled.
ApiBufferTooSmall = 581
The buffer used is too small. Try increasing the buffer size.
ApiBufferOverflow = 582
The board overflowed its internal (on-board) memory. Try reducing the sample
rate, reducing the number of enabled channels. Also ensure that DMA buffer size
is between 1 MB and 8 MB.
ApiInvalidBuffer = 583
The buffer passed as argument is not valid.
ApiInvalidRecordsPerBuffer = 584
The number of reocrds per buffer passed as argument is invalid.
ApiDmaPending
585 - An asynchronous I/O operation was successfully started on the board. It will
be completed when sufficient trigger events are supplied to the board to fill the
buffer.
ApiLockAndProbePagesFailed = 586
The buffer is too large for the driver or operating system to prepare for scatter-
gather DMA transfer. Try reducing the size of each buffer, or reducing the num-
ber of buffers queued by the application.
ApiTransferComplete = 589
This buffer is the last in the current acquisition.
ApiPllNotLocked = 590
The on-board PLL circuit could not lock. If the acquisition used an internal sample
clock, this might be a symptom of a hardware problem; contact AlazarTech. If the
acquisition used an external 10 MHz PLL signal, please make sure that the signal
is fed in properly.
ApiNotSupportedInDualChannelMode = 591
The requested acquisition is not possible with two channels. This can be due to the
sample rate being too fast for DES boards, or to the number of samples per record
being too large. Try reducing the number of samples per channel, or switching
to single channel mode.
ApiNotSupportedInQuadChannelMode = 592
The requested acquisition is not possible with four channels. This can be due
to the sample rate being too fast for DES boards, or to the number of samples
per record being too large. Try reducing the number of samples per channel, or
switching to single channel mode.
ApiFileIoError = 593
A file read or write error occured.
ApiInvalidClockFrequency = 594
The requested ADC clock frequency is not supported.
ApiInvalidSkipTable = 595
Invalid skip table passed as argument.
ApiInvalidDspModule = 596
This DSP module is not valid for the current operation.
ApiDESOnlySupportedInSingleChannelMode = 597
Dual-edge sampling mode is only supported in signel-channel mode. Try dis-
abling dual-edge sampling (lowering the sample rate if using internal clock), or
selecting only one channel.
ApiInconsistentChannel = 598
Successive API calls of the same acuqiisiton have received inconsistent acquisi-
tion channel masks.
ApiDspFiniteRecordsPerAcquisition = 599
DSP acquisition was run with a finite number of records per acqusiition. Set this
value to inifinite.
ApiNotEnoughNptFooters = 600
Not enough NPT footers in the buffer for extraction.
ApiInvalidNptFooter = 601
Invalid NPT footer found.
ApiOCTIgnoreBadClockNotSupported = 602
OCT ignore bad clock is not supported.
ApiError1 = 603
The requested number of records in a single-port acquisition exceeds the max-
imum supported by the digitizer. Use dual-ported AutoDMA to acquire more
records per acquisition.
ApiError2 = 604
The requested number of records in a single-port acquisition exceeds the maxi-
mum supported by the digitizer.
ApiOCTNoTriggerDetected = 605
No trigger is detected as part of the OCT ignore bad clock feature.
ApiOCTTriggerTooFast = 606
Trigger detected is too fast for the OCT ignore bad clock feature.
ApiNetworkError = 607
There was a network-related issue. Make sure that the network connection and
settings are correct.
ApiFftSizeTooLarge = 608
On-FPGA FFT cannot support FFT that large. Try reducing the FFT size, or query-
ing the maximum FFT size with AlazarDSPGetInfo()
ApiGPUError = 609
GPU returned an error. See log for more information.
ApiAcquisitionModeOnlySupportedInFifoStreaming = 610
This board only supports this acquisition mode in FIFO only streaming mode.
Please set the ADMA_FIFO_ONLY_STREAMING flag in AlazarBeforeAsyncRead().
ApiInterleaveNotSupportedInTraditionalMode = 611
This board does not support sample interleaving in traditional acquisition mode.
Please refer to the SDK guide for more information.
ApiRecordHeadersNotSupported = 612
This board does not support record headers. Please refer to the SDK guide for
more information.
ApiRecordFootersNotSupported = 613
This board does not support record footers. Please refer to the SDK guide for more
information.
ApiFastBufferLockCountExceeded = 614
The number of different DMA buffers posted exceeds the limit set with AlazarCon-
figureFastBufferLock(). Either disable fast buffer locking, or confirm that the
value passed to AlazarConfigureFastBufferLock() is respected.
ApiInvalidStateDoRetry = 615
The operation could not complete because the system is in an invalid state. You
may safely retry the call that returned this error.
ApiInvalidInputRange = 616
The operation could not complete because the system is in an invalid state. You
may safely retry the call that returned this error.
6.34 AlazarExtractFFTNPTFooters
6.35 AlazarExtractNPTFooters
struct _NPTFooter
NPT Footer structure that can be retrieved using AlazarExtractNPTFooters().
Public Members
U64 triggerTimestamp
Timestamp of the trigger event in this
U32 recordNumber
acquisition.
Record number
U32 frameCount
Frame count.
BOOL aux_in_state
AUX I/O state received during the record’s acquisition
6.36 AlazarExtractTimeDomainNPTFooters
• [in] bufferSize_bytes: Bytes per buffer in the DMA buffer passed as argu-
ment
• [out] footersArray: Base address of an array of NPTFooter structures which
will be filled by this function
• [in] numFootersToExtract: Maximum numbers of footers to extract. This can
be a number from zero to the number of records in the DMA buffer passed as
argument.
RETURN_CODE AlazarFFTBackgroundSubtractionGetRecordS16(dsp_module_handle
dspHandle, S16 *back-
groundRecord, U32
size_samples)
Reads the background subtraction record from a board.
This function can be called to read which record the board uses for the background
subtraction feature. It is used by allocating an array of the right size, then passing it
to backgroundRecord along with it’s size in samples to size_samples.
This function should be called before or between acquisitions, not during one.
RETURN_CODE AlazarFFTBackgroundSubtractionSetEnabled(dsp_module_handle
dspHandle, BOOL en-
abled)
Controls the activation of the background subtraction feature.
Passing true to enabled activates background subtraction. Passing false deactivates it.
This function should be called before or between acquisitions, not during one.
RETURN_CODE AlazarFFTBackgroundSubtractionSetRecordS16(dsp_module_handle
dspHandle, const
S16 *record, U32
size_samples)
Download the record for the background subtraction feature to a board.
Pass this function a pointer to an 16-bit integer array containing the record you want
to download, and the size of this record in samples.
This function should be called before or between acquisitions, not during one.
6.40 AlazarFFTGetMaxTriggerRepeatRate
Warning This function is available for FFT modules versions 4.5 and up.
6.41 AlazarFFTSetScalingAndSlicing
Parameters
• dspHandle: Handle to DSP module
• slice_pos: This parameter indicates the position of the most significant bit
of the output of slicing operations with respect to the input. Lowering this
value by one has the effect of multiplying the output of the FFT module by
2. Default value is 7 for log outputs and 38 otherwise. On the block diagram,
this parameter applies to all blocks marked ‘Slice’.
• loge_ampl_mult: This controls a multiplicative factor used after the log con-
version in the FFT module. Hence, it does not apply to ‘amplitude squared’
outputs. Default value is 4.3429446 for U8 log and float log outputs, and
1111.7938176 for U16 log output.
6.42 AlazarFFTSetWindowFunc on
Warning Please note that the window function is not compatible with the FFT verifi-
cation mode.
Parameters
• dspHandle: The handle of the FFT DSP module to set the window function for.
• samplesPerRecord: The number of samples in the window function array.
6.43 AlazarFFTSetup
Parameters
• dspHandle: The FFT module to configure.
• inputChannelMask: The channels to acquire data from. This must be CHAN-
NEL_A.
• recordLength_samples: The number of points per record to acquire. This needs
to meet the usual requirements for the number of samples per record. Please
see the documentation of AlazarBeforeAsyncRead() for more information.
• fftLength_samples: The number of points per FFT. This value must be:
– A power of two;
– Greater than or equal to recordLength_samples;
– Less than or equal to the maximum FFT size, as returned by the AlazarD-
SPGetInfo() function.
• outputFormat: Describes what data is output from the FFT post-processing
module. This can be any element of the FFT_OUTPUT_FORMAT enum
except FFT_OUTPUT_FORMAT_RAW_PLUS_FFT, optionally OR’ed with
FFT_OUTPUT_FORMAT_RAW_PLUS_FFT.
• footer: Describes if a footer is attached to the returned records. Must be an
element of the FFT_FOOTER enum.
• reserved: Reserved for future use. Pass 0.
• bytesPerOutputRecord: Returns the number of bytes in each record coming out
of the FFT module. This value can be used to know how long the allocated
DMA buffers must be.
enum FFT_OUTPUT_FORMAT
FFT output format enumeration.
Values:
FFT_OUTPUT_FORMAT_U32_AMP2 = 0x0
32-bit unsigned integer amplitude squared output.
FFT_OUTPUT_FORMAT_U16_LOG = 0x1
16-bit unsigned integer logarithmic amplitude output.
FFT_OUTPUT_FORMAT_U16_AMP2 = 0x101
16-bit unsigned integer amplitude squared output.
FFT_OUTPUT_FORMAT_U8_LOG = 0x2
8-bit unsigned integer logarithmic amplitude output.
FFT_OUTPUT_FORMAT_U8_AMP2 = 0x102
8-bit unsigned integer amplitude squared output.
FFT_OUTPUT_FORMAT_S32_REAL = 0x3
32-bit signed integer real part of FFT output.
FFT_OUTPUT_FORMAT_S32_IMAG = 0x4
32-bit signed integer imaginary part of FFT output.
FFT_OUTPUT_FORMAT_FLOAT_AMP2 = 0xA
32-bit floating point amplitude squared output.
FFT_OUTPUT_FORMAT_FLOAT_LOG = 0xB
32-bit floating point logarithmic output.
FFT_OUTPUT_FORMAT_RAW_PLUS_FFT = 0x1000
Prepend each FFT output record with a signed 16-bit version of the time-domain
data.
enum FFT_FOOTER
FFT footer enumeration.
Values:
FFT_FOOTER_NONE = 0x0
FFT_FOOTER_NPT = 0x1
6.44 AlazarForceTrigger
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Board handle
6.45 AlazarForceTriggerEnable
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Board handle
6.46 AlazarFreeBufferU16
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Handle to board
• [in] buffer: Base address of the buffer to free
6.47 AlazarFreeBufferU16Ex
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Handle to board
• [in] buffer: Base address of the buffer to free
6.48 AlazarFreeBufferU8
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Handle to board
• [in] buffer: Base address of the buffer to free
6.49 AlazarFreeBufferU8Ex
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Handle to board
• [in] buffer: Base address of the buffer to free
6.50 AlazarGetBoardBySystemHandle
Return NULL if the master board handle is invalid, or a board with the specified
board identifier was not found in the specified board system.
Parameters
• [in] systemHandle: Handle to master board
• [in] boardId: Board identifier in the board system
6.51 AlazarGetBoardBySystemID
6.52 AlazarGetBoardKind
Return A non-zero board model identifier upon success. See BoardTypes for convert-
ing the identifier into a board model.
Return Zero upon error.
Parameters
• [in] handle: Board handle
enum BoardTypes
Existing board models.
Values:
ATS_NONE = 0
ATS850 = 1
ATS310 = 2
ATS330 = 3
ATS855 = 4
ATS315 = 5
ATS335 = 6
ATS460 = 7
ATS860 = 8
ATS660 = 9
ATS665 = 10
ATS9462 = 11
ATS9434 = 12
ATS9870 = 13
ATS9350 = 14
ATS9325 = 15
ATS9440 = 16
ATS9410 = 17
ATS9351 = 18
ATS9310 = 19
ATS9461 = 20
ATS9850 = 21
ATS9625 = 22
ATG6500 = 23
ATS9626 = 24
ATS9360 = 25
AXI9870 = 26
ATS9370 = 27
ATU7825 = 28
ATS9373 = 29
ATS9416 = 30
ATS9637 = 31
ATS9120 = 32
ATS9371 = 33
ATS9130 = 34
ATS9352 = 35
ATS9453 = 36
ATS9146 = 37
ATS9000 = 38
ATST371 = 39
ATS9437 = 40
ATS9618 = 41
ATS9358 = 42
ATS9353 = 44
ATS9872 = 45
ATS9470 = 46
ATS9628 = 47
6.53 AlazarGetBoardRevision
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: The board handle
• [out] major: PCB major version number
• [out] minor: PCB minor version number
6.54 AlazarGetCPLDVersion
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
6.55 AlazarGetChannelInfo
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Remark The memory size information is independent of how many channels the
board can acquire on simultaneously. When multiple channels acquire data, they
share this amount.
Remark The memory size indication is given for the default packing mode. See doc-
umentation about data packing for more information.
Parameters
• [in] handle: Board handle.
• [out] memorySize: Total size of the on-board memory in samples.
• [out] bitsPerSample: Bits per sample.
6.56 AlazarGetChannelInfoEx
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Remark The memory size information is independent of how many channels the
board can acquire on simultaneously. When multiple channels acquire data, they
share this amount.
Remark The memory size indication is given for the default packing mode. See doc-
umentation about data packing for more information.
Parameters
• [in] handle: Board handle.
• [out] memorySize: Total size of the on-board memory in samples.
• [out] bitsPerSample: Bits per sample.
6.57 AlazarGetDriverVersion
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Remark To check the driver version of a specific board, instead of the most recently
opened one, see AlazarGetDriverVersionEx
See AlazarGetSDKVersion() AlazarGetCPLDVersion()
Parameters
• [out] major: The driver major version number
• [out] minor: The driver minor version number
• [out] revision: The driver revision number
6.58 AlazarGetMaxRecordsCapable
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Note This function is part of the single-port API. It should not be used with AutoDMA
API functions.
Parameters
• [in] handle: Board handle
• [in] samplesPerRecord: The desired number of samples per record
• [out] maxRecordsPerCapture: The maximum number of records per capture
possible with the requested value of samples per record.
6.59 AlazarGetParameter
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Board handle
• [in] channel: The channel to control. See ALAZAR_CHANNELS for a list of
possible values. This parameter only takes unsigned 8-bit values.
• [in] parameter: The Parameter to modify. This can be one of
ALAZAR_PARAMETERS.
• [in] retValue: Parameter’s value
enum ALAZAR_PARAMETERS
Parameters suitable to be used with AlazarSetParameter() and/or AlazarGetParame-
ter()
Values:
DATA_WIDTH = 0x10000009UL
The number of bits per sample.
SETGET_ASYNC_BUFFSIZE_BYTES = 0x10000039UL
The size of API-allocated DMA buffers in bytes.
SETGET_ASYNC_BUFFCOUNT = 0x10000040UL
The number of API-allocated DMA buffers.
GET_ASYNC_BUFFERS_PENDING = 0x10000050UL
DMA buffers currently posted to the board.
GET_ASYNC_BUFFERS_PENDING_FULL = 0x10000051UL
DMA buffers waiting to be processed by the application.
GET_ASYNC_BUFFERS_PENDING_EMPTY = 0x10000052UL
DMA buffers waiting to be filled by the board.
SET_DATA_FORMAT = 0x10000041UL
0 if the data format is unsigned, and 1 otherwise
GET_DATA_FORMAT = 0x10000042UL
0 if the data format is unsigned, and 1 otherwise
GET_SAMPLES_PER_TIMESTAMP_CLOCK = 0x10000044UL
Number of samples per timestamp clock.
GET_RECORDS_CAPTURED = 0x10000045UL
Records captured since the start of the acquisition (single-port) or buffer (dual-
port)
ECC_MODE = 0x10000048UL
ECC mode. Member of ALAZAR_ECC_MODES.
GET_AUX_INPUT_LEVEL = 0x10000049UL
Read the TTL level of the AUX connector. Member of
ALAZAR_AUX_INPUT_LEVELS
GET_CHANNELS_PER_BOARD = 0x10000070UL
Number of analog channels supported by this digitizer.
GET_FPGA_TEMPERATURE = 0x10000080UL
Current FPGA temperature in degrees Celcius. Only supported by PCIe digitizers.
PACK_MODE = 0x10000072UL
Get/Set the pack mode as a member of ALAZAR_PACK_MODES.
SET_SINGLE_CHANNEL_MODE = 0x10000043UL
Reserve all the on-board memory to the channel passed as argument. Single-port
only.
API_FLAGS = 0x10000090UL
Get/Set the state of the API logging as a member of ALAZAR_API_TRACE_STATES
SET_SOFTWARE_CAL_MECHANISM = 0x10000100UL
Use software calibration mechanism if set to 1, else use standard hardware cali-
bration.
API_LOG_CLEAR = 0x10000102UL
Clear the log file of the API logging mechanism.
SETGET_TRIGGER_SKIPPING = 0x10000103UL
Sets of gets the current value of trigger skipping. Please refer to the trigger skip-
ping section of the documentation for more information.
enum ALAZAR_ECC_MODES
ECC Modes.
Values:
ECC_DISABLE = 0
Disable.
ECC_ENABLE = 1
Enable.
enum ALAZAR_AUX_INPUT_LEVELS
Auxiliary input levels.
Values:
AUX_INPUT_LOW = 0
Low level.
AUX_INPUT_HIGH = 1
High level.
enum ALAZAR_PACK_MODES
Data pack modes.
Values:
PACK_DEFAULT = 0
Default pack mode of the board.
PACK_8_BITS_PER_SAMPLE = 1
8 bits per sample
PACK_12_BITS_PER_SAMPLE = 2
12 bits per sample
enum ALAZAR_API_TRACE_STATES
API trace states.
Values:
API_DISABLE_TRACE = 0
Trace disabled.
API_ENABLE_TRACE = 1
Trace enabled.
6.60 AlazarGetParameterLL
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Board handle
• [in] channel: The channel to control. See ALAZAR_CHANNELS for a list of
possible values. This parameter only takes unsigned 8-bit values.
• [in] parameter: The Parameter to modify. This can be one of
ALAZAR_PARAMETERS.
• [in] retValue: Parameter’s value
6.61 AlazarGetParameterUL
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Board handle
• [in] channel: The channel to control. See ALAZAR_CHANNELS for a list of
possible values. This parameter only takes unsigned 8-bit values.
• [in] parameter: The Parameter to modify. This can be one of
ALAZAR_PARAMETERS_UL.
• [in] retValue: Parameter’s value
enum ALAZAR_PARAMETERS_UL
Parameters suitable to be used with AlazarSetParameterUL() and/or AlazarGetParam-
eterUL()
Values:
SET_ADC_MODE = 0x10000047UL
Sets the ADC mode. The value must be a member of ALAZAR_ADC_MODES. When
this parameter is used, channels must be one or more channels OR’ed together.
CHANNEL_ALL is not allowed.
SET_BUFFERS_PER_TRIGGER_ENABLE = 0x10000097UL
Configures the number of DMA buffers acquired after each trigger enable event.
The default value is 1.
It is possible to make the number of buffers per trigger enable infinite by passing
a value of 0xFFFFFFFF to this parameter. In this case, trigger enable essentially
becomes a “start of acquisition” signal.
Remark To set the number of buffers per trigger enable, this must
be called after AlazarBeforeAsyncRead() but before AlazarStartCap-
ture(), which means that AlazarBeforeAsyncRead() must be called with
ADMA_EXTERNAL_STARTCAPTURE
Remark This parameter is reset in between acquisitions.
GET_POWER_MONITOR_STATUS = 0x10000098UL
Queries the status of the power monitor on the board. The value returned is
zero if there is no problem. If it is not zero, please send the value returned to
AlazarTech’s technical support.
SET_EXT_TRIGGER_RANGE = 0x1000001CUL
Configure external trigger range. Parameter is as a member of
ALAZAR_EXTERNAL_TRIGGER_RANGES
enum ALAZAR_ADC_MODES
Analog to digital converter modes.
Values:
ADC_MODE_DEFAULT = 0
Default ADC mode.
ADC_MODE_DES = 1
Dual-edge sampling mode.
6.62 AlazarGetSDKVersion
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Remark Note that the version number returned is that of the driver library file, not
the ATS-SDK version number. SDK releases are given a version number with the
format X.Y.Z where: X is the major release number, Y is the minor release number,
and Z is the minor revision number.
See AlazarGetCPLDVersion()
See AlazarGetDriverVersion()
Parameters
• [out] major: The SDK major version number
• [out] minor: The SDK minor version number
• [out] revision: The SDK revision number
6.63 AlazarGetStatus
Return If the function fails, the return value is 0xFFFFFFFF. Upon success, the return
value is a bit mask of the following values:
• 1 : At least one trigger timeout occured.
• 2 : At least one channel A sample was out of range during the last acquisition.
• 4 : At least one channel B sample was out of range during the last acquisition.
• 8 : PLL is locked (ATS660 only)
Note This function is part of the single-port data acquisition API. It cannot be used
with the dual-port AutoDMA APIs.
Parameters
• [in] handle: Board handle
6.64 AlazarGetSystemHandle
Remark If the board system specified contains a single, independent board, this func-
tion returns a handle to that board.
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] systemId: System identification number
6.65 AlazarGetTriggerAddress
__int64 timeStamp_cnt;
timeStamp_cnt = ((__int64) timestampHighPart) << 8;
timeStamp_cnt |= timestampLowPart & 0x0ff;
double samplesPerTimestampCount = 2; // board specific constant
double samplesPerSec = 50.e6; // sample rate
double timeStamp_sec = (double) samplesPerTimestampCount *
timeStamp_cnt / samplesPerSec;
The sample per timestamp count value depends on the board model. See board-
specific information to know which value applies to which board.
6.66 AlazarGetTriggerTimestamp
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Remark This function is part of the single-port data acquisition API. It cannot be used
to retrieve the timestamp of records acquired using dual-port AutoDMA APIs.
Parameters
• [in] handle: Board handle
• [in] Record: 1-indexed record in acquisition
• [in] Timestamp_samples: Record timestamp, in sample clock periods
6.67 AlazarGetWhoTriggeredBySystemHandle
6.68 AlazarGetWhoTriggeredBySystemID
6.69 AlazarHyperDisp
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Note This function is part of the single-port data acquisition API. It cannot be used
with the dual-port AutoDMA APIs.
Parameters
• [in] handle: Board handle
• [in] buffer: Reserved (Set to NULL)
• [in] bufferSize: Number of samples to process
• [out] viewBuffer: Buffer to receive processed data
• [in] viewBufferSize: Size of processed data buffer in bytes
• [in] numOfPixels: Number of HyperDisp points
• [in] option: Processing mode. Pass 1 to enable HyperDisp processing.
• [in] channelSelect: Channel to process
• [in] record: Record to process (1-indexed)
• [in] transferOffset: The offset, in samples, of first sample to process relative
to the trigger position in record.
• [out] error: Pointer to value to receive a result code.
6.70 AlazarInputControl
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Board handle.
• [in] channel: The channel to control. See ALAZAR_CHANNELS for a list of
possible values. This parameter only takes unsigned 8-bit values. To config-
ure channel I and above, see AlazarInputControlEx().
• [in] inputRange: Specify the input range of the selected channel. See
ALAZAR_INPUT_RANGES for a list of all existing input ranges. Consult board-
specific information to see which input ranges are supported by each board.
• [in] coupling: Specifies the coupling of the selected channel. Must be an
element of ALAZAR_COUPLINGS
• [in] impedance: Specify the input impedance to set for the selected channel.
See ALAZAR_IMPEDANCES for a list of all existing values. See the board-
specific documentation to see impedances supported by various boards.
enum ALAZAR_CHANNELS
Channel identifiers.
Values:
CHANNEL_ALL = 0x00000000
All channels.
CHANNEL_A = 0x00000001
Channel A.
CHANNEL_B = 0x00000002
Channel B.
CHANNEL_C = 0x00000004
Channel C.
CHANNEL_D = 0x00000008
Channel D.
CHANNEL_E = 0x00000010
Channel E.
CHANNEL_F = 0x00000020
Channel F.
CHANNEL_G = 0x00000040
Channel G.
CHANNEL_H = 0x00000080
Channel H.
CHANNEL_I = 0x00000100
Channel I.
CHANNEL_J = 0x00000200
Channel J.
CHANNEL_K = 0x00000400
Channel K.
CHANNEL_L = 0x00000800
Channel L.
CHANNEL_M = 0x00001000
Channel M.
CHANNEL_N = 0x00002000
Channel N.
CHANNEL_O = 0x00004000
Channel O.
CHANNEL_P = 0x00008000
Channel P.
enum ALAZAR_INPUT_RANGES
Input range identifiers.
Values:
INPUT_RANGE_PM_20_MV = 0x00000001UL
+/- 20mV
INPUT_RANGE_PM_40_MV = 0x00000002UL
+/- 40mV
INPUT_RANGE_PM_50_MV = 0x00000003UL
+/- 50mV
INPUT_RANGE_PM_80_MV = 0x00000004UL
+/- 80mV
INPUT_RANGE_PM_100_MV = 0x00000005UL
+/- 100mV
INPUT_RANGE_PM_200_MV = 0x00000006UL
+/- 200mV
INPUT_RANGE_PM_400_MV = 0x00000007UL
+/- 400mV
INPUT_RANGE_PM_500_MV = 0x00000008UL
+/- 500mV
INPUT_RANGE_PM_800_MV = 0x00000009UL
+/- 800mV
INPUT_RANGE_PM_1_V = 0x0000000AUL
+/- 1V
INPUT_RANGE_PM_2_V = 0x0000000BUL
+/- 2V
INPUT_RANGE_PM_4_V = 0x0000000CUL
+/- 4V
INPUT_RANGE_PM_5_V = 0x0000000DUL
+/- 5V
INPUT_RANGE_PM_8_V = 0x0000000EUL
+/- 8V
INPUT_RANGE_PM_10_V = 0x0000000FUL
+/- 10V
INPUT_RANGE_PM_20_V = 0x00000010UL
+/- 20V
INPUT_RANGE_PM_40_V = 0x00000011UL
+/- 40V
INPUT_RANGE_PM_16_V = 0x00000012UL
+/- 16V
INPUT_RANGE_UNCALIBRATED = 0x00000020UL
no gain
INPUT_RANGE_PM_1_V_25 = 0x00000021UL
+/- 1.25V
INPUT_RANGE_PM_2_V_5 = 0x00000025UL
+/- 2.5V
INPUT_RANGE_PM_125_MV = 0x00000028UL
+/- 125mV
INPUT_RANGE_PM_250_MV = 0x00000030UL
+/- 250mV
INPUT_RANGE_0_TO_40_MV = 0x00000031UL
0 to 40mV
INPUT_RANGE_0_TO_80_MV = 0x00000032UL
0 to 80mV
INPUT_RANGE_0_TO_100_MV = 0x00000033UL
0 to 100mV
INPUT_RANGE_0_TO_160_MV = 0x00000034UL
0 to 160mV
INPUT_RANGE_0_TO_200_MV = 0x00000035UL
0 to 200mV
INPUT_RANGE_0_TO_250_MV = 0x00000036UL
0 to 250mV
INPUT_RANGE_0_TO_400_MV = 0x00000037UL
0 to 400mV
INPUT_RANGE_0_TO_500_MV = 0x00000038UL
0 to 500mV
INPUT_RANGE_0_TO_800_MV = 0x00000039UL
0 to 800mV
INPUT_RANGE_0_TO_1_V = 0x0000003AUL
0 to 1V
INPUT_RANGE_0_TO_1600_MV = 0x0000003BUL
0 to 1.6V
INPUT_RANGE_0_TO_2_V = 0x0000003CUL
0 to 2V
INPUT_RANGE_0_TO_2_V_5 = 0x0000003DUL
0 to 2.5V
INPUT_RANGE_0_TO_4_V = 0x0000003EUL
0 to 4V
INPUT_RANGE_0_TO_5_V = 0x0000003FUL
0 to 5V
INPUT_RANGE_0_TO_8_V = 0x00000040UL
0 to 8V
INPUT_RANGE_0_TO_10_V = 0x00000041UL
0 to 10V
INPUT_RANGE_0_TO_16_V = 0x00000042UL
0 to 16V
INPUT_RANGE_0_TO_20_V = 0x00000043UL
0 to 20V
INPUT_RANGE_0_TO_80_V = 0x00000044UL
0 to 80V
INPUT_RANGE_0_TO_32_V = 0x00000045UL
0 to 32V
INPUT_RANGE_0_TO_MINUS_40_MV = 0x00000046UL
0 to -40mV
INPUT_RANGE_0_TO_MINUS_80_MV = 0x00000047UL
0 to -80mV
INPUT_RANGE_0_TO_MINUS_100_MV = 0x00000048UL
0 to -100mV
INPUT_RANGE_0_TO_MINUS_160_MV = 0x00000049UL
0 to -160mV
INPUT_RANGE_0_TO_MINUS_200_MV = 0x0000004AUL
0 to -200mV
INPUT_RANGE_0_TO_MINUS_250_MV = 0x0000004BUL
0 to -250mV
INPUT_RANGE_0_TO_MINUS_400_MV = 0x0000004CUL
0 to -400mV
INPUT_RANGE_0_TO_MINUS_500_MV = 0x0000004DUL
0 to -500mV
INPUT_RANGE_0_TO_MINUS_800_MV = 0x0000004EUL
0 to -800mV
INPUT_RANGE_0_TO_MINUS_1_V = 0x0000004FUL
0 to -1V
INPUT_RANGE_0_TO_MINUS_1600_MV = 0x00000050UL
0 to -1.6V
INPUT_RANGE_0_TO_MINUS_2_V = 0x00000051UL
0 to -2V
INPUT_RANGE_0_TO_MINUS_2_V_5 = 0x00000052UL
0 to -2.5V
INPUT_RANGE_0_TO_MINUS_4_V = 0x00000053UL
0 to -4V
INPUT_RANGE_0_TO_MINUS_5_V = 0x00000054UL
0 to -5V
INPUT_RANGE_0_TO_MINUS_8_V = 0x00000055UL
0 to -8V
INPUT_RANGE_0_TO_MINUS_10_V = 0x00000056UL
0 to -10V
INPUT_RANGE_0_TO_MINUS_16_V = 0x00000057UL
0 to -16V
INPUT_RANGE_0_TO_MINUS_20_V = 0x00000058UL
0 to 20V
INPUT_RANGE_0_TO_MINUS_80_V = 0x00000059UL
0 to 80V
INPUT_RANGE_0_TO_MINUS_32_V = 0x00000060UL
0 to 32V
INPUT_RANGE_UNCALIBRATED_PM_750_MV = 0x00000061UL
no gain +/- 750mV
enum ALAZAR_COUPLINGS
Coupling identifiers.
Values:
AC_COUPLING = 0x00000001UL
AC coupling.
DC_COUPLING = 0x00000002UL
DC coupling.
GND_COUPLING = 0x00000004UL
Ground coupling.
enum ALAZAR_IMPEDANCES
Impedance indentifiers.
Values:
IMPEDANCE_1M_OHM = 0x00000001UL
IMPEDANCE_50_OHM = 0x00000002UL
IMPEDANCE_75_OHM = 0x00000004UL
IMPEDANCE_300_OHM = 0x00000008UL
6.71 AlazarInputControlEx
6.72 AlazarNumOfSystems
U32 AlazarNumOfSystems(void)
Get the total number of board systems detected.
A board system is a group of one or more digitizer boards that share clock and trigger
signals. A board system may be composed of a single independent board, or a group
of two or more digitizer boards connected together with a SyncBoard.
6.73 AlazarOCTIgnoreBadClock
6.74 AlazarPostAsyncBuffer
This function adds a DMA buffer to the end of a list of buffers available to be filled
by the board. Use AlazarWaitAsyncBufferComplete() to determine if the board has re-
ceived sufficient trigger events to fill this buffer.
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Remark You must call AlazarBeforeAsyncRead() before calling AlazarPostA-
syncBuffer().
Warning You must call AlazarAbortAsyncRead() before your application exits if you
have called AlazarPostAsyncBuffer() and buffers are pending when your applica-
tion exits.
Remark The bufferLength_bytes parameter must be equal to the product of the num-
ber of bytes per record, the number of records per buffer and the number of
enabled channels. If record headers are enabled, the number of bytes per record
must include the size of the record header (16 bytes).
Parameters
• [in] handle: Handle to board
• [in] buffer: Pointer to buffer that will eventually receive data from the digi-
tizer board.
• [in] bufferLength_bytes: The length of the buffer in bytes.
6.75 AlazarQueryCapability
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Board handle
• [in] capability: The board capability to query. Must be a member of
ALAZAR_CAPABILITIES.
• [in] reserved: Pass 0
• [out] retValue: Capability value
enum ALAZAR_CAPABILITIES
Capabilities that can be queried through AlazarQueryCapability()
Values:
GET_SERIAL_NUMBER = 0x10000024UL
Board’s serial number.
GET_FIRST_CAL_DATE = 0x10000025UL
First calibration date.
GET_LATEST_CAL_DATE = 0x10000026UL
Latest calibration date.
GET_LATEST_TEST_DATE = 0x10000027UL
Latest test date.
GET_LATEST_CAL_DATE_MONTH = 0x1000002DUL
Month of latest calibration.
GET_LATEST_CAL_DATE_DAY = 0x1000002EUL
Day of latest calibration.
GET_LATEST_CAL_DATE_YEAR = 0x1000002FUL
Year of latest calibration.
GET_BOARD_OPTIONS_LOW = 0x10000037UL
Low part of the board options.
GET_BOARD_OPTIONS_HIGH = 0x10000038UL
High part of the board options.
MEMORY_SIZE = 0x1000002AUL
The memory size in samples.
ASOPC_TYPE = 0x1000002CUL
The FPGA signature.
BOARD_TYPE = 0x1000002BUL
The board type as a member of ALAZAR_BOARDTYPES.
GET_PCIE_LINK_SPEED = 0x10000030UL
PCIe link speed in Gb/s.
GET_PCIE_LINK_WIDTH = 0x10000031UL
PCIe link width in lanes.
GET_MAX_PRETRIGGER_SAMPLES = 0x10000046UL
Maximum number of pre-trigger samples.
GET_CPF_DEVICE = 0x10000071UL
User-programmable FPGA device. 1 = SL50, 2 = SE260.
HAS_RECORD_FOOTERS_SUPPORT = 0x10000073UL
Queries if the board supports NPT record footers. Returns 1 if the feature is sup-
ported and 0 otherwise
CAP_SUPPORTS_TRADITIONAL_AUTODMA = 0x10000074UL
Queries if the board supports the AutoDMA Traditional acquisition mode. Re-
turns 1 if the feature is supported and 0 otherwise.
CAP_SUPPORTS_NPT_AUTODMA = 0x10000075UL
Queries if the board supports the AutoDMA NPT accquisition mode. Returns 1 if
the feature is supported and 0 otherwise.
CAP_MAX_NPT_PRETRIGGER_SAMPLES = 0x10000076UL
Queries the maximum number of pre-trigger samples that can be requested in the
AutoDMA NPT acquisition mode. This amount is shared between all the channels
of the board.
CAP_IS_VFIFO_BOARD = 0x10000077UL
Tests if this board of the virtual-FIFO type.
CAP_SUPPORTS_NATIVE_SINGLE_PORT = 0x10000078UL
Tests if this board features native support for single-port acquisitions. Returns 1
if native support is present, and 0 otherwise.
CAP_SUPPORT_8_BIT_PACKING = 0x10000079UL
Tests if this board supports 8-bit data packing. Returns 1 if this board has a native
resolution of more than 8 bits and supports 8-bit packing.
CAP_SUPPORT_12_BIT_PACKING = 0x10000080UL
Tests if this board supports 12-bit data packing. Returns 1 if support is present,
and 0 otherwise.
HAS_RECORD_HEADERS_SUPPORT = 0x10000081UL
Tests if this board supports record headers. Returns 1 if support is present, and 0
otherwise.
CAP_SUPPORT_TRADITIONAL_SAMPLES_INTERLEAVED = 0x10000082UL
Tests if this board supports samples interleaved in traditional mode. Returns 1 if
support is present, and 0 otherwise.
CAP_SUPPORT_SOFTWARE_CAL = 0x10000083UL
Tests if this board supports software calibration. Returns 1 if support is present,
and 0 otherwise.
CAP_SUPPORTS_API_LOG_CLEAR = 0x10000084UL
Tests if this board supports API log clear. Returns 1 if support is present, and 0
otherwise.
CAP_SUPPORTS_TRIGGER_SKIPPING = 0x10000085UL
Tests if this board supports trigger skipping. Returns 1 if support is present, and
0 otherwise.
enum ALAZAR_BOARD_OPTIONS_LOW
AlazarTech board options. Lower 32-bits.
Values:
OPTION_STREAMING_DMA = (1UL << 0)
OPTION_EXTERNAL_CLOCK = (1UL << 1)
OPTION_DUAL_PORT_MEMORY = (1UL << 2)
OPTION_180MHZ_OSCILLATOR = (1UL << 3)
OPTION_LVTTL_EXT_CLOCK = (1UL << 4)
OPTION_SW_SPI = (1UL << 5)
OPTION_ALT_INPUT_RANGES = (1UL << 6)
OPTION_VARIABLE_RATE_10MHZ_PLL = (1UL << 7)
OPTION_MULTI_FREQ_VCO = (1UL << 7)
OPTION_2GHZ_ADC = (1UL << 8)
OPTION_DUAL_EDGE_SAMPLING = (1UL << 9)
OPTION_DCLK_PHASE = (1UL << 10)
OPTION_WIDEBAND = (1UL << 11)
OPTION_USER_CALIBRATION = (1UL << 15)
enum ALAZAR_BOARD_OPTIONS_HIGH
AlazarTech board options. Higher 32-bits.
Values:
OPTION_OEM_FPGA = (1UL << 15)
6.76 AlazarQueryCapabilityLL
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
6.77 AlazarRead
U32 AlazarRead(HANDLE handle, U32 channelId, void *buffer, int elementSize, long
record, long transferOffset, U32 transferLength)
Read all of part of a record from on-board memory to host memory (RAM).
The record must be less than 2,147,483,648 samples long.
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Note AlazarRead() is part of the single-port API, it cannot be used in a dual-port con-
text.
Remark AlazarRead() can transfer segments of a record. This may be useful if a full
record is too large to transfer as a single clock, or if only part of a record is of
interest.
Remark Use AlazarReadEx() To transfer records with more than 2 billion samples.
Parameters
• [in] handle: Board handle
• [in] channelId: The channel identifier of the record to read.
• [out] buffer: Buffer to receive sample data
• [in] elementSize: Number of bytes per sample
• [in] record: Index of the record to transfer (1-indexed)
• [in] transferOffset: The offset, in samples, from the trigger position in the
record, of the first sample to transfer.
• [in] transferLength: The number of samples to transfer.
6.78 AlazarReadEx
U32 AlazarReadEx(HANDLE handle, U32 channelId, void *buffer, int elementSize, long
record, INT64 transferOffset, U32 transferLength)
Read all or part of a record from an acquisition to on-board memory from on-board
memory to a buffer in hsot memory. The record may be longer than 2 billion samples.
Use AlazarRead() or AlazarReadEx() to transfer records with less than 2 billion sam-
ples. Use AlazarReadEx() to transfer records with more than 2 billion samples.
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Note AlazarReadEx() is part of the single-port data acquisition API. It cannot be used
with the dual-port AutoDMA APIs.
Remark AlazarReadEx() can transfer segments of a record to on-board memory. This
may be useful if a full record is too large to transfer as a single block, or if only
part of a record is of interest.
Parameters
• [in] handle: Handle to board
• [in] channelId: channel identifier of record to read
• [out] buffer: Buffer to receive sample data
• [in] elementSize: number of bytes per sample
• [in] record: record in on-board memory to transfer to buffer (1-indexed).
• [in] transferOffset: The offset in samples from the trigger position in the
record of the first sample in the record in on-board memory to transfer to the
buffer
• [in] transferLength: The number of samples to transfer from the record in
on-board memory to the buffer.
6.79 AlazarResetTimeStamp
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Remark This function is not supported by ATS310, ATS330 and ATS850
Parameters
• [in] handle: Handle to board
• [in] option: Record timestamp reset option. Can be one of
ALAZAR_TIMESTAMP_RESET_OPTIONS.
enum ALAZAR_TIMESTAMP_RESET_OPTIONS
Timestamp reset options. See AlazarResetTimeStamp()
Values:
TIMESTAMP_RESET_FIRSTTIME_ONLY = 0x00000000UL
TIMESTAMP_RESET_ALWAYS = 0x00000001UL
6.80 AlazarSetADCBackgroundCompensa on
Remark This feature does not exist on all boards. Please check board-specific infor-
mation for more details.
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Handle to board
• [in] active: Determines whether this function activates or deactivates the
ADC background compensation.
6.81 AlazarSetBWLimit
Remark The bandwidth limiter is disabled by default. When enabled, the bandwith
is limited to approximatively 20 MHz.
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Board handle
• [in] channel: The channel identifier. Must be a channel from
ALAZAR_CHANNELS.
• [in] enable: Pass 1 to enable the bandwith limit, or zero otherwise.
6.82 AlazarSetCaptureClock
Parameters
• [in] handle: Board handle
• [in] source: Clock source identifiers. Must be a member of
ALAZAR_CLOCK_SOURCES. See board-specific information for a list of
valid values for each board. For external clock types, the identifier to choose
may depend on the clock’s frequency. See board-specific information for a
list of frequency ranges for all clock types.
• [in] sampleRateIdOrValue: If the clock source chosen is INTERNAL_CLOCK,
this value is a member of ALAZAR_SAMPLE_RATES that defines the internal
sample rate to choose. Valid values for each board vary. If the clock source
chosen is EXTERNAL_CLOCK_10MHZ_REF, pass the value of the sample clock
to generate from the reference in hertz. The values that can be generated
depend on the board model. Otherwise, the clock source is external, pass
SAMPLE_RATE_USER_DEF to this parameter.
• [in] edgeId: The external clock edge on which to latch sample rate. Must be
a member of ALAZAR_CLOCK_EDGES.
• [in] decimation: Decimation value. May be an integer between 0 and 100000
with the following exceptions. Note that a decimation value of 0 means dis-
able decimation.
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
enum ALAZAR_CLOCK_SOURCES
Clock source identifiers.
Values:
INTERNAL_CLOCK = 0x00000001UL
Internal clock.
EXTERNAL_CLOCK = 0x00000002UL
External clock.
FAST_EXTERNAL_CLOCK = 0x00000002UL
Fast external clock.
MEDIUM_EXTERNAL_CLOCK = 0x00000003UL
Medium external clock.
SLOW_EXTERNAL_CLOCK = 0x00000004UL
Slow external clock.
EXTERNAL_CLOCK_AC = 0x00000005UL
AC external clock.
EXTERNAL_CLOCK_DC = 0x00000006UL
DC external clock.
EXTERNAL_CLOCK_10MHZ_REF = 0x00000007UL
10MHz external reference
INTERNAL_CLOCK_10MHZ_REF = 0x00000008
Internal 10MHz reference.
EXTERNAL_CLOCK_10MHZ_PXI = 0x0000000A
External 10MHz PXI.
enum ALAZAR_SAMPLE_RATES
Sample rate identifiers.
Values:
SAMPLE_RATE_1KSPS = 0X00000001UL
SAMPLE_RATE_2KSPS = 0X00000002UL
SAMPLE_RATE_5KSPS = 0X00000004UL
SAMPLE_RATE_10KSPS = 0X00000008UL
SAMPLE_RATE_20KSPS = 0X0000000AUL
SAMPLE_RATE_50KSPS = 0X0000000CUL
SAMPLE_RATE_100KSPS = 0X0000000EUL
SAMPLE_RATE_200KSPS = 0X00000010UL
SAMPLE_RATE_500KSPS = 0X00000012UL
SAMPLE_RATE_1MSPS = 0X00000014UL
SAMPLE_RATE_2MSPS = 0X00000018UL
SAMPLE_RATE_5MSPS = 0X0000001AUL
SAMPLE_RATE_10MSPS = 0X0000001CUL
SAMPLE_RATE_20MSPS = 0X0000001EUL
SAMPLE_RATE_25MSPS = 0X00000021UL
SAMPLE_RATE_50MSPS = 0X00000022UL
SAMPLE_RATE_100MSPS = 0X00000024UL
SAMPLE_RATE_125MSPS = 0x00000025UL
SAMPLE_RATE_160MSPS = 0x00000026UL
SAMPLE_RATE_180MSPS = 0x00000027UL
SAMPLE_RATE_200MSPS = 0X00000028UL
SAMPLE_RATE_250MSPS = 0X0000002BUL
SAMPLE_RATE_400MSPS = 0X0000002DUL
SAMPLE_RATE_500MSPS = 0X00000030UL
SAMPLE_RATE_800MSPS = 0X00000032UL
SAMPLE_RATE_1000MSPS = 0x00000035UL
SAMPLE_RATE_1GSPS = SAMPLE_RATE_1000MSPS
SAMPLE_RATE_1200MSPS = 0x00000037UL
SAMPLE_RATE_1500MSPS = 0x0000003AUL
SAMPLE_RATE_1600MSPS = 0x0000003BUL
SAMPLE_RATE_1800MSPS = 0x0000003DUL
SAMPLE_RATE_2000MSPS = 0x0000003FUL
SAMPLE_RATE_2GSPS = SAMPLE_RATE_2000MSPS
SAMPLE_RATE_2400MSPS = 0x0000006AUL
SAMPLE_RATE_3000MSPS = 0x00000075UL
SAMPLE_RATE_3GSPS = SAMPLE_RATE_3000MSPS
SAMPLE_RATE_3600MSPS = 0x0000007BUL
SAMPLE_RATE_4000MSPS = 0x00000080UL
SAMPLE_RATE_4GSPS = SAMPLE_RATE_4000MSPS
SAMPLE_RATE_300MSPS = 0x00000090UL
SAMPLE_RATE_350MSPS = 0x00000094UL
SAMPLE_RATE_370MSPS = 0x00000096UL
SAMPLE_RATE_5000MSPS = 0x000000A0UL
SAMPLE_RATE_5GSPS = SAMPLE_RATE_5000MSPS
SAMPLE_RATE_10000MSPS = 0x000000B0UL
SAMPLE_RATE_10GSPS = SAMPLE_RATE_10000MSPS
SAMPLE_RATE_1333MSPS_RECUR_DECIMAL = 0x000000C0UL
SAMPLE_RATE_2666MSPS_RECUR_DECIMAL = 0x000000C1UL
SAMPLE_RATE_USER_DEF = 0x00000040UL
User-defined sample rate. Used with external clock.
enum ALAZAR_CLOCK_EDGES
Clock edge identifiers.
Values:
CLOCK_EDGE_RISING = 0x00000000UL
Rising clock edge.
CLOCK_EDGE_FALLING = 0x00000001UL
Falling clock edge.
6.83 AlazarSetExternalClockLevel
Remark Only the following boards support this feature: ATS460, ATS660, ATS860,
ATS9350, ATS9351, ATS9352, ATS9353 ATS9440, ATS9462, ATS9625, ATS9626,
ATS9870, ATS9872.
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Board handle
• [in] level_percent: The external clock comparator level, in percent.
6.84 AlazarSetExternalTrigger
Parameters
• [in] handle: Board handle
• [in] couplingId: Specifies the external trigger coupling. See
ALAZAR_COUPLINGS for existing values. Consult board-specific infor-
mation to see which values are supported by each board.
• [in] rangeId: Specifies the external trigger range. See
ALAZAR_EXTERNAL_TRIGGER_RANGES for a list of all existing values.
Consult board-specific information to see which values are supported by
each board.
enum ALAZAR_EXTERNAL_TRIGGER_RANGES
External trigger range identifiers.
Values:
ETR_5V_50OHM = 0x00000000UL
5V-50OHM range
ETR_1V_50OHM = 0x00000001UL
1V-50OHM range
ETR_TTL = 0x00000002UL
TTL range.
ETR_2V5_50OHM = 0x00000003UL
2V5-50OHM range
ETR_5V_300OHM = 0x00000004UL
5V-300OHM range
6.85 AlazarSetLED
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Board handle
• [in] state: to put the LED in. Must be a member of ALAZAR_LED
enum ALAZAR_LED
LED state identifiers.
Values:
LED_OFF = 0x00000000UL
OFF LED.
LED_ON = 0x00000001UL
ON LED.
6.86 AlazarSetParameter
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Board handle
• [in] channel: The channel to control. See ALAZAR_CHANNELS for a list of
possible values. This parameter only takes unsigned 8-bit values.
• [in] parameter: The Parameter to modify. This can be one of
ALAZAR_PARAMETERS.
• [in] value: Parameter value
6.87 AlazarSetParameterLL
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Board handle
6.88 AlazarSetParameterUL
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Board handle
• [in] channel: The channel to control. See ALAZAR_CHANNELS for a list of
possible values. This parameter only takes unsigned 8-bit values.
• [in] parameter: The Parameter to modify. This can be one of
ALAZAR_PARAMETERS_UL.
• [in] value: Parameter value. See ALAZAR_PARAMETERS_UL for details
about valid values
6.89 AlazarSetRecordCount
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Remark The maximum number of records per capture is a function of the board type,
the maximum number of samples per channel (SPC), and the current number of
samples per record (SPR) :
• ATS850, ATS310, ATS330 : min(SPC / (SPR + 16), 10000)
• ATS460, ATS660, ATS9462 : min(SPC / (SPR + 16), 256000)
• ATS860, ATS9325, ATS935X : min(SPC / (SPR + 32), 256000)
• ATS9850, ATS9870 : min(SPC / (SPR + 64), 256000)
Note This function is part of the single-port API, and cannot be used in a dual-port
context.
Parameters
• [in] handle: Board handle
• [in] Count: The number of records to acquire to on-board memory during
the acquisition.
6.90 AlazarSetRecordSize
Remark The number of pre-trigger samples must not exceed the number of samples
per record minus 64.
Remark The number of samples per record is the sum of the pre- and post-trigger
samples. It must follow requirements specific to each board listed in the board-
specific documentation.
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Board handle
6.91 AlazarSetTriggerDelay
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Board handle
• [in] Delay: Trigger delay in sample clocks. Must be a value between 0 and
9 999 999. It must also be a multiple of a certain value that varies from one
board to another. See board-specific information to know which multiplier
must be respected.
6.92 AlazarSetTriggerOpera on
Remark The trigger level is specified as an unsigned 8-bit code that represents a frac-
tion of the full scale input voltage of the trigger source: 0 represents the negative
limit, 128 represents the 0 level, and 255 represents the positive limit. For ex-
ample, if the trigger source is CH A, and the CH A input range is ± 800 mV, then
0 represents a –800 mV trigger level, 128 represents a 0 V trigger level, and 255
represents +800 mV trigger level.
Remark If the trigger source is external, the full scale input voltage for the external
trigger connector is dictated by the AlazarSetExternalTrigger() function.
Remark All PCI Express boards except ATS9462 support only one external trig-
ger level. If both Source1 and Source2 are set to TRIG_EXTERNAL of
ALAZAR_TRIGGER_SOURCES, Level1 is ignored and only Level2 is used. All other
boards support using different values for the two levels.
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Board handle
• [in] TriggerOperation: Specify how the two independent trigger engines gen-
erate a trigger. This can be one of ALAZAR_TRIGGER_OPERATIONS
• [in] TriggerEngine1: First trigger engine to configure. Can be one of
ALAZAR_TRIGGER_ENGINES.
• [in] Source1: Signal source for the first trigger engine. Can be one of
ALAZAR_TRIGGER_SOURCES.
• [in] Slope1: Sign Direction of the trigger voltage slope that will generate a
trigger event for the first engine. Can be one of ALAZAR_TRIGGER_SLOPES.
• [in] Level1: Select the voltage level that the trigger signal must cross to gen-
erate a trigger event.
• [in] TriggerEngine2: Second trigger engine to configure. Can be one of
ALAZAR_TRIGGER_ENGINES.
• [in] Source2: Signal source for the second trigger engine. Can be one of
ALAZAR_TRIGGER_SOURCES.
• [in] Slope2: Sign Direction of the trigger voltage slope that will
generate a trigger event for the second engine. Can be one of
ALAZAR_TRIGGER_SLOPES.
• [in] Level2: Select the voltage level that the trigger signal must cross to gen-
erate a trigger event.
enum ALAZAR_TRIGGER_OPERATIONS
Trigger operation identifiers.
Values:
TRIG_ENGINE_OP_J = 0x00000000UL
The board triggers when a trigger event is detected by trigger engine J. Events
detected by engine K are ignored.
TRIG_ENGINE_OP_K = 0x00000001UL
The board triggers when a trigger event is detected by trigger engine K. Events
detected by engine J are ignored.
TRIG_ENGINE_OP_J_OR_K = 0x00000002UL
The board triggers when a trigger event is detected by any of the J and K trigger
engines.
TRIG_ENGINE_OP_J_AND_K = 0x00000003UL
This value is deprecated. It cannot be used.
TRIG_ENGINE_OP_J_XOR_K = 0x00000004UL
This value is deprecated. It cannot be used.
TRIG_ENGINE_OP_J_AND_NOT_K = 0x00000005UL
This value is deprecated. It cannot be used.
TRIG_ENGINE_OP_NOT_J_AND_K = 0x00000006UL
This value is deprecated. It cannot be used.
enum ALAZAR_TRIGGER_ENGINES
Trigger engine identifiers.
Values:
TRIG_ENGINE_J = 0x00000000UL
The J trigger engine.
TRIG_ENGINE_K = 0x00000001UL
The K trigger engine.
enum ALAZAR_TRIGGER_SOURCES
Trigger sources.
Values:
TRIG_CHAN_A = 0x00000000UL
Channel A.
TRIG_CHAN_B = 0x00000001UL
Channel B.
TRIG_EXTERNAL = 0x00000002UL
External trigger source.
TRIG_DISABLE = 0x00000003UL
Disabled trigger.
TRIG_CHAN_C = 0x00000004UL
Channel C.
TRIG_CHAN_D = 0x00000005UL
Channel D.
TRIG_CHAN_E = 0x00000006UL
Channel E.
TRIG_CHAN_F = 0x00000007UL
Channel F.
TRIG_CHAN_G = 0x00000008UL
Channel G.
TRIG_CHAN_H = 0x00000009UL
Channel H.
TRIG_CHAN_I = 0x0000000AUL
Channel I.
TRIG_CHAN_J = 0x0000000BUL
Channel J.
TRIG_CHAN_K = 0x0000000CUL
Channel K.
TRIG_CHAN_L = 0x0000000DUL
Channel L.
TRIG_CHAN_M = 0x0000000EUL
Channel M.
TRIG_CHAN_N = 0x0000000FUL
Channel N.
TRIG_CHAN_O = 0x00000010UL
Channel O.
TRIG_CHAN_P = 0x00000011UL
Channel P.
enum ALAZAR_TRIGGER_SLOPES
Trigger slope identifiers.
These identifiers select whether rising or falling edges of the trigger source signal are
detected as trigger events.
Values:
TRIGGER_SLOPE_POSITIVE = 0x00000001UL
The trigger engine detects a trigger event when sample values from the trigger
source rise above a specified level.
TRIGGER_SLOPE_NEGATIVE = 0x00000002UL
The trigger engine detects a trigger event when sample values from the trigger
source fall below a specified level.
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Remark AlazarSetTriggerOperationForScanning() is intended for scanning applica-
tions that supply both external clock and external trigger signals to the digitizer,
where the external clock is not suitable to drive the digitizer in between trigger
events.
Remark This function configures a board to use trigger operation
TRIG_ENGINE_OP_J, and the source of TRIG_ENGINE_J to be TRIG_EXTERNAL.
The application must call AlazarSetExternalTrigger() to set the full-scale external
input range and coupling of the external trigger signal connected to the TRIG IN
enum ALAZAR_STOS_OPTIONS
Options for AlazarSetExternalTriggerOperationForScanning()
Values:
STOS_OPTION_DEFER_START_CAPTURE = 1
6.94 AlazarSetTriggerTimeOut
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Parameters
• [in] handle: Board handle
• [in] timeout_ticks: The trigger timeout value in ticks. Tick are 10μs for all
boards, except for ATS9416 where they are 5µs. Pass 0 to make the board wait
forever for a trigger event.
6.95 AlazarSleepDevice
Parameters
• [in] handle: Handle to board
• [in] sleepState: Specifies the power state of the ADC converters. This
paramter can be one of ALAZAR_POWER_STATES.
enum ALAZAR_POWER_STATES
Power states.
Values:
POWER_OFF = 0x00000000UL
OFF.
POWER_ON = 0x00000001UL
ON.
6.96 AlazarStartCapture
Return ApiSuccess upon success, or an error code. See RETURN_CODE for more de-
tailed information.
Remark Only call on the master board in a master-slave system.
6.97 AlazarTriggered
Return If the board has received at least one trigger event since the last call to
AlazarStartCapture(), this function returns 1. Otherwise, it returns 0.
Note This function is part of the single-port data acquisition API. It cannot be used
with the dual-port AutoDMA APIs.
Parameters
• [in] handle: Board handle
6.98 AlazarWaitAsyncBufferComplete
Return If the timeout interval elapses before the board receives sufficient trigger
events to fill the buffer, the function returns ApiWaitTimeout.
Return If the board overflows its on-board memory, the function returns ApiBuffer-
Overflow. This happens if the rate at which data is acquired is faster than the rate
at which data is being transferred from on-board memory to host memory across
the host bus interface.
Return If this buffer was not found in the list of buffers available to be filled by the
board, the function returns ApiBufferNotReady.
Return If this buffer is not the buffer at the head of the list of buffers to be filled by
the board, this returns ApiDmaInProgress.
Return If the function fails for some other reason, it returns an error code that indi-
cates the reason that it failed. See RETURN_CODE for more information.
Remark You must call AlazarBeforeAsyncRead() and AlazarPostAsyncBuffer() before
calling AlazarWaitAsyncBufferComplete().
Warning You must call AlazarAbortAsyncRead() before your application exits if your
have called AlazarPostAsyncBuffer() and buffers are pending.
Parameters
• [in] handle: Handle to board
• [out] buffer: Pointer to a buffer to receive sample data form the digitizer
board
• [in] timeout_ms: The time to wait for the buffer to be filled, in milliseconds.
When AlazarWaitAsyncBufferComplete() returns ApiSuccess, the buffer is removed
from the list of buffers to be filled by the board.
The arrangement of sample data in each buffer depends on the AutoDMA mode spec-
ified in the call to AlazarBeforeAsyncRead().
6.99 AlazarWaitNextAsyncBufferComplete
Return If the board receives sufficient trigger events to fill the next available buffer
before the timeout interval elapses, and the buffer is not the last buffer in the
acquisition, the function returns ApiSuccess.
Return If the board receives sufficient trigger events to fill the next available buffer
before the timeout interval elapses, and the buffer is the last buffer in the acqui-
sition, the function returns ApiTransferComplete.
Return If the timeout interval elapses before the board receives sufficient trigger
events to fill the next available buffer, the function returns ApiWaitTimeout.
Return If the board overflows its on-board memory, the function returns ApiBuffer-
Overflow. The board may overflow its on-board memory because the rate at
which it is acquiring data is faster than the rate at which the data is being trans-
ferred from on-board memory to host memory across the host bus interface (PCI
or PCIe). If this is the case, try reducing the sample rate, number of enabled chan-
nels, or amount of time spent processing each buffer.
Return If the function fails for some other reason, it returns an error code that indi-
cates the reason that it failed.
Parameters
• [in] handle: Handle to board
• [out] buffer: Pointer to a buffer to receive sample data from the digitizer
board.
• [in] bytesToCopy: The number of bytes to copy into the buffer
• [in] timeout_ms: The time to wait for the buffer to buffer to be filled, in mil-
liseconds.
To discard buffers, set the bytesToCopy parameter to zero. This will cause AlazarWait-
NextAsyncBufferComplete() to wait for a buffer to complete, but not copy any data into
the application buffer.
To enable disk streaming using high-performance disk I/O functions, call AlazarCre-
ateStreamFile() before calling AlazarWaitNextAsyncBufferComplete(). For best perfor-
mance, set the bytesToCopy parameter to zero so that data is streamed to disk without
making any intermediate copies in memory.
AlazarBeforeAsyncRead() can be called with the ADMA_GET_PROCESSED_DATA flag.
In this case, AlazarWaitNextAsyncBuferComplete() will process buffers so that the
data layout is always not interleaved (i.e. R1A, R2A, … RnA, R1B, R2B, … RnB with
RXY record X of channel Y). This may simplify application development, but it comes
at the expense of added processing time for each buffer.
SEVEN
BOARD-SPECIFIC INFORMATION
187
ATS-SDK Documenta on, Release 7.5.0
ATS9416/50Ω ±1V
It is required for the value of samples per record to be above or equal to a given minimum
and to be a multiple of a certain value. These two requirements differ from board to board.
The following table lists the limits for all boards.
In addition, the number of pre-trigger samples for each board must be a multiple of a given
value.
Ac ve Channels
Board 1 ch. 2 ch. 4 ch. 8 ch. 16 ch.
ATS310 2 1
ATS330 2 1
ATS460 2 1
ATS660 2 1
ATS850 2 1
ATS860 4 2 1
ATS9120 8 4
ATS9130 8 4
ATS9146 8 4
ATS9350 8 4
ATS9351 8 4
ATS9360 16 8
ATS9370 16 8
ATS9371 16 8
ATS9373 16 8
ATS9416 16 8 4 2 1
ATS9440 4 2 1
ATS9462 2 1
ATS9625 2 1
ATS9626 2 1
ATS9870 16 8
AXI9870 16 8
ATS9352 8 4
ATS9353 8 4
ATS9872 4 4
ATS9628 4 4
When used as an output, the AUX I/O works on a clock that is generally slower than the sam-
ple clock. The ratio between the AUX I/O clock and the sample clock depends on the board
and on the number of active channels. For all boards except ATS9360, ATS9371, ATS9373
and ATS9416, the ratio is the same as that specified in Samples per timestamp and trigger
delay alignment. For ATS9360, ATS9371, ATS9373 and ATS9416, the AUX I/O is driven by a
free running clock of a frequency of 260 MHz. Please note that the frequency of this clock
may change from one board to another and from one firmware version to another.
ATS310, ATS9120 10kS/s, 20kS/s, 50kS/s, 100kS/s, 200kS/s, 500kS/s, 1MS/s, 2MS/s, 5MS/s,
10MS/s, 20MS/s
ATS330, ATS9130 10kS/s, 20kS/s, 50kS/s, 100kS/s, 200kS/s, 500kS/s, 1MS/s, 2MS/s, 5MS/s,
10MS/s, 25MS/s, 50MS/s
ATS460, ATS660, ATS9146 1kS/s, 2kS/s, 5kS/s, 10kS/s, 20kS/s, 50kS/s, 100kS/s, 200kS/s,
500kS/s, 1MS/s, 2MS/s, 5MS/s, 10MS/s, 20MS/s, 50MS/s, 100MS/s, 125MS/s
ATS850 10kS/s, 20kS/s, 50kS/s, 100kS/s, 200kS/s, 500kS/s, 1MS/s, 2MS/s, 5MS/s, 10MS/s,
25MS/s, 50MS/s
ATS860 1kS/s, 2kS/s, 5kS/s, 10kS/s, 20kS/s, 50kS/s, 100kS/s, 200kS/s, 500kS/s, 1MS/s, 2MS/s,
5MS/s, 10MS/s, 25MS/s, 50MS/s, 100MS/s, 125MS/s, 250MS/s
ATS9350, ATS9351 1kS/s, 2kS/s, 5kS/s, 10kS/s, 20kS/s, 50kS/s, 100kS/s, 200kS/s, 500kS/s,
1MS/s, 2MS/s, 5MS/s, 10MS/s, 20MS/s, 50MS/s, 100MS/s, 125MS/s, 250MS/s, 500MS/s
ATS9360 1kS/s, 2kS/s, 5kS/s, 10kS/s, 20kS/s, 50kS/s, 100kS/s, 200kS/s, 500kS/s, 1MS/s, 2MS/s,
5MS/s, 10MS/s, 20MS/s, 50MS/s, 100MS/s, 200MS/s, 500MS/s, 800MS/s, 1000MS/s,
1200MS/s, 1500MS/s, 1800MS/s
ATS9373 1kS/s, 2kS/s, 5kS/s, 10kS/s, 20kS/s, 50kS/s, 100kS/s, 200kS/s, 500kS/s, 1MS/s, 2MS/s,
5MS/s, 10MS/s, 20MS/s, 50MS/s, 100MS/s, 200MS/s, 500MS/s, 800MS/s, 1000MS/s
ATS9373 1kS/s, 2kS/s, 5kS/s, 10kS/s, 20kS/s, 50kS/s, 100kS/s, 200kS/s, 500kS/s, 1MS/s, 2MS/s,
5MS/s, 10MS/s, 20MS/s, 50MS/s, 100MS/s, 200MS/s, 500MS/s, 800MS/s, 1000MS/s,
1200MS/s, 1500MS/s, 2000MS/s, 2400MS/s, 3000MS/s, 3600MS/s, 4000MS/s
ATS9416 1MS/s, 2MS/s, 5MS/s, 10MS/s, 20MS/s, 50MS/s, 100MS/s
ATS9440 1kS/s, 2kS/s, 5kS/s, 10kS/s, 20kS/s, 50kS/s, 100kS/s, 200kS/s, 500kS/s, 1MS/s, 2MS/s,
5MS/s, 10MS/s, 20MS/s, 50MS/s, 100MS/s, 125MS/s
ATS9462 1kS/s, 2kS/s, 5kS/s, 10kS/s, 20kS/s, 50kS/s, 100kS/s, 200kS/s, 500kS/s, 1MS/s, 2MS/s,
5MS/s, 10MS/s, 20MS/s, 50MS/s, 100MS/s, 125MS/s, 160MS/s, 180MS/s
ATS9625, ATS9626, ATS9628 1kS/s, 2kS/s, 5kS/s, 10kS/s, 20kS/s, 50kS/s, 100kS/s, 200kS/s,
500kS/s, 1MS/s, 2MS/s, 5MS/s, 10MS/s, 20MS/s, 50MS/s, 100MS/s, 125MS/s, 250MS/s
ATS9870, AXI9870, ATS9872 1kS/s, 2kS/s, 5kS/s, 10kS/s, 20kS/s, 50kS/s, 100kS/s, 200kS/s,
500kS/s, 1MS/s, 2MS/s, 5MS/s, 10MS/s, 20MS/s, 50MS/s, 100MS/s, 250MS/s, 500MS/s,
1000MS/s
ATS9352, ATS9353 1kS/s, 2kS/s, 5kS/s, 10kS/s, 20kS/s, 50kS/s, 100kS/s, 200kS/s, 500kS/s,
1MS/s, 2MS/s, 5MS/s, 10MS/s, 20MS/s, 50MS/s, 100MS/s, 125MS/s, 250MS/s, 500MS/s
INTERNAL_CLOCK
ATS310, ATS330, ATS460, ATS660, ATS850, ATS860, ATS9350, ATS9351, ATS9360,
ATS9371, ATS9373, ATS9416, ATS9440, ATS9462, ATS9625, ATS9626, ATS9870,
AXI9870, ATS9120, ATS9130, ATS9352, ATS9353, ATS9146, ATS9872, ATS9628
FAST_EXTERNAL_CLOCK ATS310, ATS330, ATS460, ATS850, ATS860, ATS9146, ATS9352, ATS9353,
ATS9360, ATS9371, ATS9373, ATS9416, ATS9440
MEDIUM_EXTERNAL_CLOCK ATS460
SLOW_EXTERNAL_CLOCK ATS460, ATS660, ATS860, ATS9350, ATS9351, ATS9440, ATS9462,
ATS9870, AXI9870, ATS9352, ATS9353, ATS9146
EXTERNAL_CLOCK_AC ATS660, ATS9350, ATS9351, ATS9462, ATS9625, ATS9626, ATS9870,
AXI9870, ATS9628
EXTERNAL_CLOCK_DC ATS660, ATS9462
EXTERNAL_CLOCK_10_MHZ_REF
ATS660, ATS9350, ATS9351, ATS9360, ATS9371, ATS9373, ATS9416, ATS9440,
ATS9462, ATS9625, ATS9626, ATS9870, AXI9870, ATS9352, ATS9353, ATS9146,
ATS9872, ATS9628
Non-alphabe cal A
_ALAZAR_HEADER (C struct), 89 AC_COUPLING (C enumerator), 155
_ALAZAR_HEADER.hdr0 (C var), 89 ADC_MODE_DEFAULT (C enumerator), 143
_ALAZAR_HEADER.hdr1 (C var), 89 ADC_MODE_DES (C enumerator), 143
_ALAZAR_HEADER.hdr2 (C var), 89 ADMA_ALLOC_BUFFERS (C enumerator), 88
_ALAZAR_HEADER.hdr3 (C var), 89 ADMA_CONTINUOUS_MODE (C enumerator), 87
_HEADER0 (C struct), 89 ADMA_DSP (C enumerator), 89
_HEADER0.BoardNumber (C var), 90 ADMA_ENABLE_RECORD_FOOTERS (C enumerator),
_HEADER0.DataFormat (C var), 90 89
_HEADER0.SampleResolution (C var), 90 ADMA_ENABLE_RECORD_HEADERS (C enumerator),
_HEADER0.SerialNumber (C var), 90 88
_HEADER0.SystemNumber (C var), 90 ADMA_EXTERNAL_STARTCAPTURE (C enumerator),
_HEADER0.WhichChannel (C var), 90 88
_HEADER1 (C struct), 90 ADMA_FIFO_ONLY_STREAMING (C enumerator), 88
_HEADER1.BoardType (C var), 90 ADMA_GET_PROCESSED_DATA (C enumerator), 89
_HEADER1.RecordNumber (C var), 90 ADMA_INTERLEAVE_SAMPLES (C enumerator), 88
_HEADER2 (C struct), 90 ADMA_NPT (C enumerator), 87
_HEADER2.TimeStampLowPart (C var), 90 ADMA_TRADITIONAL_MODE (C enumerator), 87
_HEADER3 (C struct), 90 ADMA_TRIGGERED_STREAMING (C enumerator), 87
_HEADER3.ChannelATriggered (C var), 91 ALAZAR_ADC_MODES (C enum), 143
_HEADER3.ChannelBTriggered (C var), 91 ALAZAR_ADMA_FLAGS (C enum), 88
_HEADER3.ClockEdge (C var), 91 ALAZAR_ADMA_MODES (C enum), 87
_HEADER3.ClockSource (C var), 91 ALAZAR_API_TRACE_STATES (C enum), 141
_HEADER3.ExternalTriggered (C var), 91 ALAZAR_AUX_INPUT_LEVELS (C enum), 141
_HEADER3.InputCoupling (C var), 91 ALAZAR_AUX_IO_MODES (C enum), 95
_HEADER3.InputImpedance (C var), 91 ALAZAR_BOARD_OPTIONS_HIGH (C enum), 162
_HEADER3.InputRange (C var), 91 ALAZAR_BOARD_OPTIONS_LOW (C enum), 162
_HEADER3.SampleRate (C var), 91 ALAZAR_CAPABILITIES (C enum), 160
_HEADER3.ThisChannelTriggered (C var), 91 ALAZAR_CHANNELS (C enum), 151
_HEADER3.TimeOutOccurred (C var), 91 ALAZAR_CLOCK_EDGES (C enum), 170
_HEADER3.TimeStampHighPart (C var), 91 ALAZAR_CLOCK_SOURCES (C enum), 168
_NPTFooter (C struct), 122 ALAZAR_COPROCESSOR_DOWNLOAD_OPTIONS (C
_NPTFooter.aux_in_state (C var), 122 enum), 101
_NPTFooter.frameCount (C var), 122 ALAZAR_COUPLINGS (C enum), 155
_NPTFooter.recordNumber (C var), 122 ALAZAR_CRA_MODES (C enum), 98
_NPTFooter.triggerTimestamp (C var), 122 ALAZAR_CRA_OPTIONS (C enum), 98
ALAZAR_ECC_MODES (C enum), 140
195
ATS-SDK Documenta on, Release 7.5.0
T
TIMESTAMP_RESET_ALWAYS (C enumerator), 165
TIMESTAMP_RESET_FIRSTTIME_ONLY (C enumera-
tor), 165
TRIG_CHAN_A (C enumerator), 179
TRIG_CHAN_B (C enumerator), 179
TRIG_CHAN_C (C enumerator), 179
TRIG_CHAN_D (C enumerator), 179
TRIG_CHAN_E (C enumerator), 179
TRIG_CHAN_F (C enumerator), 179
TRIG_CHAN_G (C enumerator), 179
TRIG_CHAN_H (C enumerator), 179
TRIG_CHAN_I (C enumerator), 179
TRIG_CHAN_J (C enumerator), 179
TRIG_CHAN_K (C enumerator), 179
TRIG_CHAN_L (C enumerator), 179
TRIG_CHAN_M (C enumerator), 179
TRIG_CHAN_N (C enumerator), 180
TRIG_CHAN_O (C enumerator), 180
TRIG_CHAN_P (C enumerator), 180
TRIG_DISABLE (C enumerator), 179
TRIG_ENGINE_J (C enumerator), 179
TRIG_ENGINE_K (C enumerator), 179
TRIG_ENGINE_OP_J (C enumerator), 178
TRIG_ENGINE_OP_J_AND_K (C enumerator), 178
TRIG_ENGINE_OP_J_AND_NOT_K (C enumerator),
178
TRIG_ENGINE_OP_J_OR_K (C enumerator), 178
TRIG_ENGINE_OP_J_XOR_K (C enumerator), 178
TRIG_ENGINE_OP_K (C enumerator), 178
TRIG_ENGINE_OP_NOT_J_AND_K (C enumerator),
178
TRIG_EXTERNAL (C enumerator), 179
TRIGGER_SLOPE_NEGATIVE (C enumerator), 180
TRIGGER_SLOPE_POSITIVE (C enumerator), 180