top bar

Hardware-based Synchronization in Micro-Manager

Revision as of 11:45, 26 September 2013 by Arthuredelstein (Talk | contribs)

Hardware synchronization

What is hardware triggering?

Micro-Manager's bread and butter is multi-dimensional acquisition, where (typically) monochrome images are acquired in different channels and at different focal positions and XY positions. In multi-dimensional acquisition it's often desirable to acquire images as quickly and precisely as possible. Some illumination devices, such as AOTF laser controllers, LED sources, can switch between channels extremely quickly, with submillisecond switching times. Likewise, some piezo-drive focus drives can move very fast. To take advantage of these fast operations, one would like to minimize the delays between settings each new channel and Z slices and the acquisition of an image from the camera.

Unfortunately, computers have limits in their ability to provide fast and precise control of connected microscope hardware. Many control protocols contain unpredictable delays. And since the commonly-used operating systems are not "real time," there is never a guarantee that a task will be executed within a certain time frame. To achieve the tightest synchronization and fastest acquisition possible, it's necessary to use external hardware to electronically synchronize the equipment.

Since 2011, Micro-Manager has included growing support for hardware triggering of certain devices to enable this kind of synchronization. We are pleased to note that Micro-Manager's user interface require the addition of no new buttons, menus or other doodads to make use hardware triggering. Once the microscope hardware has been set up, users don't have to worry about the details of how channels and slices are acquired -- they just request what images they want, and Micro-Manager takes care of figuring out how to acquire the images, making use of hardware triggering whenever possible.

How hardware triggering works in Micro-Manager

Many microscope hardware components have inputs and outputs for TTL signals (see our Micro-Manager tutorial) that can be used for synchronization. These TTLs are usually physically connected by BNC connectors.

Micro-Manager specifically offers built-in support for hardware triggering in which a TTL signal from the camera drives events in other devices (i.e. the camera is the clock). The "trigger out" signal of the camera is connected to the "trigger input" of another device controlling the channel or Z position.

Certain Micro-Manager device adapters, when installed, indicate to the Micro-Manager application that hardware triggering is available. In principle, Micro-Manager's programming interface allows any property of any device to support triggering, as well as Z stages, XY-stages (although most XY stages will be too slow for this approach). Currently, the device adapters that have been written to support triggering are:

Each of these device has a property through which the user can turn on and off triggering (often called "sequencing"). (Examples for device adapter developers how to write code for sequencable devices can be found in the Arduino device adapter source code.)

When executing an multi-dimensional acquisition, Micro-Manager's acquisition engine opportunistically and transparently uses hardware triggering whenever possible. For instance, if the users reqeusts a Z-stack and Micro-Manager detects that a triggerable piezo Z drive is connected, the application will automatically upload a sequence of the desired Z-positions to the piezo Z-drive controller and then order the camera to take a sequence of n images where n is the number of slices in the stack. The trigger device will then receive TTL signals from the camera and automatically move the Z-stage through the requested stack, so that the camera precisely images each Z slice in turn. Micro-Manager will then automatically attached the correct "slice index" tag in the metadata thus display the images coming from the camera correctly as a Z-stack. If Time Points have also been selected, then Micro-Manager will run a triggered Z stack at every time point.

Likewise, if the user requests a multi-dimensional acquisition with a sequence of channels that require only hardware-triggerable properties, (for instance, then selection of a laser line through an AOTF controller), then Micro-Manager will load the sequence of AOTF states to the controller and rely on the hardware triggering to switch channels. If multiple time points and zero interval between frames has been requested, then channel triggering will cycle for as long as necessary to produce a multi-channel "movie."

Triggering can even be carried out with both Z-position and channel triggering, to allow multichannel, volumetric images to be acquired very quickly and precisely. The Micro-Manager team demonstrated this capability at the 2011 ASCB meeting (see here for a description and an example movie).

© Micro-Manager : Vale Lab, UCSF 2006-2011 | All Rights Reserved | Contact