How to configure the DAQ module for image acquisition

Data synchronization is the key to acquiring images, and in this blog post I explain how to configure the LabOne Data Acquisition (DAQ) module for this purpose. Let’s start with two concrete scanning microscopy examples as depicted in Fig.1: Raman imaging microscopy and Kelvin probe force microscopy (KPFM). The first example is a typical multi-photon microscopy scheme where a modulated laser beam illuminates a point on the sample. This modulation is transferred to the inelastically scattered light that impinges onto the photodiode, as shown in Panel a). The lock-in amplifier extracts the modulated signal from this photodiode. This technique provides an image with chemical contrast (for further details on laser-scanning microscopy, please refer to Claudius’s related blog post); on the other hand, KFPM images the electrostatic properties of the nanostructures on the sample’s surface. As explained in this video, it interrogates the sample surface with an atomically sharp tip attached to a periodically actuated cantilever. The lock-in controls AC and DC voltage applied on both the tip and the sample and extracts the cantilever’s deflection from the quadrant photodetector. While physical interaction and measurable property vary, the imaging scheme is similar in these examples. Both rely on a scanner (or a scan engine) to systematically advance the probed point on the sample. To synchronize the lock-in measurement with the scan, a trigger signal is used to capture the data at the right time with the DAQ module. 

Fig.1: Two scanning microscopy setups. a) Raman imaging microscopy provides images with chemical contrast. b) Kelvin probe force microscopy is sensitive to the contact potential difference between the tip and the sample surface. The imaging scheme is similar in both cases, as the lock-in amplifier is synchronized with the scanner by using trigger signals.

The first step to configure the DAQ module for imaging is to determine the triggering mechanism of the scanner. Experiments that use galvo mirrors to position the laser beam or a piezo scanner that positions the tip on the sample typically rely on line triggers. Other possible triggering methods are shown in Fig. 2a) for scanners that organize data points in rows and columns, including pixel trigger, end of line trigger, and frame trigger. More complex scanning patterns also exist, for example in spinning disk scanners that follow spiral-like patterns. If the triggering mechanism is unclear, you can determine it with LabOne’s Scope tool by monitoring the trigger signal in real time.

Fig. 2b) shows the DAQ module’s setting tab where the trigger settings are found. Typically, a hardware trigger (instrument’s trigger inputs or DIO channels) is used either in the positive or negative edge. Please note that it is possible to generate periodic trigger signals using the lock-in amplifier to control the scanner. However, it is important to monitor the scanner’s behavior as there might be a constant delay between the trigger signal and its operation. If this is the case, the delay setting allows you to fine-tune the DAQ module to achieve the desired synchronization. The trigger rearm properties can also be adjusted to skip a given number of triggers using the hold-off count or to skip triggers during a defined period determined by the hold-off time. Once the trigger settings are complete, the next step is to configure the grid settings.

Fig.2: a) Possible trigger methods for scanners that organize data points in rows and columns, b) The parameter set used to configure the DAQ module.

The DAQ module organizes data on a grid defined by the number of columns and rows corresponding to the pixels of the image. It can record data on the defined grid from multiple signal sources simultaneously, including different demodulators, feedback signals, boxcar averager outputs, and auxiliary channels with varying sampling rates. Given that the samples from each signal channel cannot coincide with the desired image pixels, the DAQ module resamples the data and aligns each sample on the grid. The resampling properties and the number of data points are configured through the grid settings displayed in Fig. 2b). Here, the duration parameter defines the recording length of each row where the columns give the number of data points. With successive triggers, the data are captured in bursts of columns and stacked in rows to construct the image frame. If the resampling mode is set to exact (on-grid), the duration equals the number of columns divided by the maximum data transfer rate among the selected signal channels. In the other sampling modes (linear and nearest), the duration is a free parameter. This is particularly useful to tune the sampling duration of the DAQ module to match the scan duration following each trigger.

Fig.3: KPFM image constructed with the DAQ module (256 x 256 pixels). This captures multiple signal sources listed in the right panel. The bottom panel displays multiple traces for each row, perfectly aligned on the same grid.

So far we have discussed trigger methods for scanners and the DAQ module’s trigger and grid settings. Let’s consider more closely the three trigger methods mentioned above. Perhaps the most straightforward method is to use a scanner that works with line triggers. It only requires you to define a duration that matches the scanner’s operation to construct an image, as shown in Fig. 3. In the case of pixel triggers, you also need to know how many triggers per row you can expect. With this information, you can set the trigger hold-off count to skip all the triggers except for the one that coincides with the first pixels of each row. As the DAQ module requires a trigger per row, building an image from a frame trigger scanner means that you first need to capture the entire frame in a signal row and then construct the image through post-processing.