LabOne for HF2: using digital lines as trigger sources

Since LabOne 15.11 release and onward, accessible from our download area, all HF2LI users with the enabled HF2LI-WEB option can now benefit from the latest software developments that were previously reserved for the UHFLI. One tool that is now totally new for this instrument is the Software (SW) Trigger tool. I have already addressed some benefits of the SW Trigger for the UHFLI in this blog on multichannel mapping, but since there are some hardware differences between HF2LI and UHFLI, I would like to focus here on digital lines triggering, so that all users with different instruments can be on the same level.

Digital lines in LabOne

For convenience, the first 2 digital lines, DIO 0 & 1, are also available as BNC Input/Output on the back panel of the HF2LI. This is particularly useful for external source triggering to lock to a third-party reference frequency for instance. There are however up to 32 lines available on the digital port of the HF2LI (DIO HD 68 pin connector) which allow for a conditional triggering scheme or logical operations such as defining a NOR or NAND gates. If more than 2 lines need to be addressed simultaneously, Zurich Instruments provides digital I/O breakout board to address the first 16 bits as inputs or outputs, and the next 16 bits as input only (please refer to Chapter 8.3 Digital interface specifications in the HF2 User Manual).

In the LabOne User Interface, there are 2 places where digital lines can be used to trigger data acquisition upon certain conditions:

  • Lock-in tab under Data Transfer / Trigger mode.
  • SW Trigger under Trigger type setting as ‘Digital’ or ‘HW trigger’ (the later being only available with MFLI or UHFLI).

In both cases these triggers are actually hardware triggers, but using them together with the SW Trigger tool allows for synchronization of all subscribed data (e.g. phase, amplitude, frequency) together with external conditions.

Let’s consider 2 series of TTL pulses sent to the instrument via DIO port 0 & 1 (BNC connector). In order to plot the two trigger signals separately, we duplicate these signals with a T-connector and connect each trigger signal to Aux In 1 & 2 as well (back panel analog input). If we look at all these channels in the Plotter as a function of time, we can identify the pulse train as follow:


Demod Save data on High

 

From this plot, we see that only a fraction of the demodulated sample (in pink) is saved upon certain condition on the trigger level (in purple) of the first digital line (DIO 0). This condition can be set directly in the Lock-in  tab with a Data Transfer rate set to DIO to ‘High’ for instance. At the same time, this condition can also be set in the SW Trigger tab where now all triggered traces are aligned with respect to the trigger level (see screen shot below to get the appropriate settings). This can be seen as a ‘collapse view’ (superimposed on one another) of the above plotter trace:

2016-01-28 DIO SW trigger cropped

Simultaneous HW and SW trigger for ‘perfect’ data alignment (click to see more parameter settings)

It is important to note that 2 conditions define the Trigger state in the settings sub-tab of the SW trigger: ‘Bits‘ & ‘Bit Mask‘. This allows for more advanced trigger setting that would otherwise not be allowed in a single DIO line in the Lock-in tab. The number set to ‘Bits‘ corresponds to the expected bit values used for triggering, in binary format, (e.g. type 4 = 00000100 if digital line 3 needs to be ‘high’ to trigger an event). The ‘Bit Mask‘ will determine which bits are actually used for the trigger event (e.g. type 7 =  00000111, if only the first 3 digital lines needs to be ‘read’ for the trigger condition, ignoring all others). For the sake of argument, here is an example explaining the setting used to get an AND gate using the SW trigger Digital input:

Table AND

Digital line trigger for an AND gate

Effect of transfer rate on trigger accuracy

Since the data saved on the PC have to be first transferred from the instrument at the specified transfer rate, the DIO itself is also affected by this choice: the higher the rate the better the time resolution of the trigger. After selecting Trigger Type ‘Digital‘, it is also necessary to select ‘Trigger Demod‘, with the corresponding transfer rate of this demodulator. Since many demodulators are then available for saving (6 with the HF2LI, 8 with the UHFLI) it is therefore recommended to use a Transfer Rate higher for the demod channel used for triggering. It of course depends on the level of accuracy one wants to achieve.

Since this effect is not so obvious, it is better to illustrate it with an example:

Effect of demo on Digital trigger

Effect of Transfer rate on the accuracy of Digital trigger

Not the best temporal accuracy is required all the time and depends on the application. For instance aligning data with a 1Hz raster scan with a 1.7kSa/s accuracy on the trigger event is totally acceptable. On the other hand, for fast data capture of short events, it is important to increase this level.

Please note that the transfer rate value will also affect the time accuracy of the demodulated samples, which for subsequent data alignment (first data point with respect to the trigger event) might require some data interpolation for proper adjustment as described in Daniel’s blog: Working with LabOne Software Trigger Data in Matlab.

Conclusion

This blog explored the use of digital lines for triggering purpose and showed examples to use them as logical gates. With the UHFLI, it is possible to use ‘HW trigger’ for a direct access of DIO 0 & 1 (first 2 digital lines) as Ref/Trigger on front BNC connectors. With ‘Digital’ line trigger in the SW trigger tab, this functionality is extended to multiple bit trigger conditions (up to 32).