Files
ADAndor/documentation/andorDoc.html
2012-03-07 00:17:41 +00:00

637 lines
19 KiB
HTML
Executable File

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>areaDetector Andor driver</title>
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
</head>
<body>
<div style="text-align: center">
<h1>
areaDetector Andor driver</h1>
<h2>
March 6, 2012</h2>
<h2>
Matthew Pearson, Diamond Light Source</h2>
<h2>
Mark Rivers, University of Chicago</h2>
</div>
<h2>
Table of Contents</h2>
<ul>
<li><a href="#Introduction">Introduction</a></li>
<li><a href="#StandardNotes">Implementation of standard driver parameters</a></li>
<li><a href="#Driver_parameters">Andor specific parameters</a></li>
<li><a href="#Unsupported">Unsupported standard driver parameters</a></li>
<li><a href="#Usage">Usage</a></li>
<li><a href="#Configuration">Configuration</a></li>
<li><a href="#MEDM_screen">MEDM screen</a></li>
<li><a href="#Restrictions">Restrictions</a> </li>
</ul>
<h2 id="Introduction" style="text-align: left">
Introduction</h2>
<p>
This is an <a href="http://www.aps.anl.gov/epics">EPICS</a> <a href="areaDetector.html">
areaDetector</a> driver for CCD and CMOS detectors from <a href="http://www.andor.com">
Andor Technology</a>. 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.</p>
<p>
The driver currently provides access to most of the features of the Andor cameras:</p>
<ul>
<li>All Andor acquisition modes (Single Scan, Accumulate, Kinetics, Run Till Abort,
and Fast Kinetics</li>
<li>Control of the exposure time, accumulate cycle time, and kinetic cycle time</li>
<li>Support for all of the Andor trigger modes</li>
<li>Support for all of the Andor shutter modes</li>
<li>Support for reading the detectors with 16-bit or 32-bit depth</li>
<li>Saving files using the Andor SDK and/or with the standard areaDetector plugins</li>
<li>Change the ADC sampling speed (0.05MHz and 2.5MHz on the iKon)</li>
<li>Set a region of interest (a smaller region can be read out faster)</li>
<li>Set and monitor the CCD temperature</li>
</ul>
<p>
This driver inherits from <a href="areaDetectorDoc.html#ADDriver">ADDriver</a>.
It implements many of the parameters in <a href="areaDetectorDoxygenHTML/asyn_n_d_array_driver_8h.html">
asynNDArrayDriver.h</a> and in <a href="areaDetectorDoxygenHTML/_a_d_driver_8h.html">
ADArrayDriver.h</a>. It also implements a number of parameters that are specific
to the Andor detectors. The <a href="areaDetectorDoxygenHTML/class_andor_c_c_d.html">
Andor class documentation</a> describes this class in detail.</p>
<p>
This document does not attempt to explain the meaning of the Andor-specific parameters.
The <a href="Andor_Software_Development_Kit.pdf" target="_blank">Andor Software Development
Kit documentation</a> provides this detailed information, and the reader is referred
to that document.
</p>
<h2 id="StandardNotes" style="text-align: left">
Implementation of standard driver parameters</h2>
<p>
The following table describes how the Andor driver implements some of the standard
driver parameters.
</p>
<table border="1" cellpadding="2" cellspacing="2" style="text-align: left">
<tbody>
<tr>
<td align="center" colspan="3">
<b>Implementation of Parameters in asynNDArrayDriver.h and ADDriver.h, and EPICS Record
Definitions in ADBase.template and NDFile.template</b></td>
</tr>
<tr>
<th>
Parameter index variable</th>
<th>
EPICS record name</th>
<th>
Description</th>
</tr>
<tr>
<td>
ADTriggerMode</td>
<td>
$(P)$(R)TriggerMode<br />
$(P)$(R)TriggerMode_RBV</td>
<td>
Sets the trigger mode for the detector. Options are:
<ul>
<li>Internal</li>
<li>External</li>
<li>External Start</li>
<li>External Exposure</li>
<li>External FVP</li>
<li>Software</li>
</ul>
</td>
</tr>
<tr>
<td>
ADImageMode</td>
<td>
$(P)$(R)ImageMode<br />
$(P)$(R)ImageMode_RBV</td>
<td>
Sets the image mode for the detector. Options are:
<ul>
<li>Single</li>
<li>Multiple</li>
<li>Continuous</li>
<li>Fast Kinetics</li>
</ul>
The relation of ImageMode to the Andor acquisition modes are given in the table
below. </td>
</tr>
<tr>
<td>
ADNumExposures</td>
<td>
$(P)$(R)NumExposures<br />
$(P)$(R)NumExposures_RBV</td>
<td>
Sets the number of accumulations (performed in software in Andor's driver) in Single
and Multiple modes</td>
</tr>
<tr>
<td>
ADNumImages</td>
<td>
$(P)$(R)NumImages<br />
$(P)$(R)NumImages_RBV</td>
<td>
Sets the number of images to take in multiple (Kinetics Series) mode </td>
</tr>
<tr>
<td>
ADAcquirePeriod</td>
<td>
$(P)$(R)AcquirePeriod<br />
$(P)$(R)AcquirePeriod_RBV</td>
<td>
Sets the time between images in Multiple (Kinetics Series) and Continuous (Run Till
Abort) modes</td>
</tr>
<tr>
<td>
ADGain</td>
<td>
$(P)$(R)Gain<br />
$(P)$(R)Gain_RBV</td>
<td>
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:
<ul>
<li>Gain=0 Andor gain=1.0</li>
<li>Gain=1 Andor gain=2.0</li>
<li>Gain=2 Andor gain=4.0</li>
</ul>
</td>
</tr>
<tr>
<td>
NDDataType</td>
<td>
$(P)$(R)DataType<br />
$(P)$(R)DataType_RBV</td>
<td>
Sets data type for reading out the detector. Allowed values are:
<ul>
<li>UInt16</li>
<li>UInt32</li>
</ul>
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. </td>
</tr>
<tr>
<td>
ADTemperature</td>
<td>
$(P)$(R)Temperature<br />
$(P)$(R)Temperature_RBV</td>
<td>
Sets the setpoint temperature of the CCD (-120C to 20C) </td>
</tr>
<tr>
<td>
ADTemperatureActual</td>
<td>
$(P)$(R)TemperatureActual</td>
<td>
Reads the actual temperature of the CCD</td>
</tr>
<tr>
<td>
NDFileFormat</td>
<td>
$(P)$(R)FileFormat<br />
$(P)$(R)FileFormat_RBV</td>
<td>
Selects the file format for saving files with the Andor driver. Choices are:
<ul>
<li>TIFF</li>
<li>BMP</li>
<li>SIF</li>
<li>EDF</li>
<li>RAW</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>
The following table shows the relationship of ImageMode to the Andor acquisition
modes, and the meaning of NumExposures and NumImages.</p>
<table border="1">
<tbody>
<tr>
<td align="center" colspan="7">
<b>Relationship of ImageMode to the Andor acquisition modes, and the meaning of NumExposures
and NumImages.</b></td>
</tr>
<tr>
<th>
ImageMode</th>
<th>
NumExposures</th>
<th>
AcquireTime</th>
<th>
AndorAccumulatePeriod</th>
<th>
NumImages</th>
<th>
AcquirePeriod</th>
<th>
Andor acquisition mode</th>
</tr>
<tr>
<td>
Single</td>
<td>
1</td>
<td>
Sets exposure time</td>
<td>
Not applicable</td>
<td>
Not applicable</td>
<td>
Not applicable</td>
<td>
Single Scan</td>
</tr>
<tr>
<td>
Single</td>
<td>
&gt;1 Sets number of accumulations per image.</td>
<td>
Sets exposure time per accumulation</td>
<td>
Sets accumulation period (cycle time)</td>
<td>
Not applicable</td>
<td>
Not applicable</td>
<td>
Accumulate</td>
</tr>
<tr>
<td>
Multiple</td>
<td>
Sets number of accumulations per image</td>
<td>
Sets exposure time per accumulation</td>
<td>
Sets accumulation period if NumExposures &gt; 1</td>
<td>
Sets number of images </td>
<td>
Sets time between images (cycle time)</td>
<td>
Kinetic Series</td>
</tr>
<tr>
<td>
Continuous</td>
<td>
Not applicable</td>
<td>
Sets exposure time per image</td>
<td>
Not applicable</td>
<td>
Not applicable</td>
<td>
Sets time between images (cycle time)</td>
<td>
Run Till Abort</td>
</tr>
<tr>
<td>
Fast Kinetics</td>
<td>
Not applicable</td>
<td>
Sets exposure time per sub-area</td>
<td>
Not applicable</td>
<td>
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.</td>
<td>
Not applicable</td>
<td>
Fast Kinetics</td>
</tr>
</tbody>
</table>
<h2 id="Driver_parameters" style="text-align: left">
Andor specific parameters</h2>
<p>
The Andor driver implements the following parameters in addition to those in asynNDArrayDriver.h
and ADDriver.h.
</p>
<table border="1" cellpadding="2" cellspacing="2" style="text-align: left">
<tbody>
<tr>
<td align="center" colspan="7">
<b>Parameter Definitions in andorCCD.h and EPICS Record Definitions in andorCCD.template</b>
</td>
</tr>
<tr>
<th>
Parameter index variable</th>
<th>
asyn interface</th>
<th>
Access</th>
<th>
Description</th>
<th>
drvInfo string</th>
<th>
EPICS record name</th>
<th>
EPICS record type</th>
</tr>
<tr>
<td>
AndorCoolerParam</td>
<td>
asynInt32</td>
<td>
R/W</td>
<td>
Turn the CCD cooler on and off</td>
<td>
ANDOR_COOLER</td>
<td>
AndorCooler<br />
AndorCooler_RBV</td>
<td>
bo<br />
bi</td>
</tr>
<tr>
<td>
AndorTempStatusMessage</td>
<td>
asynOctet</td>
<td>
R/O</td>
<td>
Temperature status message.</td>
<td>
ANDOR_TEMP_STAT</td>
<td>
AndorTempStatus_RBV</td>
<td>
waveform</td>
</tr>
<tr>
<td>
AndorMessage</td>
<td>
asynOctet</td>
<td>
R/O</td>
<td>
Other status message.</td>
<td>
ANDOR_MESSAGE</td>
<td>
AndorMessage_RBV</td>
<td>
waveform</td>
</tr>
<tr>
<td>
AndorShutterMode</td>
<td>
asynInt32</td>
<td>
R/W</td>
<td>
Selects the Andor shutter mode. Choices are:
<ul>
<li>Auto</li>
<li>Open</li>
</ul>
</td>
<td>
ANDOR_SHUTTER_MODE</td>
<td>
AndorShutterMode</td>
<td>
mbbo</td>
</tr>
<tr>
<td>
AndorShutterExTTL</td>
<td>
asynInt32</td>
<td>
R/W</td>
<td>
Selects the TTL polarity of an external shutter. Choices are:
<ul>
<li>Low To Open</li>
<li>High To Open</li>
</ul>
</td>
<td>
ANDOR_SHUTTER_EXTTL</td>
<td>
AndorShutterExTTL</td>
<td>
bo</td>
</tr>
<tr>
<td>
AndorPALFileName</td>
<td>
asynOctet</td>
<td>
R/W</td>
<td>
Path and Filename of pallette file (used for TIFF and BMP file colours) (255 chars
max). </td>
<td>
ANDOR_PAL_FILE_PATH</td>
<td>
PALFilePath</td>
<td>
waveform</td>
</tr>
<tr>
<td>
AndorAdcSpeed</td>
<td>
asynInt32</td>
<td>
R/W</td>
<td>
Switch between the slow (low noise) ADC and the fast ADC. Choices are:
<ul>
<li>0.05 MHz</li>
<li>2.5 MHz</li>
</ul>
</td>
<td>
ANDOR_ADC_SPEED</td>
<td>
AndorADCSpeed<br />
AndorADCSpeed_RBV</td>
<td>
mbbo<br />
mbbi</td>
</tr>
<tr>
<td>
AndorAccumulatePeriod</td>
<td>
asynFloat64</td>
<td>
R/W</td>
<td>
Controls the period between accumulations when ImageMode=Single or Multiple and
NumExposures&gt;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.</td>
<td>
ANDOR_ACCUMULATE_PERIOD</td>
<td>
AndorAccumulatePeriod<br />
AndorAccumulatePeriod_RBV</td>
<td>
ao<br />
ai</td>
</tr>
<tr>
<td>
AndorAccumulatePeriodActual</td>
<td>
asynFloat64</td>
<td>
R/O</td>
<td>
Reads the actual value of AndorAccumulatePeriod, which may differ from the requested
value due to timing limitations of the detector. </td>
<td>
ANDOR_ACCUMULATE_PERIOD_ACTUAL</td>
<td>
AndorAccumulatePeriodActual</td>
<td>
ai</td>
</tr>
<tr>
<td>
AndorAcquireTimeActual</td>
<td>
asynFloat64</td>
<td>
R/O</td>
<td>
Reads the actual value of ADAcquireTime, which may differ from the requested value
due to timing limitations of the detector. </td>
<td>
ANDOR_ACQUIRE_TIME_ACTUAL</td>
<td>
AndorAcquireTimeActual</td>
<td>
ai</td>
</tr>
<tr>
<td>
AndorAcquirePeriodActual</td>
<td>
asynFloat64</td>
<td>
R/O</td>
<td>
Reads the actual value of ADAcquirePeriod, which may differ from the requested value
due to timing limitations of the detector. </td>
<td>
ANDOR_ACQUIRE_PERIOD_ACTUAL</td>
<td>
AndorAcquirePeriodActual</td>
<td>
ai</td>
</tr>
</tbody>
</table>
<h2 id="Unsupported" style="text-align: left">
Unsupported standard driver parameters</h2>
<p>
ColorMode, ReverseX, and ReverseY are currently not supported.</p>
<h2 id="Usage" style="text-align: left">
Usage</h2>
<p>
Always use channel access put callback when setting parameters.</p>
<p>
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.
</p>
<p>
An example palette file for a TIFF file is GREY.PAL in the iocAndor directory.</p>
<h2 id="Configuration">
Configuration</h2>
<p>
The Andor driver is created with the andorCCDConfig command, either from C/C++ or
from the EPICS IOC shell.</p>
<pre>int andorCCDConfig(const char *portName,
int maxBuffers, size_t maxMemory,
const char* installPath,
int priority, int stackSize)
</pre>
<p>
For details on the meaning of the parameters to this function refer to the detailed
documentation on the andorCCDConfig function in the <a href="areaDetectorDoxygenHTML/andor_c_c_d_8cpp.html">
andor_c_c_d.cpp documentation</a> and in the documentation for the constructor
for the <a href="areaDetectorDoxygenHTML/class_andor_c_c_d.html">andorCCD class</a>.
</p>
<p>
There an example IOC boot directory and startup script (<a href="andor_st_cmd.html">iocBoot/iocAndor/st.cmd)</a>
provided with areaDetector.
</p>
<h2 id="MEDM_screen" style="text-align: left">
MEDM screen</h2>
<p>
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.</p>
<p>
<code>Andor.adl</code> is the main screen used to control the Andor driver.
</p>
<div style="text-align: center">
<h3 style="text-align: center">
Andor.adl</h3>
<img alt="Andor.png" src="Andor.png" /></div>
<h2 id="Restrictions" style="text-align: left">
Restrictions</h2>
<p>
The following are known restrictions of the Andor driver. These should be fixed
in a future release.</p>
<ul>
<li>No support for detector output signals (trigger and gate).</li>
<li>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.</li>
<li>Saving files using the Andor driver in Multiple and Continuous modes results in
errors because the Andor SDK functions won't save files if acquisition is in progress.
Saving files in Single mode and Fast Kinetics mode works fine.</li>
<li>Trigger modes have not been tested.</li>
</ul>
</body>
</html>