Skip to content

Data Acquisition Module

The Data Acquisition Module corresponds to the Data Acquisition tab of the LabOne User Interface. It enables the user to record and align time and frequency domain data from multiple instrument signal sources at a defined data rate. The data may be recorded either continuously or in bursts based upon trigger criteria analogous to the functionality provided by laboratory oscilloscopes.

example_data_acquisition_edge
Figure 1: example_data_acquisition_edge

DAQ Module Acquisition Modes and Trigger Types

This section lists the required parameters and special considerations for each trigger mode. For reference documentation of the module’s parameters, please see Data Acquisition Module Node Tree.

The following acquisition modes exists:

Mode / Trigger Type Description Value of type
Continuous Continuous recording of data. 0
Edge Edge trigger with noise rejection. 1
Pulse Pulse width trigger with noise rejection. 3
Tracking (Edge or Pulse) Level tracking trigger to compensate for signal drift. 4
Digital Digital trigger with bit masking. 2
Hardware Trigger on one of the instrument’s hardware trigger channels (not available on HF2). 6
Pulse Counter Trigger on the value of an instrument’s pulse counter (requires CNT Option). 8

Continuous Acquisition

This mode performs back-to-back recording of the subscribed signal paths. The data is returned by read() in bursts of a defined length (duration). This length is defined either:

  • Directly by the user via /duration for the case of nearest or linear sampling (specified by /grid/mode).
  • Set by the module in the case of exact grid mode based on the value of /grid/cols and the highest sampling rate of all subscribed signal paths.

Acquisition using Level Edge Triggering

Parameters specific to edge triggering are:

  • /level
  • /hysteresis

The user can request automatic calculation of the /level and /hysteresis parameters by setting the /findlevel parameter to 1. Please see Determining the Trigger Level automatically for more information.

The following image explains the Data Acquisition Module’s parameters for an Edge Trigger.

daq_analog_trigger
Figure 2: daq_analog_trigger

Acquisition using Pulse Triggering

Parameters specific to pulse triggering are:

  • /level
  • /hysteresis
  • /pulse/min
  • /pulse/max

The user can request automatic calculation of the /level and /hysteresis parameters by setting the /findlevel parameter to 1. Please see Determining the Trigger Level for more information.

The following image explains the Data Acquisition Module’s parameters for a positive Pulse Trigger.

daq_pulse_trigger
Figure 3: daq_pulse_trigger

Acquisition using Tracking Edge or Pulse Triggering

In addition to the parameters specific to edge and pulse triggers, the parameter that is of particular importance when using a tracking trigger type is:

  • /bandwidth

daq_tracking_trigger
Figure 4: daq_tracking_trigger

Acquisition using Digital Triggering

To use the DAQ Module with a digital trigger, it must be configured to use a digital trigger type (by setting type to 2) and to use the output value of the instrument's DIO port as it's trigger source. This is achieved by setting /triggernode to the device node /DEV..../DEMODS/N/SAMPLE.bits. It is important to be aware that the Data Acquisition Module takes its value for the DIO output from the demodulator sample field bits, not from a node in the /DEV..../DIOS branch. As such, the specified demodulator must be enabled and and an appropriate transfer rate configured that meets the required trigger resolution (the Data Acquisition Module can only resolve triggers at the resolution of 1//DEV..../DEMODS/N/RATE it is not possible to interpolate a digital signal to improve trigger resolution and if the incoming trigger pulse on the DIO port is shorter than this resolution, it may be missed).

The Digital Trigger allows not only the trigger bits (/bits) to be specified but also a bit mask (/bitmask) in order to allow an arbitrary selection of DIO pins to supply the trigger signal. When a positive, respectively, negative edge trigger is used, all of these selected pins must become high, respectively low. The bit mask is applied as following. For positive edge triggering (/edge set to value 1), the Data Acquisition Module recording is triggered when the following equality holds for the DIO value:

(/DEV..../DEMODS/N/SAMPLE.bits BITAND bitmask) == (bits BITAND bitmask)

and this equality has not been met for the previous value in time (the previous sample) of /DEV..../DEMODS/N/SAMPLE.bits. For negative edge triggering (/edge set to value 2), the Data Acquisition Module recording is triggered when the following inequality holds for the current DIO value:

(/DEV..../DEMODS/N/SAMPLE.bits BITAND bitmask) != (bits BITAND bitmask)

and this inequality was not met (there was equality) for the previous value of the DIO value.

Acquisition using Hardware Triggering

There are no parameters specific only to hardware triggering since the hardware trigger defines the trigger criterion itself; only the trigger edge must be specified. For a hardware trigger the triggernode must be one of:

  • /DEV.../CNTS/N/SAMPLE.TrigAWGTrigN + (requires CNT Option)
  • /DEV.../DEMODS/N/SAMPLE.TrigAWGTrigN
  • /DEV.../DEMODS/N/SAMPLE.TrigDemod4Phase
  • /DEV.../DEMODS/N/SAMPLE.TrigDemod8Phase
  • /DEV.../CNTS/N/SAMPLE.TrigInN (requires CNT Option)
  • /DEV.../DEMODS/N/SAMPLE.TrigInN
  • /DEV.../DEMODS/N/SAMPLE.TrigOutN

The hardware trigger type is not supported on HF2 instruments.

Acquisition using Pulse Counter Triggering

Pulse Counter triggering requires the CNT Option. Parameters specific to the pulse counter trigger type:

  • /eventcount/mode

The /triggernode must be configured to be a pulse counter sample /DEV…​./CNTS/N/SAMPLE.value.

Determining the Trigger Level automatically

The Data Acquisition Module can calculate the /level and /hysteresis parameters based on the current input signal for edge, pulse, tracking edge and tracking pulse trigger types. This is particularly useful when using a tracking trigger, where the trigger level is relative to the output of the low-pass filter tracking the input signal's average. In the LabOne User Interface this functionality corresponds to the "Find" button in the Settings sub-tab of the Data Acquisition Tab.

This functionality is activated via API by setting the /findlevel parameter to 1. This is a single-shot calculation of the level and hysteresis parameters, meaning that it is performed only once, not continually. The Data Acquisition Module monitors the input signal for a duration of 0.1 seconds and sets the level parameter to the average of the largest and the smallest values detected in the signal and the hysteresis to 10% of the difference between largest and smallest values. When the Data Acquisition Module has finished its calculation of the level and hysteresis parameters it sets the value of the /findlevel parameter to 0 and writes the values to the /level and /hysteresis parameters. Note that the calculation is only performed if the Data Acquisition Module is currently running, i.e., after execute() has been called.

The following python code demonstrates how to use the /findlevel parameter.

# Arm the Data Acquisition Module: ready for trigger acquisition.
trigger.execute()
# Tell the Data Acquisition Module to determine the trigger level.
trigger.set('findlevel', 1)
findlevel = 1
timeout = 10  # [s]
t0 = time.time()
while findlevel == 1:
    time.sleep(0.05)
    findlevel = trigger.getInt('findlevel')
    if time.time() - t0 > timeout:
        trigger.finish()
        trigger.clear()
        raise RuntimeError("Data Acquisition Module didn't find trigger level after %.3f seconds." % timeout)
level = trigger.getDouble('level')
hysteresis = trigger.getDouble('hysteresis')

Signal Subscription

The Data Acquisition Module uses dot notation for subscribing to the signals. Whereas with the Software Trigger (Recorder Module) you subscribe to an entire streaming node, e.g. /DEV..../DEMODS/N/SAMPLE and get all the signal components of this node back, with the Data Acquisition Module you specify the exact signal you are interested in capturing, e.g. /DEV..../DEMODS/N/SAMPLE.r /DEV..../DEMOD/0/SAMPLE.phase. In addition, by appending suffixes to the signal path, various operations can be applied to the source signal and cascaded to obtain the desired result. Some examples are given below (the /DEV.../DEMODS/n/SAMPLE prefix has been omitted):

Signal Description
x Demodulator sample x component.
r.avg Average of demodulator sample abs(x + iy).
x.std Standard deviation of demodulator sample x component.
xiy.fft.abs.std Standard deviation of complex FFT of x + iy.
phase.fft.abs.avg Average of real FFT of linear corrected phase.
freq.fft.abs.pwr Power of real FFT of frequency.
r.fft.abs Real FFT of abs(x + iy).
df.fft.abs Real FFT of demodulator phase derivative (dθ/dt)/(2π).
xiy.fft.abs.pwr Power of complex FFT of x + iy.
xiy.fft.abs.filter Demodulator low-pass filter transfer function. Divide xiy.fft.abs by this to obtain a compensated FFT.

The specification for signal subscription is given below, together with the possible options. Angle brackets <> indicate mandatory fields. Square brackets [] indicate optional fields.

<node_path><.source_signal>[.fft<.complex_selector>[.filter]][.pwr][.math_operation]

source_signal

Note

Nodes not listed here probably only contain one signal and do not have a source_signal field.

Signal Name Description (Path of the node containing the signal(s)) Comment
<demod>.x Demodulator output in-phase component
<demod>.y Demodulator output quadrature component
<demod>.r Demodulator output amplitude
<demod>.theta Demodulator output phase
<demod>.frequency Oscillator frequency
<demod>.auxin0 Auxiliary input channel 1
<demod>.auxin1 Auxiliary input channel 2
<demod>.xiy Combined demodulator output in-phase and quadrature components complex output (can only be used as FFT input))
<demod>.df Demodulator output phase derivative (can only be used for FFT(dθ/dt)/(2π)
<impedance>.realz In-phase component of impedance sample
<impedance>.imagz Quadrature component of impedance sample
<impedance>.absz Amplitude of impedance sample
<impedance>.phasez Phase of impedance sample
<impedance>.frequency Oscillator frequency
<impedance>.param0 Measurement parameter that depends on circuit configuration
<impedance>.param1 Measurement parameter that depends on circuit configuration
<impedance>.drive Amplitude of the AC signal applied to the device under test
<impedance>.bias DC Voltage applied to the device under test
<impedance>.z Combined impedance in-phase and quadrature components complex (can only be used as FFT input)

complex_selector (mandatory with .fft)

Signal Name Description
real Real component of FFT
imag Imaginary component of FFT
abs Absolute component of FFT
phase Phase component of FFT

filter (optional)

Helper signal representing demodulator low-pass filter transfer function. It can only be applied to 'abs' FFT output of complex demodulator source signal, i.e. 'xiy.fft.abs.filter'. No additional operations are permitted. Can be used to compensate the FFT result for the demodulator low-pass filter.

pwr (optional)

Power calculation

math_operation (optional)

Signal Name Description
avg Average of grid repetitions (parameter grid/repetitions)
std Standard deviation