Files
ADAndor/documentation/andor3Doc.html
2013-02-19 19:58:29 +00:00

772 lines
24 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 Andor3 driver</title>
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
</head>
<body>
<div style="text-align: center">
<h1>
areaDetector Andor3 driver</h1>
<h2>
February 19, 2013</h2>
<h2>
Phillip Sorensen, Cornell University</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 CMOS detectors from <a href="http://www.andor.com">Andor
Technology</a>. It has been tested on the Andor Neo sCMOS camera with 3-tap
Camera Link interface, but should work with other cameras (e.g. Zyla) as well. The
driver is supported on 32-bit and 64- bit Linux and 32-bit and 64-bit Windows. The
driver is called "Andor3" because it is built with Version 3 of the Andor Software
Development Kit (SDK). This version of the SDK is required to work with the Andor
sCMOS cameras, and currently does <b>not</b> work with the Andor CCD cameras.</p>
<p>
The driver provides access to essentially all of the features of the Andor sCMOS
cameras:</p>
<ul>
<li>Fixed number of frames or continuous acquisition.</li>
<li>Multiple accumulations per frame.</li>
<li>Readout frequency</li>
<li>Readout mode (11-bit low noise, 11-bit high-well, 16 bit combination).</li>
<li>Support for all of the Andor trigger modes</li>
<li>Binning and Area Of Interest (AOI) readout</li>
<li>Set and monitor the camera temperature</li>
<li>Set the camera fan speed.</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/classandor3.html">andor3
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 Andor Software Development Kit documentation provides this detailed information.
Andor does not allow me to redistribute the SDK documentation as part of areaDetector.
It must be obtained from <a href="http://www.andor.com/scientific-software/software-development-kit/andor-sdk">
Andor's Web site</a>.
</p>
<p>
The Andor3 SDK is very well designed. Camera parameters (e.g. exposure time, binning)
are called "features". Features can be integer, float, bool, string, or enum. Each
feature can be queried to determine if it is implemented on the current detector.
In addition:</p>
<ul>
<li>For integer and float features:
<ul>
<li>What is the valid range of values for the current camera under the current conditions?</li>
</ul>
</li>
<li>For enum features
<ul>
<li>How many enum choices are there?</li>
<li>For each enum choice:
<ul>
<li>What is the string associated with that enum choice?</li>
<li>Is that choice implemented for the current camera?</li>
<li>If it is implemented, is it valid under the current conditions?</li>
</ul>
</li>
</ul>
</li>
<li>Ability to register a user-defined C callback function that will be called whenever
a feature value changes. These changes can be the indirect result of changing another
feature. For example, changing the binning might force the exposure time to change,
etc.</li>
</ul>
<p>
The areaDetector driver uses these features. All of the enum menus are built dynamically
at iocInit, they are not preset in the template file. This ensures that the enum
choices match the actual capabilities of the current camera. Whenever an integer
or float parameter is changed it is checked to ensure it is within the current valid
bounds for that feature. The feature callback is used to ensure that the current
EPICS readback value of that parameter matches the actual camera value, without
requiring the driver to poll.</p>
<p>
areaDetector includes the header and library files required to build the andor3
driver on any Linux or Windows computer. However, it does not include the shareable
libraries, DLLs or drivers to actually run a detector. Those must be obtained from
Andor, either by purchasing their SDK or their Solis application software. On Windows
the path to the directory containing the Andor DLLs from the SDK or Solis must be
added to the PATH environment variable when running the areaDetector IOC. On Linux
the path to the directory containing the Andor shareable libraries from the SDK
must be added to the LD_LIBRARY_PATH environment variable when running the areaDetector
IOC.</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 for the Neo are:
<ul>
<li>Internal</li>
<li>Software</li>
<li>External</li>
<li>External Start</li>
<li>External Exposure</li>
<li>Advanced</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>Fixed</li>
<li>Continuous</li>
</ul>
Fixed counts collects NumImages images, continuous acquires continuously until acquisition
is stopped. </td>
</tr>
<tr>
<td>
ADNumExposures</td>
<td>
$(P)$(R)NumExposures<br />
$(P)$(R)NumExposures_RBV</td>
<td>
Sets the number of accumulations per image. This is performed in Andor's driver,
not on the chip.</td>
</tr>
<tr>
<td>
ADNumImages</td>
<td>
$(P)$(R)NumImages<br />
$(P)$(R)NumImages_RBV</td>
<td>
Sets the number of images to take when ImageMode=Fixed.</td>
</tr>
<tr>
<td>
ADAcquirePeriod</td>
<td>
$(P)$(R)AcquirePeriod<br />
$(P)$(R)AcquirePeriod_RBV</td>
<td>
Sets the FrameRate (=1./AcquirePeriod). The FrameRate can also be set directly.
The minimum AcquirePeriod (maximum FrameRate) depends on a number of other parameters,
including the A3Binning, SizeX, SizeY, ReadoutRate, A3ShutterMode, PixelEncoding,
and Overlap.</td>
</tr>
<tr>
<td>
NDDataType</td>
<td>
$(P)$(R)DataType<br />
$(P)$(R)DataType_RBV</td>
<td>
The data type for the image data. Allowed values are:
<ul>
<li>UInt16</li>
<li>UInt32</li>
</ul>
The DataType is selected automatically, based upon the PixelEncoding record. The
data type will be UInt32 if PixelEncoding is Mono32, and UInt16 for all other values
of PixelEncoding. PixelEncoding=Mono32 can be used when A3Binning &gt; 1x1, or when
multiple accumulations (NumExposures &gt; 1) 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 camera.</td>
</tr>
<tr>
<td>
ADTemperatureActual</td>
<td>
$(P)$(R)TemperatureActual</td>
<td>
Reads the actual temperature of the camera.</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 andor3.cpp and EPICS Record Definitions in andor3.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 align="center" colspan="7">
<b>Version information</b> </td>
</tr>
<tr>
<td>
Andor3SerialNumber</td>
<td>
asynOctet</td>
<td>
R/O</td>
<td>
Camera serial number</td>
<td>
A3_SERIAL_NUMBER</td>
<td>
SerialNumber</td>
<td>
stringin</td>
</tr>
<tr>
<td>
Andor3FirmwareVersion</td>
<td>
asynOctet</td>
<td>
R/O</td>
<td>
Camera firmware version</td>
<td>
A3_FIRMWARE_VERSION</td>
<td>
FirmwareVersion</td>
<td>
stringin</td>
</tr>
<tr>
<td>
Andor3SoftwareVersion</td>
<td>
asynOctet</td>
<td>
R/O</td>
<td>
SDK software version</td>
<td>
A3_SOFTWARE_VERSION</td>
<td>
SoftwareVersion</td>
<td>
stringin</td>
</tr>
<tr>
<td>
Andor3ControllerID</td>
<td>
asynOctet</td>
<td>
R/O</td>
<td>
Camera controller ID</td>
<td>
A3_CONTROLLER_ID</td>
<td>
ControllerID</td>
<td>
stringin</td>
</tr>
<tr>
<td align="center" colspan="7">
<b>Cooling control and status</b> </td>
</tr>
<tr>
<td>
Andor3SensorCooling</td>
<td>
asynInt32</td>
<td>
R/W</td>
<td>
Turn the sensor cooler on and off</td>
<td>
A3_SENSOR_COOLING</td>
<td>
SensorCooling<br />
SensorCooling_RBV</td>
<td>
bo<br />
bi</td>
</tr>
<tr>
<td>
Andor3TempStatus</td>
<td>
asynInt32</td>
<td>
R/O</td>
<td>
Temperature status. Values and strings on the Neo are:
<ul>
<li>0 = Cooler Off</li>
<li>1 = Stabilized</li>
<li>2 = Cooling</li>
<li>3 = Drift</li>
<li>4 = Not Stabilized</li>
<li>5 = Fault</li>
</ul>
</td>
<td>
A3_TEMP_STATUS</td>
<td>
TempStatus_RBV</td>
<td>
mbbi</td>
</tr>
<tr>
<td>
Andor3TempControl</td>
<td>
asynInt32</td>
<td>
R/W</td>
<td>
Temperature setpoint value in degrees C. On the cooled cameras (e.g. Neo) the temperature
is set to discrete values, rather than continuously with the Temperature record,
because the firmware does pixel corrections for specific temperatures. Choices on
the Neo are:
<ul>
<li>0 = -15</li>
<li>1 = -20</li>
<li>2 = -25</li>
<li>3 = -30</li>
<li>4 = -35</li>
<li>5 = -40</li>
</ul>
</td>
<td>
A3_TEMP_CONTROL</td>
<td>
TempControl<br />
TempControl_RBV</td>
<td>
mbbo<br />
mbbi</td>
</tr>
<tr>
<td>
Andor3FanSpeed</td>
<td>
asynInt32</td>
<td>
R/W</td>
<td>
Fan speed. Choices on the Neo are:
<ul>
<li>0 = Off</li>
<li>1 = Low</li>
<li>2 = On</li>
</ul>
</td>
<td>
A3_FAN_SPEED</td>
<td>
FanSpeed<br />
FanSpeed_RBV</td>
<td>
mbbo<br />
mbbi</td>
</tr>
<tr>
<td align="center" colspan="7">
<b>Readout control and status</b> </td>
</tr>
<tr>
<td>
Andor3ShutterMode</td>
<td>
asynInt32</td>
<td>
R/W</td>
<td>
Selects the shutter mode. Choices for the Neo are:
<ul>
<li>0 = Rolling</li>
<li>1 = Global</li>
</ul>
Rolling shutter mode interleaves exposure and readout. This is the fastest readout
mode, but means that each row of the sensor acquires data for a different time period.
In Rolling mode the exposure time is determined by the row readout time, and cannot
be independently controlled. In Global mode all pixels acquire for the same time
period and are then read out. The exposure time is independent of the readout time,
and can be as short as 9 microseconds on the Neo. </td>
<td>
A3_SHUTTER_MODE</td>
<td>
A3ShutterMode<br />
A3ShutterMode_RBV</td>
<td>
mbbo<br />
mbbi</td>
</tr>
<tr>
<td>
Andor3FrameRate</td>
<td>
asynFloat64</td>
<td>
R/W</td>
<td>
Frame rate. This is the reciprocal of ADAcquirePeriod, and is the units used to
control the Andor cameras. There are two limitations on the frame rate:
<ol>
<li>The maximum rate that the sensor can be read out into the RAM on the camera head.
The driver will limit the FrameRate to this value in all cases. This value can be
obtained for the current acquisition settings by typing "asynReport 1" to get a
detailed report from the Andor3 driver.</li>
<li>The maximum sustained frame transfer rate that the interface (e.g. CameraLink
card) can support. This value is contained in the TransferRate PV. It is permissible
to exceed this value for a limited number of frames, allowing the frames to accumulate
in the camera head RAM. The number of frames that will fit in the camera head RAM
is controlled by the PixelEncoding and the AOI parameters (A3Binning, SizeX, SizeY).
If the camera head RAM fills up the acquisition will hang, and must be stopped and
restarted.</li>
</ol>
</td>
<td>
A3_FRAME_RATE</td>
<td>
FrameRate<br />
FrameRate_RBV</td>
<td>
ao<br />
ai</td>
</tr>
<tr>
<td>
Andor3TransferRate</td>
<td>
asynFloat64</td>
<td>
R/O</td>
<td>
The maximum transfer rate in frames/s of the interface (e.g. CameraLink card). This
is the maximum sustained FrameRate which can be achieved. </td>
<td>
A3_TRANSFER_RATE</td>
<td>
TransferRate</td>
<td>
ai</td>
</tr>
<tr>
<td>
Andor3PreAmpGain</td>
<td>
asynInt32</td>
<td>
R/W</td>
<td>
Controls the pre-amp gain and readout mode. Choices for the Neo are:
<ul>
<li>0 = 11-bit (high well capacity)</li>
<li>1 = 11-bit (low noise)</li>
<li>2 = 16-bit (low noise &amp; high well capacity)</li>
</ul>
</td>
<td>
A3_PRE_AMP_GAIN</td>
<td>
PreAmpGain<br />
PreAmpGain_RBV</td>
<td>
mbbo<br />
mbbi</td>
</tr>
<tr>
<td>
Andor3PixelEncoding</td>
<td>
asynInt32</td>
<td>
R/W</td>
<td>
Controls the pixel encoding. Choices for the Neo are:
<ul>
<li>0 = Mono12</li>
<li>1 = Mono12Packed</li>
<li>2 = Mono16</li>
<li>9 = Mono32</li>
</ul>
Mono12 and Mono12Packed are only available when PreAmpGain is one of the 11-bit
modes. </td>
<td>
A3_PIXEL_ENCODING</td>
<td>
PixelEncoding<br />
PixelEncoding_RBV</td>
<td>
mbbo<br />
mbbi</td>
</tr>
<tr>
<td>
Andor3ReadoutRate</td>
<td>
asynInt32</td>
<td>
R/W</td>
<td>
Controls the ADC readout rate. Choices for the Neo are:
<ul>
<li>0 = 100 MHz</li>
<li>1 = 200 MHz</li>
<li>2 = 280 MHz</li>
</ul>
</td>
<td>
A3_READOUT_RATE</td>
<td>
ReadoutRate<br />
ReadoutRate_RBV</td>
<td>
mbbo<br />
mbbi</td>
</tr>
<tr>
<td>
Andor3ReadoutTime</td>
<td>
asynFloat64</td>
<td>
R/O</td>
<td>
The readout time from the sensor into camera RAM. </td>
<td>
A3_READOUT_TIME</td>
<td>
ReadoutTime</td>
<td>
ai</td>
</tr>
<tr>
<td>
Andor3Overlap</td>
<td>
asynInt32</td>
<td>
R/W</td>
<td>
Controls whether acquisition and readout are overlapped. Choices are 0 (No) and
1 (Yes). On the Neo if Overlap=Yes then the minimum exposure time is limited to
about 10 ms. If Overlap=No then the minimum exposure time is 9 microseconds. </td>
<td>
A3_OVERLAP</td>
<td>
Overlap<br />
Overlap_RBV</td>
<td>
bo<br />
bi</td>
</tr>
<tr>
<td>
Andor3NoiseFilter</td>
<td>
asynInt32</td>
<td>
R/W</td>
<td>
Controls whether the firmware applies the Spurious Noise Filter. Choices are 0 (No)
and 1 (Yes). </td>
<td>
A3_NOISE_FILTER</td>
<td>
NoiseFilter<br />
NoiseFilter_RBV</td>
<td>
bo<br />
bi</td>
</tr>
<tr>
<td align="center" colspan="7">
<b>Trigger control</b> </td>
</tr>
<tr>
<td>
Andor3SoftwareTrigger</td>
<td>
asynInt32</td>
<td>
R/W</td>
<td>
Writing 1 to this record generates a software trigger if TriggerMode=Software.
</td>
<td>
A3_SOFTWARE_TRIGGER</td>
<td>
SoftwareTrigger</td>
<td>
bo</td>
</tr>
<tr>
<td align="center" colspan="7">
<b>Area-Of-Interest (AOI) Control</b> </td>
</tr>
<tr>
<td>
Andor3FullAOIControl</td>
<td>
asynInt32</td>
<td>
R/O</td>
<td>
Indicates whether this camera supports full AOI control. This is Yes for the Neo.
</td>
<td>
A3_FULL_AOI_CONTROL</td>
<td>
FullAOIControl</td>
<td>
bi</td>
</tr>
<tr>
<td>
Andor3Binning</td>
<td>
asynInt32</td>
<td>
R/W</td>
<td>
Controls the binning. The binning on the sCMOS camera is done in firmware and only
certain preset values are allowed. Choices for the Neo are:
<ul>
<li>0 = 1x1</li>
<li>1 = 2x2</li>
<li>2 = 3x3</li>
<li>3 = 4x4</li>
<li>4 = 8x8</li>
</ul>
</td>
<td>
A3_BINNING</td>
<td>
A3Binning<br />
A3Binning_RBV</td>
<td>
mbbo<br />
mbbi</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>
If any of the parameters set are out of range the driver will set them to the minimum
or maximum allowed value for that parameter. The _RBV value will indicate the actual
value in effect.
</p>
<h2 id="Configuration">
Configuration</h2>
<p>
The Andor3 driver is created with the andor3Config command, either from C/C++ or
from the EPICS IOC shell.</p>
<pre>int andor3Config(const char *portName, int cameraId,
int maxBuffers, size_t maxMemory,
int priority, int stackSize, int maxFrames)
</pre>
<p>
For details on the meaning of the parameters to this function refer to the detailed
documentation on the andor3Config function in the <a href="areaDetectorDoxygenHTML/andor3_8cpp.html">
andor3.cpp documentation</a> and in the documentation for the constructor for
the <a href="areaDetectorDoxygenHTML/classandor3.html">andor3 class</a>. The maxFrames
parameter controls the number of frame buffers the driver queues to the SDK when
acquiring data. The default value is 10. Increasing this number will allow the SDK
to transfer images from the camera at the full interface speed even when the driver
is not reading them that quickly. This will help to prevent frames from filling
the camera RAM when operating close to the maximum interface transfer rate (=TransferRate).
</p>
<p>
There an example IOC boot directory and startup script (<a href="andor3_st_cmd.html">iocBoot/iocAndor3/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>Andor3.adl</code> is the main screen used to control the Andor driver.
</p>
<div style="text-align: center">
<h3 style="text-align: center">
Andor3.adl</h3>
<img alt="Andor3.png" src="Andor3.png" /></div>
<h2 id="Restrictions" style="text-align: left">
Restrictions</h2>
<p>
There is currently no way to query the driver to know how much memory remains in
the on-board RAM. When the RAM fills up the camera stops acquiring images.</p>
</body>
</html>