Synchronization to Laser Clock

ScanImage® allows the sample clock of the acquisition DAQ to be synchronized to an external clock (e.g. the laser sync clock). Synchronizing to the laser clock will ensure a constant number of laser pulses per pixel in linear scanning and a consistent relation between laser pulses per pixel as a function of pixel location along a line in resonant scanning (see Resonant Line Formation.)

Tip

Laser pulses per pixel along lines can be calculated using the scanimage utility function Compute Resonant Scan Mask by entering the laser rep rate in place of the DAQ sampling rate.

Synchronization to the laser clock useful for premium features in ScanImage such as acquisition gating for low rep rate lasers and time correlated photon counting.

Hardware Configuration

../_images/HSvDAQ+IN.png

vDAQ Clock Wiring

The Laser Clock is connected to the SMB port labeled IN on the vDAQ PCIe card (colored blue).

../_images/Laser+Clock+Sync.png

NI Clock Wiring

The Laser Clock is connected to the CLK IN SMB connector on the NI FlexRIO adapter module.

The frequency of the external clock has to be less than or equal to the maximum specified sample rate of the acquisition DAQ. There are lower bounds as well. A table is included below with the suitable range of input clock frequencies by DAQ:

DAQ

Frequency Range

vDAQ

62.5 MHz - 125 MHz

vDAQ-HS

62.5 MHz - 84.375 MHz

NI 5732

20 MHz - 80 MHz

NI 5734

50 MHz - 120 MHz

NI 5771

850 MHz - 1.5 GHz

In the case of the high speed vDAQ, the external clock actually needs to be within the range of 62.5 - 84.375 MHz. With a vDAQ, If the external clock rate is significantly slower than the max sampling rate of the DAQ (as is necessarily the case with the high speed vDAQ) an internal clock multiplier value can be specified during configuration to set the sampling rate as a multiple of the external clock.

Note

With the high speed vDAQ the multiplier must be set to 32. The input range multiplied by 32 gives the range of sampling rates that the vDAQ is capable of - 2.0 GHz to 2.7GHz.

If in doubt of the laser clock signal frequency and amplitude, verify with a high speed oscilloscope set to 50 Ohms input impedance before connecting it to the digitizer.


ScanImage® Configuration

There are currently two places where synchronization can be configured for vDAQs:

  • the resource configuration window under the vDAQ Scan System page (scanimage.components.scan2d.RggScan) in the Advanced tab.

  • the Signal Conditioning Controls GUI’s Sample Clock and Laser Trigger Settings panels.

From the resource configuration, specify whether to sync to an external clock, what the rate of the external clock is, and what to multiply that clock by (i.e. how many samples per laser pulse). The product of the laser rep rate and the multiplier must be within the acceptable range of sampling rates of the vDAQ.

In the case of the high speed vDAQ, the multiplier must be set to 32. This will bring the input clock rate from 62.5 - 84.375 MHz to 2.0 - 2.7 GHz.

Clicking Apply will apply the sync settings and save them to the machine data file.

../_images/Sync+vDAQ+RC.png

To configure from the signal conditioning controls, set the clock source to External and select the ClK IN port from the Laser Trigger Settings panel under input terminal. Enter the nominal external clock rate and the multiplier in the Sample Clock Settings panel. Lastly, click Apply Clock Settings from the Sample Clock Settings panel. This will apply the sync settings and save them to the machine data file.

An 80 MHz signal is routed to both the CLK IN and high speed analog input to show synchronization of sampling to the clock. The synchronization to the external clock is not achieved until Apply Clock Settings is clicked.

Otherwise, if using NI DAQs, see the advanced tab of the NI Resonant or NI Linear Scan System configuration. There is no onboard clock multiplier, so if multiple samples per laser pulse is desired, then an external clock multiplier such as the AD9516 can be used.

../_images/Sync+NI+RC.png ../_images/Sync+NI+Lin+RC.png

Note

The laser trigger port is specified separately as it is possible to gate or temporally demux signals without synchronization. It is also possible to gate or temporally demux signals relative to a slower laser when sampling is synchronized to a second, faster laser.

In every case, the parameter External Sample Clock Rate is the nominal rate of the external clock and is used within ScanImage® as a first approximation to determine the scan parameters. To ensure maximum accuracy, ScanImage® will validate the stability and exact rate of the laser clock on every start of an Acquisition. If ScanImage® detects an unstable clock, it will report an error and abort the acquisition.


Troubleshooting

../_images/Laser+Clock+Signal+Quality.png

Laser Clock Filtering

A noisy laser clock can cause the acquisition DAQ to become unstable. An external circuit (e.g. a Schmitt Trigger) is required to clean the clock for use with ScanImage.

Laser Clock Signal Quality

The external clock connected to the NI digitizer module must comply to the parameters outlined in the NI5732/5734 user manual, page 36, section ‘CLK IN’. If the fast photodiode output of the laser (laser clock output) does not fulfill these specifications, the signal needs to be filtered by an external circuit (e.g. a Schmitt trigger) before it can be connected to the digitizer input (See figure at right).

Alternatively, an external fast photodiode can be used that fulfills the electrical specifications required by the NI digitizer module.

Attention

For high frequency signals, electrical termination is required. The NI5732/5734 Clock input connector is single-ended with a 50Ohm termination. Use cables with 50Ohms characteristic impedance and make sure the source of the clock signal is 50Ohm terminated as well. Correct impedance matching will eliminate reflections in the transmission line.






../_images/Laser+Clock+Sync+Phase.png

Sampling Phase Delay

Various delays can lead to a phase offset between the sampling sweet spot and the actual sampling of the signal.

Sampling Phase Delay

Delays between the emission of the laser pulse and the registration of a sample clock by the digitizer lead to a phase shift between the laser pulse and the acquisition of the PMT signal. This phase shift depends on delays in the photodiode that generates the laser pulse clock, cable delays and ultimately on delays in the PMT and preamplifier.

With a vDAQ, such phase delay can be accounted for with the Trigger Filter (Ticks) setting within the laser trigger settings panel of the Signal Conditioning Controls window. Ticks is a unit of time defined as the duration between two consecutive samples. At the moment, between successive launches of ScanImage, the trigger filter may need adjustment to realign sampling to the PMT signal.

Alternatively, a delay switch box can be used.

Tip

The laser pulse separation time of a laser with 80MHz repetition rate is 12.5ns. Because of this short time interval a crude way of adjusting the phase is to vary the cable length used for connecting the laser clock output to the FlexRIO digitizer module in a range of c*12.5ns = 3.7m


Anti-Aliasing Filter

../_images/Laser+Clock+Filter+settings.png

By default with the NI 5732/5734, ScanImage® enables a hardware Bessel filter to eliminate aliasing effects and to reduce high frequency interference (see NI 5732/5734 manual page 17,22). When syncing to a laser clock, it might be preferable to deactivate this filter in software. To change the filter settings of the FlexRIO digitizer module, choose from one of the two methods in the info panel. The property hSI.hResScan.channelsFilter accepts three possible values: ‘none’ ‘bessel’ ‘elliptic’.

Method 1

After starting ScanImage, enter the following command in the Matlab command window to deactivate the anti-aliasing filter:

>> hSI.hResScan.channelsFilter = ‘none’;

Method 2

  • In the ScanImage® main window choose Settings > User Settings

  • Click the v symbol in the right bottom corner to expand the window

  • Locate the entry hSI.hResScan.channelsFilter and activate the checkbox to add it to the Current USR Properties

  • Locate the setting hSI.hResScan.channelsFilter in the list ‘Current USR Properties’ and change the value to ‘none’