areaDetector Andor driver

March 6, 2012

Matthew Pearson, Diamond Light Source

Mark Rivers, University of Chicago

Table of Contents

Introduction

This is an EPICS areaDetector driver for CCD and CMOS detectors from Andor Technology. It has been tested on the Andor iKon CCD cameras with USB interface, but should work with other cameras as well. The driver is supported on 32-bit and 64- bit Linux and 32-bit and 64-bit Windows.

The driver currently provides access to most of the features of the Andor cameras:

This driver inherits from ADDriver. It implements many of the parameters in asynNDArrayDriver.h and in ADArrayDriver.h. It also implements a number of parameters that are specific to the Andor detectors. The Andor class documentation describes this class in detail.

This document does not attempt to explain the meaning of the Andor-specific parameters. The Andor Software Development Kit documentation provides this detailed information, and the reader is referred to that document.

Implementation of standard driver parameters

The following table describes how the Andor driver implements some of the standard driver parameters.

Implementation of Parameters in asynNDArrayDriver.h and ADDriver.h, and EPICS Record Definitions in ADBase.template and NDFile.template
Parameter index variable EPICS record name Description
ADTriggerMode $(P)$(R)TriggerMode
$(P)$(R)TriggerMode_RBV
Sets the trigger mode for the detector. Options are:
  • Internal
  • External
  • External Start
  • External Exposure
  • External FVP
  • Software
ADImageMode $(P)$(R)ImageMode
$(P)$(R)ImageMode_RBV
Sets the image mode for the detector. Options are:
  • Single
  • Multiple
  • Continuous
  • Fast Kinetics
The relation of ImageMode to the Andor acquisition modes are given in the table below.
ADNumExposures $(P)$(R)NumExposures
$(P)$(R)NumExposures_RBV
Sets the number of accumulations (performed in software in Andor's driver) in Single and Multiple modes
ADNumImages $(P)$(R)NumImages
$(P)$(R)NumImages_RBV
Sets the number of images to take in multiple (Kinetics Series) mode
ADAcquirePeriod $(P)$(R)AcquirePeriod
$(P)$(R)AcquirePeriod_RBV
Sets the time between images in Multiple (Kinetics Series) and Continuous (Run Till Abort) modes
ADGain $(P)$(R)Gain
$(P)$(R)Gain_RBV
Sets the pre-amp gain of the detector. For the Andor driver the Gain is treated as an integer index into the supported gain table of the specific detector. The list of supported gains for the detector gain be found by typing "asynReport 1,ANDOR" at the IOC prompt. For example, on the iKon-M the relationship is:
  • Gain=0 Andor gain=1.0
  • Gain=1 Andor gain=2.0
  • Gain=2 Andor gain=4.0
NDDataType $(P)$(R)DataType
$(P)$(R)DataType_RBV
Sets data type for reading out the detector. Allowed values are:
  • UInt16
  • UInt32
UInt16 can be used when reading out a 16-bit detector with NumExposures=1, (i.e. without accumulations), or when one can be sure that multiple accumulations will not overflow 16 bits. UInt32 should be used for 32-bit detectors or when multiple accumulations could cause 16-bit overflow.
ADTemperature $(P)$(R)Temperature
$(P)$(R)Temperature_RBV
Sets the setpoint temperature of the CCD (-120C to 20C)
ADTemperatureActual $(P)$(R)TemperatureActual Reads the actual temperature of the CCD
NDFileFormat $(P)$(R)FileFormat
$(P)$(R)FileFormat_RBV
Selects the file format for saving files with the Andor driver. Choices are:
  • TIFF
  • BMP
  • SIF
  • EDF
  • RAW

The following table shows the relationship of ImageMode to the Andor acquisition modes, and the meaning of NumExposures and NumImages.

Relationship of ImageMode to the Andor acquisition modes, and the meaning of NumExposures and NumImages.
ImageMode NumExposures AcquireTime AndorAccumulatePeriod NumImages AcquirePeriod Andor acquisition mode
Single 1 Sets exposure time Not applicable Not applicable Not applicable Single Scan
Single >1 Sets number of accumulations per image. Sets exposure time per accumulation Sets accumulation period (cycle time) Not applicable Not applicable Accumulate
Multiple Sets number of accumulations per image Sets exposure time per accumulation Sets accumulation period if NumExposures > 1 Sets number of images Sets time between images (cycle time) Kinetic Series
Continuous Not applicable Sets exposure time per image Not applicable Not applicable Sets time between images (cycle time) Run Till Abort
Fast Kinetics Not applicable Sets exposure time per sub-area Not applicable Controls number of sub-area exposures, each being followed by a vertical shift of SizeY. MinY controls the offset of the first row from the bottom of the CCD. SizeY controls the sub-area height. BinX and BinY control the horizontal and vertical binning. Not applicable Fast Kinetics

Andor specific parameters

The Andor driver implements the following parameters in addition to those in asynNDArrayDriver.h and ADDriver.h.

Parameter Definitions in andorCCD.h and EPICS Record Definitions in andorCCD.template
Parameter index variable asyn interface Access Description drvInfo string EPICS record name EPICS record type
AndorCoolerParam asynInt32 R/W Turn the CCD cooler on and off ANDOR_COOLER AndorCooler
AndorCooler_RBV
bo
bi
AndorTempStatusMessage asynOctet R/O Temperature status message. ANDOR_TEMP_STAT AndorTempStatus_RBV waveform
AndorMessage asynOctet R/O Other status message. ANDOR_MESSAGE AndorMessage_RBV waveform
AndorShutterMode asynInt32 R/W Selects the Andor shutter mode. Choices are:
  • Auto
  • Open
ANDOR_SHUTTER_MODE AndorShutterMode mbbo
AndorShutterExTTL asynInt32 R/W Selects the TTL polarity of an external shutter. Choices are:
  • Low To Open
  • High To Open
ANDOR_SHUTTER_EXTTL AndorShutterExTTL bo
AndorPALFileName asynOctet R/W Path and Filename of pallette file (used for TIFF and BMP file colours) (255 chars max). ANDOR_PAL_FILE_PATH PALFilePath waveform
AndorAdcSpeed asynInt32 R/W Switch between the slow (low noise) ADC and the fast ADC. Choices are:
  • 0.05 MHz
  • 2.5 MHz
ANDOR_ADC_SPEED AndorADCSpeed
AndorADCSpeed_RBV
mbbo
mbbi
AndorAccumulatePeriod asynFloat64 R/W Controls the period between accumulations when ImageMode=Single or Multiple and NumExposures>1. NOTE: Some Andor detectors (including the iKon) only support a single period when doing multiple accumulations in kinetic series mode. For these cameras ANDOR_ACCUMULATE_PERIOD has no effect, ACQUIRE_PERIOD determines the time between accumulations, and the time between images is 0, i.e. the next image starts as soon as the previous one is complete. ANDOR_ACCUMULATE_PERIOD AndorAccumulatePeriod
AndorAccumulatePeriod_RBV
ao
ai
AndorAccumulatePeriodActual asynFloat64 R/O Reads the actual value of AndorAccumulatePeriod, which may differ from the requested value due to timing limitations of the detector. ANDOR_ACCUMULATE_PERIOD_ACTUAL AndorAccumulatePeriodActual ai
AndorAcquireTimeActual asynFloat64 R/O Reads the actual value of ADAcquireTime, which may differ from the requested value due to timing limitations of the detector. ANDOR_ACQUIRE_TIME_ACTUAL AndorAcquireTimeActual ai
AndorAcquirePeriodActual asynFloat64 R/O Reads the actual value of ADAcquirePeriod, which may differ from the requested value due to timing limitations of the detector. ANDOR_ACQUIRE_PERIOD_ACTUAL AndorAcquirePeriodActual ai

Unsupported standard driver parameters

ColorMode, ReverseX, and ReverseY are currently not supported.

Usage

Always use channel access put callback when setting parameters.

If any of the parameters set are out of range or fail in some way, then the PV will be put into alarm state. This should be checked after every PV set.

An example palette file for a TIFF file is GREY.PAL in the iocAndor directory.

Configuration

The Andor driver is created with the andorCCDConfig command, either from C/C++ or from the EPICS IOC shell.

int andorCCDConfig(const char *portName,
                int maxBuffers, size_t maxMemory,
                const char* installPath,
                int priority, int stackSize)
  

For details on the meaning of the parameters to this function refer to the detailed documentation on the andorCCDConfig function in the andor_c_c_d.cpp documentation and in the documentation for the constructor for the andorCCD class.

There an example IOC boot directory and startup script (iocBoot/iocAndor/st.cmd) provided with areaDetector.

MEDM screen

The following shows the MEDM screen that is used to control the Andor detector. Note that the general purpose screen ADBase.adl can be used, but it exposes a few controls that are not applicable to the Andor, and lacks some fields that are important for the Andor.

Andor.adl is the main screen used to control the Andor driver.

Andor.adl

Andor.png

Restrictions

The following are known restrictions of the Andor driver. These should be fixed in a future release.