Scanimage 2017 : How Resonant Scanning Flyback Works

Does the scanning switch directions in between frames when in resonant mode? 

Does the slow axis go back to the top of the frame for each acquisition?

Is there a way to measure this event in Scanimage 2015 to get an exact time delay in between the last scan of one frame and the first frame of the next due to the flyback?


Yes, the slow axis (galvo) follows a (smoothed) sawtooth pattern. After each frame, the slow axis flies back to the starting position.

In ScanImage 2015/2016, you can adjust the flyback time in the configuration dialog.

You can plot the output waveform of the galvo in Matlab with the following command:



In ScanImage 2015/2016, the resonant scanner is the timing master of the system. Since the frequency of the resonant scanner can change slightly over time (mostly due to temperature changes), it is hard to predict the exact timing ahead of time.

However, during an active scan, you can measure the time delay between frames by reading out the frame clock with an oscilloscope.

The frame clock is exported on PFI6 of the resonant/galvo control board.

The frame clock goes high when the first sample of the first pixel of a frame is acquired and it goes low after the last sample of the last pixel of the frame is acquired.

The low time of the frame clock is exactly the time when no data is acquired.


Useful ScanImage Links:

  1. Fill Fraction
  2. Period Trigger
  3. Synchronization to Laser Clock
  4. Acquisition Triggering
  5. Configuring ResScan (Resonant Scanning)
  6. Configuration Controls