diff --git a/documentation/Roper.png b/documentation/Roper.png new file mode 100755 index 0000000..9a4da36 Binary files /dev/null and b/documentation/Roper.png differ diff --git a/documentation/RoperDoc.html b/documentation/RoperDoc.html new file mode 100755 index 0000000..9225184 --- /dev/null +++ b/documentation/RoperDoc.html @@ -0,0 +1,553 @@ + + + areaDetector Roper driver + + +
+

+ areaDetector Roper driver

+

+ December 6, 2008

+

+ Mark Rivers

+

+ University of Chicago

+
+

+ Table of Contents

+ +

+ Introduction

+

+ This is a driver for the Roper Scientific + detectors, which includes those from + Princeton Instruments and Photometrics. + It inherits from ADDriver and implements most of the parameters in ADStdDriverParams.h. + It also implements a number of parameters that are specific to the Roper detectors.

+

+ 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. +

+

+ Implementation of standard driver parameters

+

+ 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:

+
    +
  1. ADNumExposures ($(P)$(R)NumExposures). This controls the number of exposures per + image. This is called "accumulations" in Roper's terminology.
  2. +
  3. ADNumImages ($(P)$(R)NumImages). This controls the number of images per acquisition. + This is also called "number of images" in Roper's terminology. These images will + all be acquired into a single 3-D array, and saved to a single SPE file in WinView.
  4. +
  5. RoperNumAcquisitions ($(P)$(R)NumNumAcquisitions). This controls the number of + times that the driver will repeat an acquisition sequence. This is has no equivalent + in WinView, it is handled entirely by the areaDetector driver. It can be used to + acquire multiple data sets, where each is controlled by the above parameters.
  6. +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Implementation of Parameters in ADStdDriverParams.h and EPICS Record Definitions + in ADBase.template and NDFile.template
+ Enum name + EPICS record name + Description
+ ADImageMode + $(P$(R)ImageMode + The driver redefines the choices for the ADImageMode parameter (record $(P)$(R)ImageMode) + from ADStdDriverParams.h. The choices for the Roper are: +
    +
  • Normal: This is the same as pressing the Acquire button in WinView. It may collect + more than 1 exposure per image if NumExposures>1, more than 1 image per acquisition + if NumImages>1, and more than 1 aquisition if NumAcquisitions>1.
  • +
  • Continuous: This will cause the driver to perform acquisitions indefinitely, i.e. + it acts as if NumAcquisitions is infinite.
  • +
  • Focus: This is the same as pressing the Focus button in WinView. It causes acquisition + to proceed as quickly as possible. It does not save the data. It currently does + not call the callbacks for each frame, so the images can only be seen in WinView + and not in EPICS. This may be fixed in a future release.
  • +
+
+ 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 ADStdDriverParams.h. The choices for the Roper are: +
    +
  • Free run: This acquires images as quickly as possible given the exposure and readout + times.
  • +
  • Ext. sync: This acquires one image for each external trigger pulse.
  • +
  • Bulb trig.: The exposure time is determined by the external trigger pulse width. +
  • +
  • Single trig.: A single external trigger pulse will acquire an entire sequence + of images.
  • +
+
+ ADFileFormat + $(P)$(R)FileFormat + The driver redefines the choices for the ADFileFormat parameter (record $(P)$(R)FileFormat) + from ADStdDriverParams.h. The choices for the Roper are: +
    +
  • SPE: This is the default file format for WinView. It is a binary format with a + header containing all of the acquisition and setup information.
  • +
  • TIFF: TIFF files that contain the full resolution of the image data. The TIFF + files do not contain any acquisition or setup information.
  • +
  • 8-bit TIFF: 8-bit TIFF files that contain limited resolution image data. The TIFF + files do not contain any acquisition or setup information.
  • +
+ The driver does not automatically change the file extension (.SPE, .TIFF, etc.) + when the FileFormat is changed, the user should do this using the FileTemplate record. +
+ 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. +
+

+ Roper specific parameters

+

+ The Roper driver implements the following parameters in addition to those in ADStdDriverParams.h. + Note that to reduce the width of this table the enum 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
+ Enum name + asyn interface + Access + Description + drvUser 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: +
    +
  • Normal: The detector shutter will be opened and closed normally for each exposure.
  • +
  • Disabled closed: The shutter will be forced closed. Useful for taking a dark current + image.
  • +
  • Disabled open: The shutter will be forced open.
  • +
+
+ 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
+

+ Unsupported standard driver parameters

+

+ The Roper driver does not support the following standard driver parameters:

+ +

+ Configuration

+

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

+
   
+roperConfig(const char *portName, int maxBuffers, size_t maxMemory);
+  
+ + + + + + + + + + + + + + + + + + + +
+ Argument + Description
+ portName + The name of the asyn port for this detector. +
+ maxBuffers + Maximum number of buffers to be created for plugin callbacks. Passed to the constructor + for the ADDriver base class.
+ maxMemory + Maximum number of bytes of memory to be allocated for plugin callbacks. Passed to + the constructor for the ADDriver base class.
+

+ The following is an example st.cmd startup script: +

+
+< envPaths
+errlogInit(20000)
+
+dbLoadDatabase("$(AREA_DETECTOR)/dbd/roperApp.dbd")
+
+roperApp_registerRecordDeviceDriver(pdbbase) 
+
+roperConfig("ROPER1", 50, 200000000)
+asynSetTraceIOMask("ROPER1",0,2)
+#asynSetTraceMask("ROPER1",0,9)
+dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/ADBase.template",   "P=13ROPER1:,R=cam1:,PORT=ROPER1,ADDR=0,TIMEOUT=1")
+dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDFile.template",   "P=13ROPER1:,R=cam1:,PORT=ROPER1,ADDR=0,TIMEOUT=1")
+dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/roper.template",    "P=13ROPER1:,R=cam1:,PORT=ROPER1,ADDR=0,TIMEOUT=1")
+
+# Create a standard arrays plugin, set it to get data from the Roper driver.
+drvNDStdArraysConfigure("ROPER1Image", 5, 0, "ROPER1", 0, -1)
+dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDPluginBase.template","P=13ROPER1:,R=image1:,PORT=ROPER1Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=ROPER1,NDARRAY_ADDR=0")
+dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDStdArrays.template", "P=13ROPER1:,R=image1:,PORT=ROPER1Image,ADDR=0,TIMEOUT=1,SIZE=16,FTVL=SHORT,NELEMENTS=1500000")
+# Load the database to use with Stephen Mudie's IDL code
+dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/EPICS_AD_Viewer.template", "P=13ROPER1:, R=image1:")
+
+# Create a file saving plugin
+drvNDFileConfigure("ROPER1File", 5, 0, "ROPER1", 0)
+dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDPluginBase.template","P=13ROPER1:,R=file1:,PORT=ROPER1File,ADDR=0,TIMEOUT=1,NDARRAY_PORT=ROPER1,NDARRAY_ADDR=0")
+dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDFile.template",      "P=13ROPER1:,R=file1:,PORT=ROPER1File,ADDR=0,TIMEOUT=1")
+
+# Create an ROI plugin
+drvNDROIConfigure("ROPER1ROI", 5, 0, "ROPER1", 0, 10, -1)
+dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDPluginBase.template","P=13ROPER1:,R=ROI1:,  PORT=ROPER1ROI,ADDR=0,TIMEOUT=1,NDARRAY_PORT=ROPER1,NDARRAY_ADDR=0")
+dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDROI.template",       "P=13ROPER1:,R=ROI1:,  PORT=ROPER1ROI,ADDR=0,TIMEOUT=1")
+dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDROIN.template",      "P=13ROPER1:,R=ROI1:0:,PORT=ROPER1ROI,ADDR=0,TIMEOUT=1,HIST_SIZE=256")
+dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDROIN.template",      "P=13ROPER1:,R=ROI1:1:,PORT=ROPER1ROI,ADDR=1,TIMEOUT=1,HIST_SIZE=256")
+dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDROIN.template",      "P=13ROPER1:,R=ROI1:2:,PORT=ROPER1ROI,ADDR=2,TIMEOUT=1,HIST_SIZE=256")
+dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDROIN.template",      "P=13ROPER1:,R=ROI1:3:,PORT=ROPER1ROI,ADDR=3,TIMEOUT=1,HIST_SIZE=256")
+
+# Load scan records
+dbLoadRecords("$(SSCAN)/sscanApp/Db/scan.db", "P=13ROPER1:,MAXPTS1=2000,MAXPTS2=200,MAXPTS3=20,MAXPTS4=10,MAXPTSH=10")
+
+set_requestfile_path("./")
+set_savefile_path("./autosave")
+set_requestfile_path("$(SSCAN)/sscanApp/Db")
+set_requestfile_path("$(AREA_DETECTOR)/ADApp/Db")
+set_pass0_restoreFile("auto_settings.sav")
+set_pass1_restoreFile("auto_settings.sav")
+save_restoreSet_status_prefix("13ROPER1:")
+dbLoadRecords("$(AUTOSAVE)/asApp/Db/save_restoreStatus.db", "P=13ROPER1:")
+
+iocInit()
+
+# save things every thirty seconds
+create_monitor_set("auto_settings.req", 30,"P=13ROPER1:,D=cam1:")
+
+
+

+ MEDM screens

+

+ 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. +

+
+

+ roper.adl

+ Roper.png
+

+ RoperFile.adl is the screen used to control WinView file I/O. +

+
+

+ RoperFile.adl

+ RoperFile.png
+

+ Performance measurements

+

+ 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-EZ detector which has 1392x1040 pixels. The EPICS IOC was running on the + same Windows PC as WinView. The acquisition time was 0.1 second.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Binning + Image size + Time for 10 images (ADNumImages=10) + Overhead per image
+ 1x1 + + 1392x1040 + + 50.0 + + 4.00 +
+ 2x2 + + 696x520 + + 46.2 + + 3.62 +
+ 3x3 + + 1024x1024 + + Sequential + + 29.0 + + 1.90 +
+

+ Restrictions

+

+ The following are some current restrictions of the Roper driver:

+ + + diff --git a/documentation/RoperFile.png b/documentation/RoperFile.png new file mode 100755 index 0000000..3acc4ea Binary files /dev/null and b/documentation/RoperFile.png differ diff --git a/documentation/WinView.png b/documentation/WinView.png new file mode 100755 index 0000000..7bc4e53 Binary files /dev/null and b/documentation/WinView.png differ