This is an EPICS areaDetector driver for the Roper Scientific detectors, which includes those from Princeton Instruments and Photometrics.
The interface to the detector is via a the Microsoft COM interface to the WinView or WinSpec programs that Roper provides. The term WinView will be used in this document to refer to either WinView or WinSpec, as they are equivalent in terms of the areaDetector driver. The areaDetector driver effectively "drives" WinView through the COM interface, performing many of the same operations that can be performed using the WinView GUI. The advantage of this communication mechanism is that the user can continue to use WinView for viewing images and for configuration operations. WinView is normally started before the areaDetector software is started. However, if the areaDetector software is started without WinView running, then WinView will be started in the background, and will not be visible. This may be desirable in some applications.
Because EPICS and the WinView GUI can control many of the same parameters the user must be aware of the interactions between the two control systems. The basic rule is that the value of a parameter will be determined by whichever control system last wrote to that parameter. Both EPICS and WinView will correctly display the current value of a parameter no matter how it was last changed. However, in WinView this requires closing and re-opening the window that controls that parameter, such as the Experiment Setup tabbed windows, to see any changes made by EPICS since the window was opened.
This driver inherits from ADDriver. It implements many of the parameters asynNDArrayDriver.h and in ADArrayDriver.h. It also implements a number of parameters that are specific to the Roper detectors.The roper class documentation describes this class in detail.
The following table describes how the Roper driver implements some of the standard driver parameters. Note that there are 3 possible levels of nested acquisition looping when using the Roper driver. From the innermost to outermost loop these are as follows:
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 |
---|---|---|
ADImageMode | $(P)$(R)ImageMode |
The driver redefines the choices for the ADImageMode parameter (record $(P)$(R)ImageMode)
from ADDriver.h. The choices for the Roper are:
|
ADAcquirePeriod | $(P)$(R)AcquirePeriod | Controls the period between images when ADImageMode is Continuous. If this is greater than the acquisition time plus readout overhead then the driver will wait until the period has elapsed before starting the next acquisition. |
ADNumExposures | $(P)$(R)NumExposures | Controls the number of exposures (accumulations) to acquire into a single image. |
ADNumImages | $(P)$(R)NumImages | Controls the number of images to acquire into a single 3-D data set. |
ADTriggerMode | $(P)$(R)TriggerMode |
The driver redefines the choices for the ADTriggerMode parameter (record $(P)$(R)TriggerMode)
from ADDriver.h. The choices for the Roper are:
|
NDFileFormat | $(P)$(R)FileFormat |
The driver redefines the choices for the NDFileFormat parameter (record $(P)$(R)FileFormat)
from asynNDArrayDriver.h. The choices for the Roper are:
|
ADGain | $(P)$(R)Gain | The precision of the $(P)$(R)Gain record is changed to 0 because the gain in WinView is an integer. Allowed values are detector dependent, but 1 and 2 are typically supported. |
The Roper driver implements the following parameters in addition to those in asynNDArrayDriver.h
and ADDriver.h. Note that to reduce the width of this table the parameter index
variable names have been split into 2 lines, but these are just a single name, for
example marCCDState
.
Parameter Definitions in roper.cpp and EPICS Record Definitions in roper.template | ||||||
Parameter index variable | asyn interface | Access | Description | drvInfo string | EPICS record name | EPICS record type |
---|---|---|---|---|---|---|
Status parameters | ||||||
Roper NumAcquisitions |
asynInt32 | r/w | The number of acquisitions to perform when acquisition is started. This controls the number of iterations in the outermost acquisition loop explained above. | ROPER_NACQUISITIONS |
$(P)$(R)NumAcquisitions $(P)$(R)NumAcquisitions_RBV |
longout longin |
Roper NumAcquisitionsCounter |
asynInt32 | r/o | The number of acquisitions performed so far. | ROPER_NACQUISITIONS_COUNTER | $(P)$(R)NumAcquisitionsCounter_RBV | longin |
Roper AutoDataType |
asynInt32 | r/w | A flag controlling whether WinView will automatically chose the optimal data type for the image data. 0=No, 1=Yes. If this flag is 1 then the NDDataType parameter ($(P)$(R)DataType record) is ignored. If this flag is 0 then the NDDataType parameter controls the data type of the images. | AUTO_DATA_TYPE |
$(P)$(R)AutoDataType $(P)$(R)AutoDataType_RBV |
bo bi |
Roper ShutterMode |
asynInt32 | r/w |
The shutter operating mode for shutters controlled by WinView. Allowed values are:
|
ROPER_SHUTTER_MODE |
$(P)$(R)RoperShutterMode $(P)$(R)RoperShutterMode_RBV |
mbbo mbbi |
Roper Comment(1-5) |
asynOctet | r/w | User comments for the data file. 5 comment fields of 80 characters each are available in the header of WinView SPE files. These are waveform records with FTVL=UCHAR and NELM=80 so that they can be longer than the 40 character string limit in EPICS. | COMMENT(1-5) |
$(P)$(R)Comment(1-5) $(P)$(R)Comment(1-5)_RBV |
waveform waveform |
The Roper driver does not support the following standard driver parameters:
The Roper driver is created with the roperConfig command, either from C/C++ or from the EPICS IOC shell.
int roperConfig(const char *portName, int maxBuffers, size_t maxMemory, int priority, int stackSize)
For details on the meaning of the parameters to this function refer to the detailed documentation on the roperConfig function in the roper.cpp documentation and in the documentation for the constructor for the roper class.
There an example IOC boot directory and startup script (iocBoot/iocRoper/st.cmd) provided with areaDetector.
The following show the MEDM screens that are used to control the Roper detector. Note that the general purpose screen ADBase.adl can be used, but it exposes a few controls that are not applicable to the Roper, and lacks some fields that are important for the Roper.
Roper.adl
is the main screen used to control the Roper driver.
RoperFile.adl
is the screen used to control WinView file I/O.
WinView
is program that the Roper driver is controlling via Microsoft
COM.
The following measurements were done to demonstrate the performance that can be obtained with the areaDetector Roper driver. These measurements were made with a CoolSnap-HQ2 detector which has 1392x1040 pixels. The acquisition time was 0.01 second. The overhead per image in the table below is the total time to acquire the data set minus 1.00 seconds (the acquisition time) divided by 100. Acquisitions were done in 2 modes:
Binning | Image dimensions | Image size | Mode | Acquisition time for 100 images | Overhead per image | File size | File saving time |
---|---|---|---|---|---|---|---|
1x1 | 1392x1040 | 2827 KB | 1 SPE file | 29.49 | 0.28 | 276 MB | 20.04 |
1x1 | 1392x1040 | 2827 KB | 100 SPE files | 80.67 | 0.79 | 2.76 MB | -3.62 |
2x2 | 696x520 | 707 KB | 1 SPE file | 10.27 | 0.09 | 69 MB | 4.86 |
2x2 | 696x520 | 707 KB | 100 SPE files | 46.14 | 0.45 | 0.71 MB | -.72 |
4x4 | 348x260 | 177 KB | 1 SPE file | 4.48 | 0.03 | 17 MB | 1.40 |
4x4 | 348x260 | 177 KB | 100 SPE files | 36.59 | 0.35 | 0.18 MB | 0.69 |
The following are some current restrictions of the Roper driver: