2.4 Gating Blocks¶
In order to decrease the amount of data transmitted to the PC, the Ndigo6G-12 includes four independent gate and delay units.
They are configured using ndigo6g12_configuration::gating_block
and (specifically for the TDC channels)
ndigo6g12_tdc_channel::gating_block
.
A gate and delay unit creates a gate window starting and closing at specified
times after a trigger event (as configured by the user with
ndigo6g12_gating_block::start
and
stop
).
Concretely, if a trigger
event is detected, a timer starts. After the timer reaches the time
corresponding to start
, the gate
will activate. After the timer reaches the time corresponding to
stop
, it will inactivate.
This behavior may be influenced by the
retrigger
feature.
With this feature enabled, another trigger signal will reset the timer to zero.
That means, if a second trigger is detected before the gate is activated,
the time until it activates is extended. If, however, the gate was already
active, the time until it inactivates will be extended.
Attention
A bug in Firmware Rev. \(\le\)1.24120
causes the retrigger
feature to reset the gate logic entirely (i.e, the
state of the gate will inactivate after a retrigger event).
Depending on ndigo6g12_gating_block::negate
, an active gate will
be open (signal detection enabled) or closed (signal detection disabled).
Each gating block can use an arbitrary combination of inputs which trigger
it. This is configured using ndigo6g12_gating_block::sources
.
trigger_blocks
can use the gate signal to suppress data acquisition, that is,
only data that fulfills zero suppression specifications occurring in an
open gate window is written to the PC.
Figure 2.17 shows the functionality of the gate timing and delay unit.
2.4.1 Examples¶
Example 1: Suppression of Noise After Starting an Acquisition¶
In mass spectrometer and other experiments, noise while starting data acquisition can result in undesired trigger events during start-up time. To prevent noise in the output data, a gating block could be used to suppress all triggers during start-up.
The following example illustrates the use of a gating block (in the following, gating_block[0]
) to prevent recording noise:
Set up the GATE input to trigger on each acquisition start, that is,
trigger[NDIGO6G12_TRIGGER_GATE]
is configured corresponding to the input signal (e.g., configuring the polarity).NDIGO6G12_TRIGGER_SOURCE_GATE
is selected as input source ofgating_block[0].source
and thegating_block[0].start
parameter is set to0
.The
gating_block[0].stop
parameter is set to the desired length (in multiples of 5 ns).gating_block[0].negate
is set totrue
.
Now, gating_block[0]
will output a LOW pulse of the desired length (that is,
the gate is closed during start-up time) whenever there is a pulse on the GATE
input.
Now, select the above gate for the trigger bock you want to use for triggering
data acquisition, e.g.,
trigger_block[0]
:
Set
trigger_block[0].sources
e.g.,config.trigger_block[0].sources = NDIGO6G12_TRIGGER_SOURCE_A0 | NDIGO6G12_TRIGGER_SOURCE_D0
uses the ADC input channels A and D as sources.
Set
NDIGO6G12_TRIGGER_GATE_0
astrigger_block[0].gates
.config.trigger_block[0].gates = NDIGO6G12_TRIGGER_GATE_0
Now, recording of data is suppressed for an initial start-up time.
2.4.2 Example 2: Delayed Trigger¶
To sample a short window at a specified time after a trigger event on a channel, a gating block can be used to create a delayed trigger. To do this, one of the triggers of the channel of interest is configured to the desired parameters by selecting the threshold, setting the edge polarity and enabling edge triggering.
Instead of directly using this trigger as an input to the trigger block’s
input matrix, the trigger is selected as an input to a gating block. The
block is configured with start = delay
(in multiples 5 ns)
and stop = start+1
, negate = false
. This causes the gating
block to produce a one clock cycle pulse on its output after the
specified delay.
To send this pulse to the trigger block, the gating block must be enabled in the trigger block’s AND matrix and the ONE trigger source must be selected.