ACQIRIS Programmers Reference Manual
ACQIRIS Programmers Reference Manual
ACQIRIS
PROGRAMMER’S
REFERENCE
MANUAL
The information in this document is subject to change without notice and may not be construed as in any
way as a commitment by Acqiris. While Acqiris makes every effort to ensure the accuracy and contents
of the document it assumes no responsibility for any errors that may appear.
All software described in the document is furnished under license. The software may only be used and
copied in accordance with the terms of license. Instrumentation firmware is thoroughly tested and thought
to be functional but it is supplied “as is” with no warranty for specified performance. No responsibility is
assumed for the use or the reliability of software, firmware or any equipment that is not supplied by
Acqiris SA or its affiliated companies.
Any versions of this manual which are supplied with a purchased product will be replaced at your request
with the latest revision in electronic format. At Acqiris we appreciate and encourage customer input. If
you have a suggestion related to the content of this manual or the presentation of information, please
contact your local Acqiris representative or Acqiris Technical Support ([email protected]) or come
visit our web site at http://www.acqiris.com.
Trademarks: product and company names listed are trademarks or trade names of their respective
companies
Tel: +41 22 884 33 90 Tel: 845 782 6544 Tel: +61 3 9888 4586
Fax: +41 22 884 33 99 Fax: 845 782 4745 Fax: +61 3 9849 0861
This icon to the left of text warns that an important point must be observed.
WARNING Denotes a warning, which advises you of precautions to take to avoid being electrically
shocked.
CAUTION Denotes a caution, which advises you of precautions to take to avoid electrical,
mechanical, or operational damages.
NOTE Denotes a note, which alerts you to important information.
Italic text denotes a warning, caution, or note.
Bold Italic text is used to emphasize an important point in the text or a note
mono text is used for sections of code, programming examples and operating system
commands.
Certain features are common to several different modules. For increased readability we have defined the
following families:
DC271-FAMILY DC135/DC140/DC211/DC211A/DC241/DC241A/
DC271/DC271A/DC271AR/DP214/DP235/DP240
AP-FAMILY AP240/AP235/AP100/AP101/AP200/AP201
12-bit-FAMILY DC440/DC438/DC436/DP310/DP308/DP306
10-bit-FAMILY DC122/DC152/DC222/DC252/DC282
1.5. Warranty
Please refer to the appropriate User Manual.
If important parameters supplied by the user (e.g. an instrumentID) are found to be invalid, most
functions do not execute and return an error code of the type VI_ERROR_PARAMETERi, where i = 1,
2,... corresponds to the argument number.
If the user attempts (with a function AcqrsD1_configXXXX) to set a digitizer parameter to a value
outside of its acceptable range, the function typically adapts the parameter to the closest allowed value
and returns ACQIRIS_WARN_SETUP_ADAPTED. The digitizer parameters that are actually in use
can be retrieved with the query functions AcqrsD1_getXXXX.
Data are always returned through pointers to user-allocated variables or arrays.
Some parameters are labeled "Currently ignored". It is recommended to supply the value "0" (ViInt32)
or "0.0" (ViReal64) in order to be compatible with future products that may offer additional
functionality.
2.3.1 AcqrsD1_accumulateData
Purpose
Returns a waveform as an array and accumulates it in a client array.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
channel ViInt32 1...Nchan
readPar AqReadParameters Requested parameters for the acquired waveform.
Output
Name Type Description
dataArray ViAddr User-allocated waveform destination array of type char
or byte. Its size in dataType units MUST be at least
'nbrSamples' + 32, for reasons of data alignment.
sumArray ViInt32 [ ] User-allocated waveform accumulation array. Its size
MUST be at least 'nbrSamples'. It is a 32-bit integer
(long) array, with the sample-by-sample sum of the
data values in ADC count unit (LSB). See discussion
below.
dataDesc AqDataDescriptor Waveform descriptor structure.
segDescArray ViAddr Segment descriptor structure.
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
This function uses the AcqrsD1_readData routine. However, only 'readPar->nbrSegments = 1'
and 'readPar->readMode = 0' (ReadModeStdW) are supported. 'readPar->dataType = 3' (real)
and 'readPar->dataType = 2' (long) are NOT supported.
The sumArray contains the sample-by-sample sums. To get the average values, the array
elements must be divided by the number of accumulations performed. The sumArray can be
interpreted as an unsigned integer. Alternatively, negative values have to be increased by 2**32.
The number of acquisitions, nbrAcq, can be at most 16777216 for 'readPar->dataType = 0' (char)
or 65536 for 'readPar->dataType = 1' (short). This is to avoid an overflow where the summed
values will wrap around 0.
The value in Volts of a data point data in the returned dataArray can be computed with the
formula:
LabVIEW Representation
AqDx Accumulate Data.vi
This Vi is polymorphic, the sample data is returned in an array of type I8 or I16.
Purpose
Returns a waveform as a byte (8-bit integer) array and accumulates it in a client array. This
routine is for use with 8-bit Digitizers.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
channel ViInt32 1...Nchan
segmentNumber ViInt32 Requested segment number, may assume 0 to the
(number of segments – 1) set with the function
AcqrsD1_configMemory.
firstSample ViInt32 Requested position of first sample to read, typically 0.
May assume 0 to the (number of samples – 1) set with
the function AcqrsD1_configMemory.
nbrSamples ViInt32 Requested number of samples, may assume 1 to the
number of samples set with the function
AcqrsD1_configMemory.
Output
Name Type Description
waveformArray ViChar [ ] User-allocated waveform destination array of type char
or byte. Its size MUST be at least 'nbrSamples' + 32,
for reasons of data alignment.
sumArray ViInt32 [ ] User-allocated waveform accumulation array. Its size
MUST be at least 'nbrSamples'. It is a 32-bit integer
(long) array, with the sample-by-sample sum of the
data values in ADC count unit (LSB). See discussion
below.
returnedSamples ViInt32 Number of data samples actually returned
sampTime ViReal64 Sampling interval in seconds
vGain ViReal64 Vertical gain in Volts/LSB. See discussion below.
vOffset ViReal64 Vertical offset in Volts. See discussion below.
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
The sumArray contains the sample-by-sample sums. To get the average values, the array
elements must be divided by the number of accumulations performed.
The value in Volts of a data point data in the returned waveformArray can be computed with
the formula:
LabVIEW Representation
AqDx Read Accumulated Waveform.vi should be considered as obsolete.
Please use AqDx Accumulate Data.vi instead.
Purpose
Checks if the acquisition has terminated.
Parameters
Input
Name Type Description
InstrumentID ViSession Instrument identifier
Output
Name Type Description
Done ViBoolean done = VI_TRUE if the acquisition is terminated
VI_FALSE otherwise
Return Value
Name Type Description
Status ViStatus Refer to Table 2-1 for error codes.
LabVIEW Representation
AqDx Query Acquisition Status.vi
Purpose
Starts an acquisition.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
LabVIEW Representation
AqDx Start Acquisition.vi
[status]= Aq_acquire(instrumentID)
Purpose
Starts an acquisition.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
acquireMode ViInt32 = 0, normal
= 2, continue to accumulate (AP Averagers only)
acquireFlags ViInt32 = 0, normal
= 4, to reset the time stamp counter (10-bit-Family
only)
acquireParams ViInt32 Parameters, currently not used
reserved ViInt32 Currently not used
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
LabVIEW Representation
AqDx Start Acquisition.vi
Purpose
This function is intended for single instrument, single channel operation.
Perform a series of acquisitions and get the resulting averaged waveform.
Parameters
Input
Name Type Description
InstrumentID ViSession Instrument identifier
Channel ViInt32 1...Nchan
readPar AqReadParameters Requested parameters for the acquired waveform
nbrAcq ViInt32 Number of acquisitions to be performed.
calculateMean ViBoolean TRUE to divide the sumArray by nbrAcq to get the
mean values.
FALSE to leave the sample-by-sample sums in the
sumArray.
timeout ViReal64 Acquisition timeout in seconds. The function will
return an error if, for each acquisition, no trigger
arrives within the specified timeout after the start of the
acquisition.
The minimum value is 1 ms.
Output
Name Type Description
dataArray ViAddr User-allocated waveform destination array of type char
or byte. Its size in dataType units MUST be at least
'nbrSamples' + 32, for reasons of data alignment.
sumArray ViInt32 [ ] User-allocated waveform accumulation array. Its size
MUST be at least 'nbrSamples'. It is a 32-bit integer
(long) array, with the sample-by-sample sum of the
data values in ADC count unit (LSB). See discussion
below.
dataDesc AqDataDescriptor Waveform descriptor structure. The returned values
will be those of the last acquisition
segDescArray ViAddr Segment descriptor structure. The returned values will
be those of the last acquisition.
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
This function uses the AcqrsD1_readData routine. However, only 'readPar->nbrSegments = 1'
and 'readPar->readMode = 0' (ReadModeStdW) are supported. 'readPar->dataType = 3' (real)
and 'readPar->dataType = 2' (long) are NOT supported.
The sumArray contains either the average values (calculateMean = TRUE), or the sample-by-
sample sums (calculateMean = FALSE). Note that, in the latter case, the sumArray can be
interpreted as an unsigned integer. Alternatively, negative values have to be increased by 2**32.
The number of acquisitions, nbrAcq, can be at most 16777216 for 'readPar->dataType = 0' (char)
or 65536 for 'readPar->dataType = 1' (short). This is to avoid an overflow where the summed
values will wrap around 0.
The value in Volts of a data point data in the returned waveformArray or normalized
sumArray can be computed with the formula:
LabVIEW Representation
AqDx Averaged Data.vi
This Vi is polymorphic, the sample data is returned in an array of type I8 or I16.
Purpose
This function is intended for single instrument, single channel operation. It is for use with 8-bit
Digitizers.
Perform a series of acquisitions and get the resulting averaged waveform.
Parameters
Input
Name Type Description
InstrumentID ViSession Instrument identifier
Channel ViInt32 1...Nchan
SegmentNumber ViInt32 Requested segment number, may assume 0 to the
(number of segments – 1) set with the function
AcqrsD1_configMemory.
firstSample ViInt32 Requested position of first sample to read, typically 0.
May assume 0 to the (number of samples – 1) set with
the function AcqrsD1_configMemory.
nbrSamples ViInt32 Requested number of samples, may assume 1 to the
number of samples set with the function
AcqrsD1_configMemory.
nbrAcq ViInt32 Number of acquisitions to be performed.
timeout ViReal64 Acquisition timeout in seconds. The function will
return an error if, for each acquisition, no trigger
arrives within the specified timeout after the start of the
acquisition.
The minimum value is 1 ms.
Output
Name Type Description
waveformArray ViChar [ ] User-allocated waveform destination array of type char
or byte. Its size MUST be at least 'nbrSamples' + 32,
for reasons of data alignment.
sumArray ViInt32 [ ] User-allocated waveform accumulation array. Its size
MUST be at least 'nbrSamples'. It is a 32-bit integer
(long) array, with the sample-by-sample sum of the
data values in ADC count unit (LSB). See discussion
below.
returnedSamples ViInt32 Number of data samples actually returned
sampTime ViReal64 Sampling interval in seconds
vGain ViReal64 Vertical gain in Volts/LSB. See discussion below.
vOffset ViReal64 Vertical offset in Volts. See discussion below.
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
The sumArray contains the sample-by-sample sums. To get the average values, the array
elements must be divided by nbrAcq.
The value in Volts of a data point data in the returned waveformArray can be computed with
the formula:
LabVIEW Representation
AqDx Read Averaged Waveform.vi should be considered to be obsolete.
Please use AqDx Averaged Data.vi instead.
Purpose
Helper function to simplify digitizer configuration. It returns the maximum nominal number of
samples that fit into the available memory.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
Output
Name Type Description
nomSamples ViInt32 Maximum number of data samples available
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
When using this method, make sure to use AcqrsD1_configHorizontal and
AcqrsD1_configMemory beforehand to set the sampling rate and the number of segments to the
desired values (nbrSamples in AcqrsD1_configMemory may be any number!).
AcqrsD1_bestNominalSamples depends on these variables.
LabVIEW Representation
AqDx Query Best Nominal Samples.vi
Purpose
Helper function to simplify digitizer configuration. It returns the best possible sampling rate for
an acquisition, which covers the timeWindow with no more than maxSamples. The calculation
takes into account the current state of the instrument, in particular the requested number of
segments. In addition, this routine returns the "real" nominal number of samples that can be
accommodated (it is computed as timeWindow/samplingInterval!).
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
maxSamples ViInt32 Maximum number of samples to be used
timeWindow ViReal64 Time window to be covered, in seconds
Output
Name Type Description
sampInterval ViReal64 Recommended sampling interval in seconds
nomSamples ViInt32 Recommended number of data samples
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
The function returns the value status = ACQIRIS_ERROR_SETUP_NOT_AVAILABLE when
the available memory is too short, and the longest available sampling interval too short. The
returned sampling interval is the longest one possible. It returns VI_SUCCESS when a good
solution has been found.
NOTE: This function does not modify the state of the digitizer at all. It simply returns a
recommendation that the user is free to override.
NOTE: When using this method, make sure to use AcqrsD1_configMemory beforehand to set
the number of segments to the desired value (nbrSamples may be any number!).
AcqrsD1_bestSampInterval depends on this variable.
NOTE: The returned "recommended" values for the sampling interval sampInterval and the
nominal number of samples nomSamples are expected to be used for configuring the instrument
with calls to AcqrsD1_configMemory and AcqrsD1_configHorizontal. Make sure to use the
same number of segments in this second call to AcqrsD1_configMemory, as in the first one.
LabVIEW Representation
AqDx Query Best Sampling Interval.vi
Visual Representation
Purpose
Performs an auto-calibration of the instrument.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
LabVIEW Representation
AqDx Calibrate Instrument.vi
[status]= Aq_calibrate(instrumentID)
Purpose
Performs a (partial) auto-calibration of the instrument.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
calType ViInt32 = 0 calibrate the entire instrument
= 1 calibrate only the current channel configuration
= 2 calibrate external clock timing. Requires operation
in External Clock (Continuous).
= 3 calibrate only at the current frequency
(12-bit-FAMILY, only)
= 4 fast calibration for current settings only
modifier ViInt32 For calType = 0,1, or 2: Currently unused, set to “0”
For calType = 3 or 4, 0 = calibrate for all channels
n = calibrate for channel "n"
flags ViInt32 Currently unused, set to “0”
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
Calling this function with calType = 0 is equivalent to calling AcqrsD1_calibrate.
Calibrating with calType = 1 reduces the calibration time in digitizers with many possible
channel combinations, e.g. the DC271. However, the user must keep track of which channel
combinations were calibrated, and request another such partial calibration when changing the
channel configuration with the function AcqrsD1_configChannelCombination.
Calibrating with calType = 2 can only be done if the external input frequency is appropriately
high. See the discussion in the Programmer's Guide section 3.14.2, External Clock
(Continuous). If the calibration cannot be done an error code will be returned. It is not
applicable for AP240 Signal Analyzer Platforms.
Calibrating with calType = 3 is for 12-bit digitizers only and is needed to support the HRes SR
functionality. For best results it, or the longer full calibration, should be called after a change of
sampling rate.
Calibrating with calType = 4 is for DC135, DC140, DC211A, DC241A, DC271A, DC271AR
and 10-bit-FAMILY models. A new calibration should be done if the AcqrsD1_
configChannelCombination parameters or any of the following AcqrsD1_configVertical
parameters are changed: fullScale, coupling (impedance), bandwidth, channel. This calibration
will be much faster than the calType = 0 case for models with more than one impedance setting.
LabVIEW Representation
AqDx CalibrateEx Instrument.vi
Purpose
Closes an instrument.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
Return Value
Name Type Description
Status ViStatus Refer to Table 2-1 for error codes.
Discussion
Close the specified instrument. Once closed, this instrument is not available anymore and needs to be
reenabled using 'InitWithOptions' or 'init'.
For freeing properly all resources, 'closeAll' must still be called when the application closes, even if 'close'
was called for each instrument.
LabVIEW Representation
AqDx Close.vi
[status]= Aq_close(instrumentID)
Purpose
Closes all instruments in preparation for closing the application.
Return Value
Name Type Description
Status ViStatus Refer to Table 2-1 for error codes.
Discussion
This function should be the last call to the driver, before closing an application. Make sure to
stop all instruments beforehand.
If this function is not called, closing the application might crash the computer in some situations,
particularly in multi-threaded applications.
LabVIEW Representation
AqDx Close All Instruments.vi
CloseAll ( ) As Long
AcqrsD1_closeAll ( ) As Int32
[status]= Aq_closeAll()
Purpose
Configures a parameter for averager/analyzer operation.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
channelNbr ViInt32 Channel number. A value = 0 will be treated as =1 for
compatibility.
parameterString ViString Character string defining the requested parameter.
See below for the list of accepted strings.
value ViAddr Value to set. ViAddr resolves to void* in C/C++. The
user must allocate the appropriate variable type (as listed
below), set it to the requested value and supply its address
as 'value'.
Return Value
Name Type Description
Status ViStatus Refer to Table 2-1 for error codes.
The channelNbr is used to designate the channel number for those parameters whose values can
be different for the two channels of an AP240/AP235 in dual-channel mode. These parameters
are indicated in bold in the list above.
If P1Control and/or P2Control are enabled for the Add/Subtract mode then the data will be added
if the signal, or the or of both signals, is in the high state. The same rule holds if they are used for
trigger enable.
The P1Control/P2Control "average (out)" signal goes high after the first trigger is accepted for
an average and drops back down when the last trigger's acquition is complete.
Example
long channelNbr = 0, dither = 8;
AcqrsD1_configAvgConfig(ID, channelNbr, "DitherRange", &dither);
This function sets the dithering range to ± 8 LSB’s.
Note that this function takes the address, not the value of the parameter to be set.
LabVIEW Representation
AqDx Extended Configure Averager.vi
This Vi is polymorphic, the value can be either I32 or DBL.
Purpose
Configures how many converters are to be used for which channels. This routine is for use with
some DC271-FAMILY instruments, the 10-bit-FAMILY, the AC/SC240, and the AP240/AP235
Signal Analyzer platforms.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
nbrConvertersPer ViInt32 = 1 all channels use 1 converter each (default)
Channel = 2 half of the channels use 2 converters each
= 4 1/4 of the channels use 4 converters each
usedChannels ViInt32 bit-field indicating which channels are used. See
discussion below
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
The acceptable values for 'usedChannels' depend on 'nbrConvertersPerChannel' and on the
number of available channels in the digitizer:
A) If 'nbrConvertersPerChannel' = 1, 'usedChannels' must reflect the fact that ALL channels are
available for use. It accepts a single value for a given digitizer:
'usedChannels' = 0x00000001 if the digitizer has 1 channel
= 0x00000003 if the digitizer has 2 channels
= 0x0000000f if the digitizer has 4 channels
B) If 'nbrConvertersPerChannel' = 2, 'usedChannels' must reflect the fact that only half of the
channels may be used:
'usedChannels' = 0x00000001 use channel 1 on a 2-channel digitizer
= 0x00000002 use channel 2 on a 2-channel digitizer
= 0x00000003 use channels 1+2 on a 4-channel digitizer
= 0x00000005 use channels 1+3 on a 4-channel digitizer
= 0x00000009 use channels 1+4 on a 4-channel digitizer
= 0x00000006 use channels 2+3 on a 4-channel digitizer
= 0x0000000a use channels 2+4 on a 4-channel digitizer
= 0x0000000c use channels 3+4 on a 4-channel digitizer
C) If 'nbrConvertersPerChannel' = 4, 'usedChannels' must reflect the fact that only 1 of the
channels may be used:
'usedChannels' = 0x00000001 use channel 1 on a 4-channel digitizer
= 0x00000002 use channel 2 on a 4-channel digitizer
= 0x00000004 use channel 3 on a 4-channel digitizer
= 0x00000008 use channel 4 on a 4-channel digitizer
NOTE: Digitizers which don't support channel combination, always use the default
'nbrConvertersPerChannel' = 1, and the single possible value of 'usedChannels'
NOTE: Changing the channel combination doesn't change the names of the channels; they are
always the same.
NOTE: If digitizers are combined with ASBus, the channel combination applies equally to
all participating digitizers.
LabVIEW Representation
AqDx Configure Channel Combination.vi
[status]= Aq_configChannelCombination(instrumentID,
nbrConvertersPerChannel, usedChannels)
Purpose
Configures a ControlIO connector. (For DC271-FAMILY/AP-FAMILY/12-bit-FAMILY/10-bit
FAMILY and AC/SC only)
Parameters
Input
Name Type Description
InstrumentID ViSession Instrument identifier
Connector ViInt32 Connector Number
1 = Front Panel I/O A (MMCX connector)
2 = Front Panel I/O B (MMCX connector)
9 = Front Panel Trigger Out (MMCX connector)
11 = PXI Bus 10 MHz (DC135/DC140/DC211/
DC211A/DC241/DC241A/DC271/DC271A/
DC271AR)
12 = PXI Bus Star Trigger (same models as above)
Signal ViInt32 The accepted values depend on the type of connector
See the table below for details.
qualifier1 ViInt32 The accepted values depend on the type of connector
See the table below for details.
qualifier2 ViReal64 If trigger veto functionality is available (AP101/AP201
only), accepts values between 30 ns and 1.0 sec. The
trigger veto values given will be rounded off to steps of
33 ns. A value of 0.0 means that no holdoff is required
and no Prepare for Trigger signal will be needed.
Return Value
Name Type Description
Status ViStatus Refer to Table 2-1 for error codes.
Outputs:
19 = (Clock) 10 MHz reference clock
20 = (Pulse) Acquisition skips to next segment (in sequence
acquisition mode) input
(Not for AP240/AP235 Signal Analyzers).
21 = (Level) Acquisition is active
22 = (Level) Trigger is armed (ready)
The values of qualifier1 and qualifier2 are not used
Discussion
ControlIO connectors are front panel IO connectors for special purpose control functions of the
digitizer. Typical examples are user-controlled acquisition control (start/stop/skip) or control
output signals such as ‘acquisition ready’ or ‘trigger ready’.
The connector numbers are limited to the allowed values. To find out which connectors are
supported by a given module, use the query function AcqrsD1_getControlIO.
The variable signal specifies the (programmable) use of the specified connector.
In order to set I/O A as a ‘Enable Trigger’ input and the I/O B as a 10 MHz reference output, use
the function calls
AcqrsD1_configControlIO(instrID, 1, 6, 0, 0.0);
AcqrsD1_configControlIO(instrID, 2, 19, 0, 0.0);
In order to obtain a signal offset of +1.5 V on the Trigger Output, use the call
AcqrsD1_configControlIO(instrID, 9, 1500, 0, 0.0);
LabVIEW Representation
AqDx Configure Control IO Connectors.vi
Purpose
Configures the external clock of the digitizer.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
clockType ViInt32 = 0 Internal Clock (default at start-up)
= 1 External Clock, continuously running
= 2 External Reference (10 MHz)
= 4 External Clock, with start/stop sequence
inputThreshold ViReal64 Input threshold for external clock or reference in mV
delayNbrSamples ViInt32 Number of samples to acquire after trigger (for
digitizers using 'clockType' = 1 only!)
inputFrequency ViReal64 The input frequency of the external clock, for
clockType = 1 only
sampFrequency ViReal64 The desired Sampling Frequency, for clockType = 1
only
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
When clockType is set to 1 or 4, the parameters of the function AcqrsD1_configHorizontal are
ignored! Please refer to your product User Manual, for the conditions on the clock signals, and to
the Programmer’s Guide section 3.14, External Clock, for the setup parameters and the theory
of operation.
LabVIEW Representation
AqDx Configure External Clock.vi
Purpose
Configures a frequency counter measurement
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
signalChannel ViInt32 Signal input channel
type ViInt32 Type of measurement
= 0 Frequency (default)
= 1 Period (1/frequency)
= 2 Totalize by Time
= 3 Totalize by Gate
targetValue ViReal64 User-supplied estimate of the expected value, may be
0.0 if no estimate is available.
apertureTime ViReal64 Time in sec, during which the measurement is
executed, see discussion below.
reserved ViReal64 Currently ignored
flags ViInt32 Currently ignored
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
The Frequency mode (type = 0) measures the frequency of the signal applied to the selected
‘signalChannel’ during the aperture time. The default value of ‘apertureTime’ is 0.001 sec and
can be set to any value between 0.001 and 1000.0 seconds. A longer aperture time may improve
the measurement accuracy, if the (externally applied) reference clock has a high accuracy and/or
if the signal slew rate is low.
The ‘targetValue’ is a user-supplied estimated of the expected result, and helps in choosing the
optimal measurement conditions. If the supplied value is < 1000.0, and > 0.0, then the instrument
will not use the HF trigger mode to divide the input frequency. Otherwise, it divides it by 4 in
order to obtain a larger frequency range.
The Period mode (type = 1) is equal to the frequency mode, but the function
AcqrsD1_readFCounter returns the inverse of the measured frequency. If the ‘targetValue’ is <
0.001 (1 ms), then the instrument will not use the HF trigger mode, otherwise it does.
The Totalize by Time mode (type = 2) counts the number of pulses in the signal applied to the
selected ‘signalChannel’ during the time defined by ‘apertureTime’. The ‘targetValue’ is
ignored.
The Totalize by Gate mode (type = 3) counts the number of pulses in the signal applied to the
selected ‘signalChannel’ during the time defined by signal at the I/O A or I/O B inputs on the
front panel. The gate is open while the signal is high, and closed while the signal is low (if no
signal is connected, counting will be enabled, since there is an internal pull-up resistor). The gate
may be opened/closed several times during the measurement. The measurement must be
terminated with the function AcqrsD1_stopAcquisition.
LabVIEW Representation
AqDx Configure FCounter.vi
Purpose
Configures the horizontal control parameters of the digitizer.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
sampInterval ViReal64 Sampling interval in seconds
delayTime ViReal64 Trigger delay time in seconds, with respect to the
beginning of the record. A positive number
corresponds to a trigger before the beginning of the
record (post-trigger recording). A negative number
corresponds to pre-trigger recording. It can’t be less
than -(sampInterval * nbrSamples), which corresponds
to 100% pre-trigger.
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
Refer to the Programmer’s Guide section 3.10, Trigger Delay and Horizontal Waveform
Position, for a detailed discussion of the value delayTime.
LabVIEW Representation
AqDx Configure Horizontal Settings.vi
Purpose
Configures (programs) on-board logic devices, such as user-programmable FPGA’s.
NOTE: With the exception of AC and SC Analyzers, this function now needs to be used only by
ETS and VxWorks users to specify the filePath for FPGA .bit files. Otherwise it should no
longer have to be used
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
deviceName ViChar [ ] Identifies which device to program
For the AC210/AC240 and SC210/SC240 modules
this string must be "Block1Dev1". Alternatively it can
be "ASBUS::n::Block1Dev1" with n ranging from 0
to the number of modules -1.
When clearing the FPGA’s, the string must be
"Block1DevAll".
filePathName ViChar [ ] File path and file name
flags ViInt32 flags, may be:
0 = program logic device with data in the file
“filePathName”
1 = clear the logic device
2 = set path where FPGA .bit files can be found
3 = 0 + use normal search order with AqDrv4.ini file
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
With flags = 2 in ETS or VxWorks systems, the filePathName must point to a directory
containing the FPGA configuration files with extension ‘.bit’
With flags = 0 or 3, the filePathName must point to an FPGA configuration file with extension
‘.bit’, e.g. “D:\Averagers\FPGA\AP100DefaultFPGA1.bit”.
For more details on programming on-board logic devices, please refer to the Programmer’s
Guide sections 3.2, Device Initialization and 3.3, Device Configuration.
LabVIEW Representation
AqDx Configure Logic Device.vi
Purpose
Configures the memory control parameters of the digitizer.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
nbrSamples ViInt32 Nominal number of samples to record (per segment!)
nbrSegments ViInt32 Number of segments to acquire. 1 corresponds to the
normal single-trace acquisition mode.
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
LabVIEW Representation
AqDx Configure Memory Settings.vi
Purpose
Extended configuration of the memory control parameters of the digitizer.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
nbrSamplesHi ViUInt32 Must be set to 0 (reserved for future use)
nbrSamplesLo ViUInt32 Nominal number of samples to record (per segment!)
nbrSegments ViInt32 Number of segments to acquire. 1 corresponds to the
normal single-trace acquisition mode.
nbrBanks ViInt32 Must be set to 1 (reserved for future use)
flags ViInt32 = 0 default memory use
= 1 force use of internal memory (for 10-bit-FAMILY
digitizers with extended memory options only).
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
This routine is needed to access the new features of some of the 10-bit-FAMILY digitizers.
In an instrument equipped with external memory, flags = 1 will force the use of internal memory
which give a lower dead time between segments of a sequence acquisition.
LabVIEW Representation
AqDx Configure Extended Memory Settings.vi
Purpose
Configures the operational mode of Averagers and Analyzers. It doesn’t apply to digitizers.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
mode ViInt32 0 = normal data acquisition
2 = averaging mode (only in real-time averagers)
3 = buffered data acquisition (only in AP101/AP201
analyzers)
5 = AdvancedTDC mode for Analyzers with this
option.
6 = frequency counter mode
7 = AP235/AP240-SSR mode
modifier ViInt32 Currently not used, set to 0
flags ViInt32 If ‘mode’ = 0, this variable can take these values:
0 = ‘normal’ (default value)
1 = ‘Start on Trigger’ mode
2 = ‘Sequence Wrap’ mode
Return Value
Name Type Description
Status ViStatus Refer to Table 2-1 for error codes.
Discussion
Most digitizers only permit the default mode = 0. Real-time averagers support the normal data
acquisition mode (0) and the averager mode (2). The analyzers (digitizers with buffered
acquisition memory) (AP101/AP201 and AP235/AP240 with SSR) support both the normal data
acquisition mode (0) and the buffered mode (3).
The normal data acquisition mode (0) supports the following submodes:
• flags = 1: ‘StartOnTrigger’ mode, whereby data recording only begins after the receipt
of a valid trigger. For details, see Programmer’s Guide section 3.16, Special
Operating Modes.
The buffered data acquisition mode (3) and the SSR mode (7) have the following differences
from the default mode (0):
• The functions AcqrsD1_readData(): In mode 0, they return the last acquired waveform
from the normal acquisition memory, whereas in mode 3, they return data from a memory
bank (opposite to what is defined by flags).
LabVIEW Representation
AqDx Configure Operation Mode.vi
Purpose
Selects the active input when there are multiple inputs on a channel. It is useful for Averagers,
Analyzers, and some digitizer models.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
channel ViInt32 1...Nchan
input ViInt32 = 0 set to input connection A
= 1 set to input connection B
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
This function is only of use for instruments with an input-multiplexer (i.e. more than 1 input per
digitizer, e.g. DP211). On the "normal" instruments with a single input per channel, this function
may be ignored.
LabVIEW Representation
AqDx Configure Multiplexer Input.vi
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
channel ViInt32 1...Nchan
setupType ViInt32 Type of setup.
0 = GateParameters
nbrSetupObj ViInt32 Number of setup objects in the array
setupData ViAddr Pointer to an array containing the setup objects
ViAddr resolves to void* in C/C++. The user must
allocate the appropriate variable type and supply its
address as ‘setupData’.
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
GateParameters
Discussion
The user has to take care to allocate sufficient memory for the setupData. nbrSetupObj should not be
higher than what the allocated setupData holds.
The SSR option allows up to 4095 gate definitions. The AP101/AP201 analyzers are limited to 64 gate
definitions.
Note: The driver contains a set of 4095(64) default AqGateParameters, defined as { {0,256} {256, 256}
{512, 256} {768, 256} ... }.
LabVIEW Representation
Purpose
Configures the trigger class control parameters of the digitizer.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
trigClass ViInt32 =0 edge trigger
=1 TV trigger (12-bit-FAMILY External only)
sourcePattern ViInt32 = 0x000n0001 for Channel 1,
= 0x000n0002 for Channel 2,
= 0x000n0004 for Channel 3,
= 0x000n0008 for Channel 4 etc.
= 0x800n0000 for External Trigger 1,
= 0x400n0000 for External Trigger 2 etc.
where n is 0 for single instruments, or the module
number for MultiInstruments (ASBus operation). See
discussion below.
validatePattern ViInt32 Currently ignored
HoldType ViInt32 Currently ignored
holdValue1 ViReal64 Currently ignored
holdValue2 ViReal64 Currently ignored
Return Value
Name Type Description
Status ViStatus Refer to Table 2-1 for error codes.
Discussion
The number of internal (i.e. channel) or external trigger sources of the instrument can be
retrieved with the AcqrsD1_getInstrumentInfo function.
For more details on the trigger source pattern in ASBus-connected MultiInstruments, please refer
to the Programmer’s Guide section 3.15.2, Trigger Source Numbering with ASBus.
LabVIEW Representation
AqDx Configure Trigger Class.vi
Purpose
Configures the trigger source control parameters for the specified trigger source (channel or
External).
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
channel ViInt32 = 1...(Number of IntTrigSources) for internal sources
= -1..-(Number of ExtTrigSources) for external sources
See discussion below.
trigCoupling ViInt32 = 0 DC
= 1 AC
= 2 HF Reject (if available)
= 3 DC, 50 Ω (ext. trigger only, if available)
= 4 AC, 50 Ω (ext. trigger only, if available)
trigSlope ViInt32 = 0 Positive
= 1 Negative
= 2 out of Window
= 3 into Window
= 4 HF divide
= 5 Spike Stretcher
trigLevel1 ViReal64 Trigger threshold in % of the vertical Full Scale of the
channel, or in mV if using an External trigger source.
See discussion below.
trigLevel2 ViReal64 Trigger threshold 2 (as above) for use when Window
trigger is selected
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
The number of internal (i.e. channel) or external trigger sources of the instrument can be
retrieved with the AcqrsD1_getInstrumentInfo function.
The allowed range for the trigger threshold depends on the model and the channel chosen. See
your product User Manual.
NOTE: Some of the possible states may be unavailable in some digitizers. In particular, the
trigCoupling choices of ‘DC, 50 Ω’ and ‘AC, 50 Ω’ are only needed for modules that have both
50 Ω and 1 MΩ external input impedance possibilities.
Purpose
Configures the TV trigger parameters (12-bit-FAMILY only).
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
channel ViInt32 = -1..-(Number of ExtTrigSources) for external sources
See discussion below.
standard ViInt32 = 0 625/50/2:1 (PAL or SECAM)
= 2 525/60/2:1 (NTSC)
field ViInt32 = 1 Field 1 - odd
= 2 Field 2 - even
line ViInt32 = line number, depends on the parameters above:
For 'standard' = 625/50/2:1
= 1 to 313 for 'field' = 1
= 314 to 625 for 'field' = 2
For 'standard' = 525/60/2:1
= 1 to 263 for 'field' = 1
= 1 to 262 for 'field' = 2
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
The number of internal (i.e. channel) or external trigger sources of the instrument can be
retrieved with the AcqrsD1_getInstrumentInfo function.
Purpose
Configures the vertical control parameters for a specified channel of the digitizer.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
channel ViInt32 1...Nchan, or –1,… for the External Input
fullScale ViReal64 in Volts
offset ViReal64 in Volts
coupling ViInt32 = 0 Ground (Averagers ONLY)
= 1 DC, 1 MΩ
= 2 AC, 1 MΩ
= 3 DC, 50 Ω
= 4 AC, 50 Ω
bandwidth ViInt32 = 0 no bandwidth limit (default)
= 1 bandwidth limit at 25 MHz
= 2 bandwidth limit at 700 MHz
= 3 bandwidth limit at 200 MHz
= 4 bandwidth limit at 20 MHz
= 5 bandwidth limit at 35 MHz
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
For the DC440 and DP310 the coupling input is used to select the signal input: DC, 50 Ω for the
Standard input and AC, 50 Ω for the Direct HF input.
Some instruments have no bandwidth limiting capability. In this case, use bandwidth = 0. With
channel = -1 this function can be used to set the Full Scale Range and the bandwidth limit of the
external trigger for the DC271-FAMILY digitizers, the 10-bit-FAMILY, the AC/SC, and the
AP240/AP235 signal analyzer platforms. For the case of a 10-bit-FAMILY or DC271-FAMILY
MultiInstrument using ASBus, the external triggers of the additional modules are numbered –3, -
5, … following the principles given in the Programmer’s Guide section 3.15.2, Trigger Source
Numbering with ASBus.
LabVIEW Representation
AqDx Configure Vertical Settings.vi
Purpose
Translates an error code into a human readable form. The new function
AcqrsD1_errorMessageEx is to be preferred.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier can be VI_NULL
errorCode ViStatus Error code (returned by a function) to be translated
Output
Name Type Description
errorMessage ViChar [ ] Pointer to user-allocated string (suggested size 512)
into which the error-message text is returned
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
There is no Matlab MEX implementation of this function.
LabVIEW Representation
AqDx Error Message.vi
Purpose
Translates an error code into a human readable form and returns associated information.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier can be VI_NULL
errorCode ViStatus Error code (returned by a function) to be translated
errorMessageSize ViInt32 Size of the errorMessage string in bytes
(suggested size 512)
Output
Name Type Description
errorMessage ViChar [ ] Pointer to user-allocated string (suggested size 512)
into which the error-message text is returned
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
This function should be called immediately after the return of the error status to ensure that the
additional information remains available. For file errors, the returned message will contain the
file name and the original 'ansi' error string. This is particularly useful for calls to the following
functions:
AcqrsD1_calibrate AcqrsD1_calibrateEx
AcqrsD1_configLogicDevice AcqrsD1_configMode
AcqrsD1_init AcqrsD1_InitWithOptions
LabVIEW Representation
AqDx Error Message.vi
Purpose
Forces a manual trigger. It should not be used for Averagers or Analyzers.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
The function returns immediately after ordering the acquisition to stop. One must therefore wait
until the acquisition has terminated before reading the data, by checking the status with the
AcqrsD1_acqDone function. If the external clock is enabled, and there is no clock signal applied
to the device, AcqrsD1_acqDone will never return done = VI_TRUE. Consider using a timeout
and calling AcqrsD1_stopAcquisition if it occurs. In multisegment mode, the current segment is
acquired, the acquisition is terminated and the data and timestamps of subsequent segments are
invalid.
LabVIEW Representation
AqDx Software Trigger.vi
Purpose
Forces a manual trigger. It should not be used for Averagers or Analyzers.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
forceTrigType ViInt32 = 0 Sends a software trigger to end the full acquisition
= 1 Sends a single software trigger and generates the
TrigOut hardware signal
modifier ViInt32 Currently not used
flags ViInt32 Currently not used
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
The function returns immediately after ordering the acquisition to stop. One must therefore wait
until the acquisition has terminated before reading the data, by checking the status with the
AcqrsD1_acqDone function. If the external clock is enabled, and there is no clock signal applied
to the device, AcqrsD1_acqDone will never return done = VI_TRUE. Consider using a timeout
and calling AcqrsD1_stopAcquisition if it occurs.
For forceTrigType = 0, the 'trigOut' Control IO will NOT generate a trigger output. This mode is
equivalent to AcqrsD1_forceTrig. In multisegment mode, the current segment is acquired, the
acquisition is terminated and the data and timestamps of subsequent segments are invalid.
For forceTrigType = 1, 'trigOut' Control IO will generate a trigger output on each successful call.
In multisegment mode, the acquisition advances to the next segment and then waits again for a
trigger. If no valid triggers are provided to the device, the application must call
AcqrsD1_forceTrigEx as many times as there are segments. Every acquired segment will be
valid. This mode is only supported for single (i.e. non-ASBus-connected) digitizers (not
Averagers or Analyzers).
LabVIEW Representation
AqDx Software Trigger.vi
Purpose
Returns an attribute from the analyzer/averager configuration channelNbr.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
channelNbr ViInt32 Channel number for use with AP240/AP235 dual-
channel mode. A value = 0 will be treated as =1 for
compatibility.
parameterString ViString Character string defining the requested parameter.
See AcqrsD1_configAvgConfig for the list of
accepted strings.
Output
Name Type Description
value ViAddr Requested information value.
ViAddr resolves to void* in C/C++. The user must
allocate the appropriate variable type (as listed under
AcqrsD1_configAvgConfig) and supply its address
as 'value'.
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
See remarks under AcqrsD1_configAvgConfig.
LabVIEW Representation
AqDx Query Extended Averager Settings.vi
This Vi returns the value as either I32 or DBL. Connect the
desired type.
or
Purpose
Returns the current channel combination parameters of the digitizer.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
Output
Name Type Description
nbrConvertersPer ViInt32 = 1 all channels use 1 converter each (default)
Channel = 2 half of the channels use 2 converters each
= 4 1/4 of the channels use 4 converters each
usedChannels ViInt32 bit-field indicating which channels are used. See
discussion below
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
See remarks under AcqrsD1_configChannelCombination.
LabVIEW Representation
AqDx Query Channel Combination.vi
Purpose
Returns the configuration of a ControlIO connector. (For DC271-FAMILY/10-bit-FAMILY/AP-
FAMILY/12-bit-FAMILY and AC/SC Analyzers only)
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
connector ViInt32 Connector Number
1 = Front Panel I/O A (MMCX connector)
2 = Front Panel I/O B (MMCX connector)
9 = Front Panel Trigger Out (MMCX connector)
Output
Name Type Description
signal ViInt32 Indicates the current use of the specified connector
0 = Disabled, 6 = Enable trigger etc.
For a detailed list, see the description of
AcqrsD1_configControlIO
qualifier1 ViInt32 The returned values depend on the type of connector,
see the discussion in AcqrsD1_configControlIO
qualifier2 ViReal64 The returned values depend on the module, see the
discussion in AcqrsD1_configControlIO
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
ControlIO connectors are front panel IO connectors for special purpose control functions of the
digitizer. Typical examples are user-controlled acquisition control (trigger enable) or control
output signals such as ’10 MHz reference’ or ‘trigger ready’.
The connector numbers are limited to 0 and the supported values. To find out which connectors
are supported by a given module, use this function with connector = 0:
AcqrsD1_getControlIO(instrID, 0, &ctrlIOPattern, NULL, NULL);
In this case, the returned value of signal is the bit-coded list of the connectors that are available
in the digitizer. E.g. If the connectors 1 (I/O A), 2 (I/O B) and 9 (TrigOut) are present, the bits 1,
2 and 9 of signal are set, where bit 0 is the LSbit and 31 is the MSbit. Thus, the low order 16 bits
of signal (or ctrlIOPattern in the example above) would be equal to 0x206.
LabVIEW Representation
AqDx Query Control IO Connectors.vi
Purpose
Returns the current external clock control parameters of the digitizer.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
Output
Name Type Description
clockType ViInt32 = 0 Internal Clock (default at start-up)
= 1 External Clock, continuously running
= 2 External Reference (10 MHz)
= 4 External Clock, with start/stop sequence
inputThreshold ViReal64 Input threshold for external clock or reference in mV
delayNbrSamples ViInt32 Number of samples to acquire after trigger (for
'clockType' = 1 only!)
inputFrequency ViReal64 The presumed input frequency of the external clock,
for clockType = 4 only
sampFrequency ViReal64 The desired Sampling Frequency, for clockType = 4
only
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
See remarks under AcqrsD1_configExtClock.
LabVIEW Representation
AqDx Query External Clock.vi
Purpose
Returns the current frequency counter configuration
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
Output
Name Type Description
signalChannel ViInt32 Signal input channel
type ViInt32 Type of measurement
= 0 Frequency (default)
= 1 Period (1/frequency)
= 2 Totalize by Time
= 3 Totalize by Gate
targetValue ViReal64 User-supplied estimate of the expected value
apertureTime ViReal64 Time in sec, during which the measurement is executed
reserved ViReal64 Currently ignored
flags ViInt32 Currently ignored
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
LabVIEW Representation
AqDx Query FCounter.vi
Purpose
Returns the current horizontal control parameters of the digitizer.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
Output
Name Type Description
sampInterval ViReal64 Sampling interval in seconds
delayTime ViReal64 Trigger delay time in seconds
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
See remarks under AcqrsD1_configHorizontal.
LabVIEW Representation
AqDx Query Horizontal Settings.vi
Purpose
Returns some basic data about a specified digitizer.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
Output
Name Type Description
name ViChar [ ] Pointer to user-allocated string, into which the model
name is returned (length < 32 characters).
serialNbr ViInt32 Serial number of the digitizer.
busNbr ViInt32 Bus number of the digitizer location.
slotNbr ViInt32 Slot number of the digitizer location. (logical)
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
LabVIEW Representation
AqDx Query Instrument ID.vi
Purpose
Returns general information about a specified digitizer.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
parameterString ViString Character string defining the requested parameter. See
below for the list of accepted strings.
Output
Name Type Description
infoValue ViAddr Requested information value.
ViAddr resolves to void* in C/C++. The user must
allocate the appropriate variable type (as listed below)
and supply its address as 'infoValue'.
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
For the case "TrigLevelRange chan" the result is to be interpreted as
± (returned value), which is in % of the vertical Full Scale of the channel, or in mV for an
external trigger source. The value of chan takes is the same as the values of 'channel' in
AcqrsD1_configTrigSource.
For the case "Temperature m", m is the module number in a MultiInstrument and runs from 0 to
(nbr of modules –1) following the channel order. It may be omitted on single digitizers or for the
master of a MultiInstrument
For the case "Options" the available options are returned in a ‘,’ separated string. The options
include the memory size if additional memory has been installed in the form "MnM" for
digitizers where n is the number of megabytes available or "PnMB" for AP235/AP240 and
"AnM" for AP100/AP101/AP200/AP201. Other possible options include "NoASBus",
"BtBkup", "FreqCntr", "SSR", "Avg", and "StrtOnTrig". The infoValue should point to a string
of at least 32 characters.
The case of "SSRTimeStamp" should only be used when data is readable. In other words, it
should only be used between the moment at which the processing is done and the moment when
AcqrsD1_processData is called to enable the subsequent bank switch.
Examples
double trigLevelRange;
AcqrsD1_getInstrumentInfo(ID, "TrigLevelRange -1",
&trigLevelRange);
The acceptable trigger levels are in the range [-trigLevelRange, +trigLevelRange] mV (external trigger!).
For modules supporting switch on overload protection:
LabVIEW Representation
AqDx Query Instrument Information.vi
NOTE: The type of the returned value depends on the parameter requested. In LabVIEW, the correct
returned type should be supplied as input to the VI, and the appropriate output wire connected. Any other
wire will always return zero.
Purpose
Returns the current memory control parameters of the digitizer.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
Output
Name Type Description
nbrSamples ViInt32 Nominal number of samples to record (per segment!)
nbrSegments ViInt32 Number of segments to acquire. 1 corresponds to the
normal single-trace acquisition mode.
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
See remarks under AcqrsD1_configMemory.
LabVIEW Representation
AqDx Query Memory Settings.vi
Purpose
Returns the current extended memory control parameters of the digitizer.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
Output
Name Type Description
nbrSamplesHi ViUInt32 Will be set to 0 (reserved for future use)
nbrSamplesLo ViUInt32 Nominal number of samples to record (per segment!)
nbrSegments ViInt32 Number of segments to acquire. 1 corresponds to the
normal single-trace acquisition mode.
nbrBanks ViInt32 Will be set to 1 (reserved for future use)
flags ViInt32 = 0 default memory use
= 1 force use of internal memory (for 10-bit-FAMILY
digitizers with extended memory options only).
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
See remarks under AcqrsD1_configMemoryEx.
LabVIEW Representation
AqDx Query Extended Memory Settings.vi
Purpose
Returns the current operational mode of the digitizer
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
Output
Name Type Description
mode ViInt32 Operational mode
modifier ViInt32 Modifier, currently not used
flags ViInt32 Flags
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
LabVIEW Representation
AqDx Query Operation Mode.vi
Purpose
Returns the multiple input configuration on a channel.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
channel ViInt32 1...Nchan
Output
Name Type Description
input ViInt32 = 0 input connection A
= 1 input connection B
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
This function is only of use for instruments with an input-multiplexer (i.e. more than 1 input per
digitizer, e.g. DP211). On the "normal" instruments with a single input per channel, this function
may be ignored.
LabVIEW Representation
AqDx Query Multiplexer Input.vi
Purpose
Returns the number of channels on the specified module.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
Output
Name Type Description
nbrChannels ViInt32 Number of channels in the specified module
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
LabVIEW Representation
AqDx Query Number of Channels.vi
Purpose
Returns the number of physical Acqiris modules found on the computer.
Parameters
Output
Name Type Description
nbrInstruments ViInt32 Number of Acqiris modules found on the computer
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
LabVIEW Representation
AqDx Query Number of Instruments.vi
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
channel ViInt32 1...Nchan
setupType ViInt32 Type of setup.
0 = GateParameters
nbrSetupObj ViInt32 Maximum allowed number of setup objects in the
output.
Output
Name Type Description
setupData ViAddr Pointer to an array for the setup objects
ViAddr resolves to void* in C/C++. The user must
allocate the appropriate array and supply its address as
‘setupData’
nbrSetupObj- ViInt32 Number of setup objects returned
Returned
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
AqGateParameters
Discussion
For the object definition refer to AcqrsD1_configSetupArray. If AcqrsD1_getSetupArray is
called without having set the Parameters before, the default values will be returned.
Note: The driver contains a set of 64 default AqGateParameters, defined as { {0,256} {256,
256} {512, 256} {768, 256} ... }.
LabVIEW Representation
Purpose
Returns the current trigger class control parameters of the digitizer.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
Output
Name Type Description
trigClass ViInt32 =0 edge trigger
=1 TV trigger
sourcePattern ViInt32 = 0x000n0001 for Channel 1,
= 0x000n0002 for Channel 2,
= 0x000n0004 for Channel 3,
= 0x000n0008 for Channel 4 etc.
= 0x800n0000 for External Trigger 1,
= 0x400n0000 for External Trigger 2 etc.
where n is 0 for single instruments, or the module
number for MultiInstruments (ASBus operation). See
discussion below.
validatePattern ViInt32 Currently returns "0"
holdType ViInt32 Currently returns "0"
holdValue1 ViReal64 Currently returns "0"
holdValue2 ViReal64 Currently returns "0"
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
See remarks under AcqrsD1_configTrigClass.
LabVIEW Representation
AqDx Query Trigger Class.vi
Purpose
Returns the current trigger source control parameters for a specified channel.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
channel ViInt32 = 1...(Number of IntTrigSources) for internal sources
= -1..-(Number of ExtTrigSources) for external sources
See discussion below.
Output
Name Type Description
trigCoupling ViInt32 = 0 DC
= 1 AC
= 2 HF Reject
= 3 DC, 50 Ω
= 4 AC, 50 Ω
trigSlope ViInt32 = 0 Positive
= 1 Negative
= 2 out of Window
= 3 into Window
= 4 HF divide
= 5 Spike Stretcher
trigLevel1 ViReal64 Trigger threshold in % of the vertical Full Scale of the
channel, or in mV if using an External trigger source.
See discussion below.
trigLevel2 ViReal64 Trigger threshold 2 (as above) for use when Window
trigger is selected
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
See remarks under AcqrsD1_configTrigSource.
LabVIEW Representation
AqDx Query Extended Trigger Source.vi
Purpose
Returns the current TV trigger parameters (12-bit-FAMILY only).
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
channel ViInt32 = -1..-(Number of ExtTrigSources) for external sources
See discussion below.
Output
Name Type Description
standard ViInt32 = 0 625/50/2:1 (PAL or SECAM)
= 2 525/60/2:1 (NTSC)
field ViInt32 = 1 Field 1 - odd
= 2 Field 2 - even
line ViInt32 = line number, depends on the parameters above:
For 'standard' = 625/50/2:1
= 1 to 313 for 'field' = 1
= 314 to 625 for 'field' = 2
For 'standard' = 525/60/2:1
= 1 to 263 for 'field' = 1
= 1 to 262 for 'field' = 2
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
See discussion under AcqrsD1_configTrigTV.
Purpose
Returns version numbers associated with a specified digitizer or current device driver.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
versionItem ViInt32 1 for version of Kernel-Mode Driver
2 for version of EEPROM Common Section
3 for version of EEPROM Digitizer Section
4 for version of CPLD firmware
Output
Name Type Description
version ViInt32 version number of the requested item
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
For drivers, the version number is composed of 2 parts. The upper 2 bytes represent the major
version number, and the lower 2 bytes represent the minor version number.
LabVIEW Representation
AqDx Revision Query.vi
Purpose
Returns the vertical control parameters for a specified channel in the digitizer.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
channel ViInt32 1...Nchan, or –1,… for the External Input
Output
Name Type Description
fullScale ViReal64 in Volts
offset ViReal64 in Volts
coupling ViInt32 = 1 DC, 1 MΩ
= 2 AC, 1 MΩ
= 3 DC, 50 Ω
= 4 AC, 50 Ω
bandwidth ViInt32 = 0 no bandwidth limit (default)
= 1 bandwidth limit at 25 MHz
= 2 bandwidth limit at 700 MHz
= 3 bandwidth limit at 200 MHz
= 4 bandwidth limit at 20 MHz
= 5 bandwidth limit at 35 MHz
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
See remarks under AcqrsD1_configVertical.
LabVIEW Representation
AqDx Query Vertical Settings.vi
Purpose
Initializes an instrument.
Parameters
Input
Name Type Description
resourceName ViRsrc ASCII string which identifies the digitizer to be
initialized. See discussion below.
IDQuery ViBoolean Currently ignored
resetDevice ViBoolean If set to 'TRUE', resets the digitizer after initialization.
Output
Name Type Description
InstrumentID ViSession Instrument identifier
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
You should refer to the Programmer’s Guide section 3.2, Device Initialization, for a detailed
explanation on the initialization procedure.
LabVIEW Representation
AqDx Initialize.vi
Purpose
Initializes an instrument with options.
Parameters
Input
Name Type Description
resourceName ViRsrc ASCII string which identifies the digitizer to be
initialized. See discussion below.
IDQuery ViBoolean Currently ignored
resetDevice ViBoolean If set to 'TRUE', resets the digitizer after initialization.
optionsString ViString ASCII string that specifies options.
Syntax: "optionName=bool" where bool is TRUE (1)
or FALSE (0).
Currently three options are supported:
”CAL”: do calibration at initialization (default 1)
"DMA": use scatter-gather DMA for data transfers
(default 1).
"simulate": initialize a simulated device (default 0).
NOTE: optionsString is case insensitive.
Output
Name Type Description
instrumentID ViSession Instrument identifier
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
You should refer to the Programmer’s Guide section 3.2, Device Initialization for a detailed
explanation on the initialization procedure.
Multiple options can be given; Separate the option=value pairs with ‘,’ characters.
LabVIEW Representation
AqDx Initialize with Options.vi
Purpose
Reads/writes a number of 32-bit data values from/to a user-defined register in on-board logic
devices, such as user-programmable FPGAs. It is useful for AC/SC Analyzers only.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
deviceName ViChar [ ] Identifies which device to read from or write to.
In the AC210/240 and the SC210/240, this string must
be “Block1Dev1”
registerID ViInt32 Register Number, can typically assume 0 to 127
nbrValues ViInt32 Number of data values to read
dataArray ViInt32 [ ] User-supplied array of data values
readWrite ViInt32 Direction 0 = read from device, 1 = write to device
flags ViInt32 Currently unused, set to “0”
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
This function is only useful if the user programmed the on-board logic device (FPGA).
Typically, nbrValues is set to 1, but it may be larger if the logic device supports internal address
auto-incrementation. The following example reads the (32-bit) contents of register 5 to
reg5Value:
ViStatus status =
AcqrsD1_logicDeviceIO(ID, "Block1Dev1", 5, 1, ®5Value, 0, 0);
Note that dataArray must always be supplied as an address, even when writing a single value.
LabVIEW Representation
Purpose
Automatically initializes all digitizers and combines as many as possible to MultiInstruments.
Digitizers are only combined if they are physically connected via ASBus.
Parameters
Input
Name Type Description
optionsString ViString ASCII string which specifies options.
Currently no options are supported.
Output
Name Type Description
nbrInstruments ViInt32 Number of user-accessible instruments. It also includes
single instruments that don't participate on the ASBus.
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
This call must be followed by nbrInstruments calls to the functions AcqrsD1_init or
AcqrsD1_InitWithOptions to retrieve the instrumentID of the (multi)digitizers.
You should refer to to the Programmer’s Guide section 3.2, Device Initialization, for a
detailed explanation on the initialization procedure.
LabVIEW Representation
AqDx MultiInstrument Auto Define.vi
Purpose
This function defines the combination of a number of digitizers connected by ASBus into a
single MultiInstrument. It is not applicable to ASBus2 modules.
Parameters
Input
Name Type Description
instrumentList ViSession [ ] Array of 'instrumentID' of already initialized single
digitizers
nbrInstruments ViInt32 Number of digitizers in the 'instrumentList'
masterID ViSession 'instrumentID' of master digitizer
Output
Name Type Description
instrumentID ViSession Instrument identifier
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
You should refer to to the Programmer’s Guide section 3.2, Device Initialization, for a
detailed explanation on the initialization procedure.
This function should only be used if the choices of the automatic initialization function
AcqrsD1_multiInstrAutoDefine must be overridden. If the function executes successfully, the
instrumentID presented in the instrumentList cannot be used anymore, since they represent
individual digitizers that have become part of the new MultiInstrument, identified with newly
returned instrumentID. Please refer to the Programmer’s Guide section 3.2.7, Manual
Definition of MultiInstruments for more information.
LabView Representation
AqDx Configure MultiInstrument Manual Define.vi
Purpose
Undefines all MultiInstruments.
Parameters
Input
Name Type Description
optionsString ViString ASCII string which specifies options.
Currently no options are supported.
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
You should refer to to the Programmer’s Guide section 3.2, Device Initialization, for a
detailed explanation on the initialization procedure.
This function is almost never needed, except if you want to dynamically redefine
MultiInstruments with the aid of the function AcqrsD1_multiInstrDefine. If the function
executes successfully, the instrumentID of the previously defined MultiInstruments cannot be
used anymore. You must either have remembered the instrumentID of the single instruments
that made up the MultiInstruments, or you must reestablish all instrumentID of all digitizers by
reinitializing with the code shown in the Programmer’s Guide section 3.2.1, Identification by
Order Found.
LabVIEW Representation
AqDx Configure MultiInstrument Undefine.vi
[status] = Aq_multiInstrUndefineAll(optionsString)
Purpose
Checks if the on-board data processing has terminated. This routine is for Analyzers only.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
Output
Name Type Description
done ViBoolean done = VI_TRUE if the processing is terminated
VI_FALSE otherwise
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
LabVIEW Representation
Purpose
Starts on-board data processing on acquired data in the current bank as soon as the current
acquisition terminates. It can also be used to allow the following acquisition to be started as soon
as possible. This routine is for Analyzers only.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
processType ViInt32 Type of processing
0 = no processing (or other Analyzers)
and for AP101/AP201 ONLY
1 = gated peak detection, extrema mode
2 = gated peak detection, hysteresis mode
3 = interpolated peaks, extrema mode
4 = interpolated peaks, hysteresis mode
And for AdvTDC Analyzers
0 = respect the settings done with
AcqrsD1_configAvgConfig
1 = gated peak detection with hystersis
2 = gated and interpolated peak detection with
hysteresis
3 = gated peak detection with 8-point peak region
4 = gated peak detection with 16-point peak region
flags ViInt32 Autoswitch functionality
0 = do (re-)processing in same bank
1 = start the next acquisition in the other bank
2 = switch banks but do not start next acquisition
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
LabVIEW Representation
Purpose
Returns a sequence of waveforms as a byte array.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
channel ViInt32 1...Nchan
firstSegment ViInt32 Requested first segment number, may assume 0 to the
(number of segments – 1).
nbrSegments ViInt32 Requested number of segments, may assume 1 to the
number of segments set with the function
AcqrsD1_configMemory.
firstSampleInSeg ViInt32 Requested position of first sample to read, typically 0.
May assume 0 to the (number of samples – 1), as set
with the function AcqrsD1_configMemory.
nbrSamplesInSeg ViInt32 Requested number of samples, may assume 1 to the
number of samples set with the function
AcqrsD1_configMemory.
segmentOffset ViInt32 Requested offset, in number of samples, between
adjacent segments in the destination buffer
waveformArray. Must be ≥ nbrSamplesInSeg.
arraySize ViInt32 Number of data elements in the user-allocated
waveformArray. Used for verification / protection.
Output
Name Type Description
waveformArray ViChar [ ] User-allocated waveform destination array of type char
or byte. See discussion below for the required size.
horPos ViReal64 [ ] User-allocated array for horizontal positions of first
data point, one per segment. See discussion below.
sampTime ViReal64 Sampling interval in seconds
vGain ViReal64 Vertical gain in Volts/LSB. See discussion below.
vOffset ViReal64 Vertical offset in Volts. See discussion below.
timeStampLo ViInt32 [ ] User-allocated arrays for low and high parts of the 64-
timeStampHi ViInt32 [ ] bit trigger timestamp. See discussion below.
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
This function is faster than a loop over AcqrsD1_readCharWform, if many short segments
(< 10'000 samples/segment) are read. See the Programmer’s Guide, Appendix A: Estimating
Data Transfer Times for timing details.
The waveform destination array waveformArray must not only allocate enough space to hold
the requested data, but also some additional space. This function achieves a higher transfer speed
by simply transferring an image of the digitizer memory to the CPU memory, and then
reordering all circular segment buffers into linear arrays. Since allocating a temporary buffer for
the memory image is time consuming, the user-allocated destination buffer is also used as a
temporary storage for the memory image. The rule for the minimum storage space to allocate
The value of segmentOffset must be ≥ nbrSamplesInSeg. The waveforms are thus transferred
sequentially into a single linear buffer, with 'holes' of length (segmentOffset – nbrSamplesInSeg)
between them. Such 'holes' could be used for depositing additional segment-specific information
before storing the entire sequence as a single array to disk. If you specify firstSegment > 0, you
don’t have to allocate any buffer space for waveforms that are not read, i.e. waveformArray[0]
corresponds to the first sample of the segment firstSegment.
It is strongly recommended to allocate the waveform destination buffers permanently rather than
dynamically, in order to avoid system overheads for buffer allocation/deallocation.
The arrays horPos, timeStampLo and timeStampHi must always be allocated with length that
corresponds to the total number of segments requested with the function
AcqrsD1_configMemory. The timestamp of the first requested segment is therefore deposited in
timeStampLo[firstSegment], which is not necessarily timeStampLo[0].
The returned parameters horPos[ ] are the horizontal positions, for each segment, of the first
(nominal) data point with respect to the origin of the nominal trigger delay in seconds. Since the
first data point is BEFORE the origin, this number will be in the range [-sampTime, 0]. Refer to
the Programmer’s Guide section 3.10, Trigger Delay and Horizontal Waveform Position,
for a detailed discussion of the value delayTime.
The returned parameters timeStampLo[ ] and timeStampHi[ ] are respectively the low and high
parts of the 64-bit trigger timestamp, on per segment, in units of picoseconds. The timestamp is
the trigger time with respect to an arbitrary time origin (typically the start-time of the
acquisition), which is intended for the computation of time differences between segments of a
Sequence acquisition. Please refer to the Programmer’s Guide section 3.13, Timestamps, for a
detailed explanation.
The value in Volts of a data point data in the returned waveformArray can be computed with
the formula:
LabVIEW Representation
AqDx Read Sequence in ADC.vi should be considered as obsolete.
Please use AqDx Read Digitizer Data.vi instead
Purpose
Returns a waveform as a byte array.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
channel ViInt32 1...Nchan
segmentNumber ViInt32 Requested segment number, may assume 0 to the
(number of segments – 1) set with the function
AcqrsD1_configMemory.
firstSample ViInt32 Requested position of first sample to read, typically 0.
May assume 0 to the (number of samples – 1) set with
the function AcqrsD1_configMemory.
nbrSamples ViInt32 Requested number of samples, may assume 1 to the
number of samples set with the function
AcqrsD1_configMemory.
Output
Name Type Description
waveformArray ViChar [ ] User-allocated waveform destination array of type char
or byte. Its size MUST be at least (nbrSamples + 32),
for reasons of data alignment.
returnedSamples ViInt32 Number of data samples actually returned
addrFirstPoint ViInt32 Offset of the first valid data point, that of the first
sample, in the destination array. It should always be in
the range [0...31].
horPos ViReal64 Horizontal position of first data point. See discussion
below.
sampTime ViReal64 Sampling interval in seconds
vGain ViReal64 Vertical gain in Volts/LSB. See discussion below.
vOffset ViReal64 Vertical offset in Volts. See discussion below.
timeStampLo ViInt32 Low and high part of the 64-bit trigger timestamp. See
timeStampHi ViInt32 discussion below.
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
The returned parameter horPos is the horizontal position of the first (nominal) data point with
respect to the origin of the nominal trigger delay in seconds. Since the first data point is
BEFORE the origin, this number will be in the range [-sampTime, 0]. Refer to the
Programmer’s Guide section 3.10, Trigger Delay and Horizontal Waveform Position for a
detailed discussion of the value delayTime.
The returned parameters timeStampLo and timeStampHi are respectively the low and high
parts of the 64-bit trigger timestamp, in units of picoseconds. The timestamp is the trigger time
with respect to an arbitrary time origin (typically the start-time of the acquisition), which is
intended for the computation of time differences between segments of a Sequence acquisition.
Please refer to the Programmer’s Guide section 3.13, Timestamps, for a detailed explanation.
LabVIEW Representation
AqDx Read Waveform in ADC.vi should be considered as obsolete.
Please use AqDx Read RAW Data.vi instead
Purpose
Returns all waveform information. The sample data is returned in an array whose type is
specified in the AqReadParameters structure.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
channel ViInt32 1...Nchan
readPar AqReadParameters Requested parameters for the acquired waveform.
Output
Name Type Description
dataArray ViAddr User-allocated waveform destination array.
The array size restrictions are given below.
ViAddr resolves to void* in C/C++.
dataDesc AqDataDescriptor Waveform descriptor structure, containing waveform
information that is common to all segments.
segDescArray ViAddr Segment descriptor structure array, containing data that
is specific for each segment. The size of the array is
defined by nbrSegments and the type by readMode.If
readMode =4 there are no segment descriptors.
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
All structures used in this function can be found in the header file AcqirisDataTypes.h.
The type of the dataArray is determined from the AqReadParameters struct entry dataType.
Remember to set all values of the AqReadParameters structure, including the reserved values.
In this table
‘X’ means that the functionality is available depending on the option but independent of
the model,
'8' means that the functionality is available for 8-bit Digitizers and AP units in the
digitizer mode,
It must be remembered that 12-bit digitizers generate 12 or 13-bit data which will be transferred
as 2 bytes with the data shifted so that the MSB of the data becomes the MSB of the 16-bit word,
thus preserving the sign information. The vGain value is therefore not the gain of the ADC in
volts/LSB but rather the volts/LSB of the 16-bit word.
10-bit digitizers generate 12-bit data which can be transferred in either of 2 ways
• 2 bytes with the data shifted so that the MSB of the data becomes the MSB of the 16-bit
word, thus preserving the sign information
• 1 byte with the 8-bit data of the most significant bits of the ADC value. Here the lowest
two bits will be lost (truncated). The advantage is that the amount of data to be
transferred has been cut by a factor of 2.
The value in Volts of any integer data point data in the returned dataArray for a digitizer can be
computed with the formula:
Except in the case of Analyzers, the data points for dataType = 3 are in Volts and no conversion
is needed. For Analyzers the data points are in units of the LSB of the ADC and must be
converted using the formula above.
For readMode = 0 and dataType ≤ 1, indexFirstPoint must be used for the correct
identification of the first data point in the dataArray.
2 – 24-bit data read as such into either Int32 32-bit integers or converted into volts for
Real64,
5 – 16-bit data read of the least significant 16 bits of the 24-bit sum. The result is
presented in either an Int16 array or converted into volts for Real 64. The user is
responsible for treating any potential overflows,
6 – 16-bit data read of the most significant 16 bits of the 24-bit sum. The result is
presented in either an Int16 array or converted into volts for Real 64. The user is
responsible for treating any potential overflows.
It should also be noted that the interpretation of averager results was discussed in the
Programmer’s Guide section 3.9.4, Reading an Averaged Waveform from an Averager and
3.9.5, Reading a RT Add/Subtract Averaged Waveform from an Averager.
If readMode is set to gated, the nbrSamplesInSeg is set to the sum of the gate lengths.
The rules for the allocation of memory for the dataArray are as follows:
For digitizers (or other modules used as such)
o with readMode = 0 and dataType = 0, the array size in bytes must be at least
(nbrSamplesInSeg+32).
o with readMode = 0 and dataType = 1, the array size in words must be at least
(nbrSamplesInSeg+32).
o with readMode = 0 and dataType = 3, the array size in bytes must be at least 40 for
8-bit digitizers and 88 for 10-bit and 12-bit digitizers.
o with readMode = 1 the waveform destination array dataArray must not only
allocate enough space to hold the requested data, but also some additional space.
This function achieves a higher transfer speed by simply transferring an image of
the digitizer memory to the CPU memory, and then reordering all circular segment
buffers into linear arrays. Since allocating a temporary buffer for the memory
image is time consuming, the user-allocated destination buffer is also used as a
temporary storage for the memory image. The rule for the minimum storage space
to allocate with waveformArray is discussed in the Programmer’s Guide section
3.9.2, Reading Sequences of Waveforms.
For averagers readMode = 2, 5 or 6 are allowed and the size must be at least
nbrSamplesInSeg* nbrSegments * size_of_dataType
For analyzers
o with readMode = 0,1,2 its size must be at least nbrSamplesInSeg* nbrSegments
o with readMode = 3 the array size must be at least the sum of all gate lengths.
o with readMode = 4 in the APx01 analyszers the array size must be 4*sizeof(double)
* number of gates
o with readMode = 4 in the AdvancedTDC analyszers the array size must be
8 * number of peaks
o with readMode = 7 in the AdvancedTDC or SSR analyszers the array size must be
8 * nbrSegments + nbrSamplesInSeg* nbrSegments for the worst case of all the
data
o with readMode = 9 the array size must be at least
• 2**HistoRes*nbrSamplesInSeg* nbrSegments*Size_of_dataType if a
segmented histogram is used and
where
• HistoRes is the value used in the call to Acqrs_configAvgConfig with
"TdcHistogramRes"
• NbrSegments is either 1 or the number of segments if the value used in
the call to Acqrs_configAvgConfig with "TdcHistogramMode" is 1
• Size_dataType = 2*(1+HistoDepth), where HistoDepth is the value used
in the call to Acqrs_configAvgConfig with "TdcHistogramDepth"
o for all other cases, its size, in bytes, must be at least nbrSamplesInSeg*
nbrSegments*size_of_dataType
The value of returnedSamplesPerSeg for readMode = 7 is not useable and therefore set to 0.
If used the segment descriptor array segDesc[] must always be allocated with a length that
corresponds to the total number of segments requested with nbrSegments in
AqReadParameters. The first requested segment is therefore deposited in SegDesc[0]. The
segment descriptor array must also be allocated with the correct structure type that depends on
the readMode. If not used a Null pointer can be passed to the function. There are no segment
descriptors for readMode = 4, 7, 9, and 10.
The returned segment descriptor values timeStampLo and timeStampHi are respectively the
low and high parts of the 64-bit trigger timestamp, in units of picoseconds. The timestamp is the
trigger time with respect to an arbitrary time origin (usually the start-time of the acquisition
except for the 10-bit digitizers), which is intended for the computation of time differences
between segments of a Sequence acquisition. Please refer to the Programmer’s Guide section
3.13, Timestamps, for a detailed explanation.
The returned segment descriptor value horPos is the horizontal position, for the segment, of the
first (nominal) data point with respect to the origin of the nominal trigger delay in seconds. Since
the first data point is BEFORE the origin, this number will be in the range [-sampTime, 0].
Refer to the Programmer’s Guide section 3.10, Trigger Delay and Horizontal Waveform
Position, for a detailed discussion of the value delayTime. For Averaged Waveforms, the value
of horPos will always be 0.
avgOvfl, avgStatus and avgMax will apply to Signal Averagers only. The features that they
support have not yet been implemented.
The value of segmentOffset must be ≥ nbrSamplesInSeg. The waveforms are thus transferred
sequentially into a single linear buffer, with 'holes' of length (segmentOffset – nbrSamplesInSeg)
between them. Such 'holes' could be used for depositing additional segment-specific information
before storing the entire sequence as a single array to disk. If you specify firstSegment > 0, you
don’t have to allocate any buffer space for waveforms that are not read, i.e. waveformArray[0]
corresponds to the first sample of the segment firstSegment.
It is strongly recommended to allocate the waveform destination buffers permanently rather than
dynamically, in order to avoid system overheads for buffer allocation/deallocation.
LabVIEW Representations
or
Purpose
Returns the result of a frequency counter measurement
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
Output
Name Type Description
result ViReal64 Result of measurement
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
The result must be interpreted as a function of the effected measurement ‘type’:
Measurement Type Units
0 Frequency Hz
1 Period Sec
2 Totalize by Time Counts
3 Totalize by Gate Counts
LabVIEW Representation
AqDx Read FCounter.vi
Purpose
Returns a sequence of waveforms as a floating point (double) array, with the measured data
values in Volts.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
channel ViInt32 1...Nchan
firstSegment ViInt32 Requested first segment number, may assume 0 to the
(number of segments – 1).
nbrSegments ViInt32 Requested number of segments, may assume 1 to the
number of segments set with the function
AcqrsD1_configMemory.
firstSampleInSeg ViInt32 Requested position of first sample to read, typically 0.
May assume 0 to the (number of samples – 1), as set
with the function AcqrsD1_configMemory.
nbrSamplesInSeg ViInt32 Requested number of samples, may assume 1 to the
number of samples set with the function
AcqrsD1_configMemory.
segmentOffset ViInt32 Requested offset, in number of samples, between
adjacent segments in the destination buffer
waveformArray. Must be ≥ nbrSamplesInSeg.
arraySize ViInt32 Number of data elements in the user-allocated
waveformArray. Used for verification / protection.
Output
Name Type Description
waveformArray ViReal64 [ ] User-allocated waveform destination array of type
double. See discussion below for the required size.
horPos ViReal64 [ ] User-allocated array for horizontal positions of first
data point, one per segment. See discussion below.
sampTime ViReal64 Sampling interval in seconds
timeStampLo ViInt32 [ ] User-allocated arrays for low and high parts of the 64-
timeStampHi ViInt32 [ ] bit trigger timestamp. See discussion below.
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
since the waveformArray here is ViReal64. However, the other rule changes too
LabVIEW Representation
AqDx Read Sequence in Volts.vi should be considered as obsolete.
Please use AqDx Read Digitizer Data.vi instead
Purpose
Returns a waveform as a floating point (double) array, with the measured data values in Volts.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
channel ViInt32 1...Nchan
segmentNumber ViInt32 Requested segment number, may assume 0 to the
(number of segments – 1) set with the function
AcqrsD1_configMemory.
firstSample ViInt32 Requested position of first sample to read, typically 0.
May assume 0 to the (number of samples – 1) set with
the function AcqrsD1_configMemory.
nbrSamples ViInt32 Requested number of samples, may assume 1 to the
number of samples set with the function
AcqrsD1_configMemory.
Output
Name Type Description
waveformArray ViReal64 [ ] User-allocated waveform destination array. Its size
MUST be at least the maximum of nbrSamples or 5.
returnedSamples ViInt32 Number of data samples actually returned
horPos ViReal64 Horizontal position of first data point. See discussion
below.
sampTime ViReal64 Sampling interval in seconds
timeStampLo ViInt32 Low and high part of the 64-bit trigger timestamp. See
timeStampHi ViInt32 discussion below.
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
See remarks under AcqrsD1_readCharWform for details about the horPos and timeStamp
parameters.
LabVIEW Representation
AqDx Read Waveform in Volts.vi should be considered as obsolete.
Please use AqDx Read Digitizer Data.vi instead
Purpose
Returns the number of segments already acquired for a digitizer. For averagers (but not AP100 or
AP200) it will give the number of triggers already accepted for the current acquisition. In the
case of analyzers it will return the value 1 at the end of the acquisition and is therefore not of
much use.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
Output
Name Type Description
nbrSegments ViInt32 Number of segments already acquired
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
Can be called after an acquisition, in order to obtain the number of segments/triggers actually
acquired (until AcqrsD1_stopAcquisition was called).
NOTE: For a digitizer, calling this function while an acquisition is active, in order to follow
the progress of a Sequence acquisition, is dangerous and must be avoided.
LabVIEW Representation
AqDx Query Number of Acquired Segments.vi
Purpose
Resets an instrument.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
There is no known situation where this action is to be recommended.
LabVIEW Representation
AqDx Reset.vi
[status] = Aq_reset(instrumentID)
Purpose
Resets the digitizer memory to a known default state.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
Each byte of the digitizer memory is overwritten sequentially with the values 0xaa, 0x55, 0x00
and 0xff. This functionality is mostly intended for use with battery backed-up memories.
LabVIEW Representation
AqDx Reset Digitizer Memory.vi
[status] = Aq_resetDigitizerMemory(instrumentID)
Purpose
Restores some internal registers of an instrument.
Only needed after power-up of a digitizer with the battery back-up option.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
delayOffset ViReal64 Global delay offset, should be retrieved with
AcqrsD1_getInstrumentInfo(…,
“DelayOffset”, ..) before power-off
If not known, use the value –20.0e-9
delayScale ViReal64 Global delay scale, should be retrieved with
AcqrsD1_getInstrumentInfo(…,
“DelayScale”, ..) before power-off
If not known, use the value 5.0e-12
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
The normal startup sequence destroys the contents of the Acqiris digitizer memories. This
function, together with a specific sequence of other function calls, prevents this from occurring
in digitizers with battery backed-up memories.
Please refer to the Programmer’s Guide section 3.17, Readout of Battery Backed-up
Memories, for a detailed description of the required initialization sequence to read battery
backed-up waveforms.
LabVIEW Representation
AqDx Restore Internal Registers.vi
Purpose
Sets an attribute with a string value (for use in SC Streaming Analyzers ONLY).
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
channel ViInt32 1...Nchan
name ViConstString ASCII string that specifies options
“odlTxBitRate” is currently the only one used
value ViConstString For “odlTxBitRate” can have values like
“2.5G”,”2.125G”, or “1.0625G”
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
LabVIEW Representation
Not Yet Available
Purpose
Sets the front panel LED to the desired color.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
color ViInt32 0 = OFF (return to normal acquisition status indicator)
1 = Green
2 = Red
3 = Yellow
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
LabVIEW Representation
AqDx Set LED Color.vi
Purpose
Sets one or several options which will be used by the function AcqrsD1_InitWithOptions,
provided that the optionsString supplied to AcqrsD1_InitWithOptions contains the string
"simulate=TRUE".
Parameters
Input
Name Type Description
simOptionString ViString String listing the desired simulation options. See
discussion below.
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
See the Programmer’s Guide section 3.2.9, Simulated Devices, for details on simulation. A
string of the form “M8M” is used to set an 8 Mbyte simulated memory. The simulation options
are reset to none by setting simOptionString to an empty string "".
LabVIEW Representation
Use AqDx Initialize with Options.vi
[status] = Aq_setSimulationOptions(simOptionsString)
Purpose
Stops the acquisition.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
This function will stop the acquisition and not return until this has been accomplished. The data
is not guaranteed to be valid. To obtain valid data after "manually" stopping the acquisition (e.g.
timeout waiting for a trigger), one should use the AcqrsD1_forceTrig function to generate a
"software" (or "manual") trigger, and then continue polling for the end of the acquisition with
AcqrsD1_acqDone. This will ensure correct completion of the acquisition.
LabVIEW Representation
AqDx Stop Acquisition.vi
[status] = Aq_stopAcquisition(instrumentID)
Purpose
Stops on-board data processing. This routine is for Analyzers only.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
This function will stop the on-board data processing immediately. The output data is not
guaranteed to be valid.
LabVIEW Representation
[status] = Aq_stopProcessing(instrumentID)
Purpose
Waits for the end of acquisition.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
timeout ViInt32 Timeout in milliseconds
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
This function will return only after the acquisition has terminated or when the requested timeout
has elapsed, whichever is shorter. For protection, the timeout is clipped to a maximum value of
10 seconds. If a larger timeout is needed, call this function repeatedly.
While waiting for the acquisition to terminate, the calling thread is put into 'idle', permitting
other threads or processes to fully use the CPU.
LabVIEW Representation
AqDx Wait For End Of Acquisition.vi
Purpose
Waits for the end of on-board data processing. . This routine is for Analyzers only.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
timeout ViInt32 Timeout in milliseconds
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
This function will return only after the on-board processing has terminated or when the requested
timeout has elapsed, whichever is shorter. For protection, the timeout is clipped to a maximum
value of 10 seconds. If a larger timeout is needed, call this function repeatedly.
While waiting for the processing to terminate, the calling thread is put into 'idle', permitting other
threads or processes to fully use the CPU.
LabVIEW Representation