diff --git a/documentation/NDPluginFile.html b/documentation/NDPluginFile.html index d253da5..f569ba2 100755 --- a/documentation/NDPluginFile.html +++ b/documentation/NDPluginFile.html @@ -1,228 +1,228 @@ -a - - areaDetector Plugin NDPluginFile - - -
-

- areaDetector Plugin NDPluginFile

-

- September 19, 2008

-

- Mark Rivers

-

- University of Chicago

-
-

- Contents

- -

- Overview -

-

- NDPluginFile saves the NDArray data from a callback to a disk file. -

-

- NDPluginFile inherits from NDPluginDriver. This plugin currently saves data in the - netCDF file format, which - is a portable self-describing binary file format supported by - UniData at UCAR (University Corporation for Atmospheric - Research). -

-

- The NDArray callback data can be written to disk in 1 of 3 modes: -

-
    -
  1. Single mode. In this mode each NDArray callback results in a separate disk file.
  2. -
  3. Capture mode. In this mode a memory buffer is allocated before saving begins. - Callback arrays are placed into this buffer, and when capture stops the file is - written to disk. This mode limits the number of frames that can be saved, because - they all must fit in a memory buffer. It is the fastest mode, with the least probability - of dropping arrays, because no disk I/O is required while capture is in progress.
  4. -
  5. Stream mode. In this mode the data are written to a single disk file, with each - frame being appended to the file without closing it. It is intermediate in speed - between single mode and capture mode, but unlike capture mode it is not limited - by available memory in the number of arrays that can be saved.
  6. -
-

- The NDPluginFile public interface is defined in NDPluginFile.h as follows: -

-
/* Note that the file format enum must agree with the mbbo/mbbi records in the NDFile.template file */
-typedef enum {
-    NDFileFormatNetCDF,
-} NDPluginFileFormat_t;
-
-typedef enum {
-    NDPluginFileModeSingle,
-    NDPluginFileModeCapture,
-    NDPluginFileModeStream
-} NDPluginFileMode_t;
-
-...
-class NDPluginFile : public NDPluginDriver {
-public:
-    NDPluginFile(const char *portName, int queueSize, int blockingCallbacks, 
-                 const char *NDArrayPort, int NDArrayAddr);
-                 
-    /* These methods override those in the base class */
-    void processCallbacks(NDArray *pArray);
-    asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value);
-    asynStatus writeNDArray(asynUser *pasynUser, void *genericPointer);
-    asynStatus drvUserCreate(asynUser *pasynUser, const char *drvInfo, 
-                             const char **pptypeName, size_t *psize);
-
-...
-}
-
-

- NDPluginFile supports all of the file saving parameters defined in - ADStdDriverParams.h, e.g. ADFilePath, ADFileName, etc. Thus, the same interface - that is used for saving files directly in a driver is used for this plugin. -

-

- Configuration

-

- The NDPluginFile plugin is created with the following command, either from C/C++ - or from the EPICS IOC shell. -

-
drvNDFileConfigure(const char *portName, int queueSize, int blockingCallbacks, 
-                   const char *NDArrayPort, int NDArrayAddr)
-  
- - - - - - - - - - - - - - - - - - - - - - - - - -
- Argument - Description
- portName - The name of the asyn port for this plugin. -
- queueSize - The maximum number of NDArray objects that can be queued for processing. Passed - to the NDPluginDriver base class constructor. -
- blockingCallbacks - Flag controlling whether callbacks block. Passed to the NDPluginDriver base class - constructor. -
- NDArrayPort - The name of the asyn port of the driver that will provide the NDArray data. Passed - to the NDPluginDriver base class constructor. -
- NDArrayAddr - The asyn addr of the asyn port of the driver that will provide the NDArray data. - Passed to the NDPluginDriver base class constructor. -
-

- Screen shots

-

- The following is the MEDM screen that provides access to the parameters in NDPluginDriver.h - and NDPluginFile.h through records in NDPluginBase.template and NDFile.template. - This is the MEDM screen that is used to control the saving of images to disk for - drivers that do not support saving files to disk themselves. -

-
-

- NDFile.adl

-

- NDFile.png

-
-

- netCDF file contents

-

- The following is the header contents of a netCDF file produced by this plugin. This - information was produced with the following command:

-
-ncdump -h test_A_2.nc
-
-netcdf test_A_2 {
-dimensions:
-	numArrays = 200 ;
-	dim0 = 480 ;
-	dim1 = 640 ;
-variables:
-	int uniqueId(numArrays) ;
-	double timeStamp(numArrays) ;
-	byte array_data(numArrays, dim0, dim1) ;
-
-// global attributes:
-		:dataType = 0 ;
-		:numArrayDims = 2 ;
-		:dimSize = 640, 480 ;
-		:dimOffset = 0, 0 ;
-		:dimBinning = 1, 1 ;
-		:dimReverse = 0, 0 ;
-}
-  
-

- This is an explanation of this output: -

- -

- IDL file reading function

-

- There is an IDL function, - read_nd_netcdf that can be used to read the netCDF files created by this plugin. - This routine is contained in the - CARS IDL detector package. This function is currently limited to reading the - entire file at once, so it may fail for very large files on machines with insufficient - virtual memory. This will be fixed in a future release. -

-

- Future plans

-

- Additional file formats, such as TIFF and HDF may be supported in the future. -

-

- The IDL function described above will be enhanced to allow reading only a subset - of the file at a time. -

- - +a + + areaDetector Plugin NDPluginFile + + +
+

+ areaDetector Plugin NDPluginFile

+

+ September 19, 2008

+

+ Mark Rivers

+

+ University of Chicago

+
+

+ Contents

+ +

+ Overview +

+

+ NDPluginFile saves the NDArray data from a callback to a disk file. +

+

+ NDPluginFile inherits from NDPluginDriver. This plugin currently saves data in the + netCDF file format, which + is a portable self-describing binary file format supported by + UniData at UCAR (University Corporation for Atmospheric + Research). +

+

+ The NDArray callback data can be written to disk in 1 of 3 modes: +

+
    +
  1. Single mode. In this mode each NDArray callback results in a separate disk file.
  2. +
  3. Capture mode. In this mode a memory buffer is allocated before saving begins. + Callback arrays are placed into this buffer, and when capture stops the file is + written to disk. This mode limits the number of frames that can be saved, because + they all must fit in a memory buffer. It is the fastest mode, with the least probability + of dropping arrays, because no disk I/O is required while capture is in progress.
  4. +
  5. Stream mode. In this mode the data are written to a single disk file, with each + frame being appended to the file without closing it. It is intermediate in speed + between single mode and capture mode, but unlike capture mode it is not limited + by available memory in the number of arrays that can be saved.
  6. +
+

+ The NDPluginFile public interface is defined in NDPluginFile.h as follows: +

+
/* Note that the file format enum must agree with the mbbo/mbbi records in the NDFile.template file */
+typedef enum {
+    NDFileFormatNetCDF,
+} NDPluginFileFormat_t;
+
+typedef enum {
+    NDPluginFileModeSingle,
+    NDPluginFileModeCapture,
+    NDPluginFileModeStream
+} NDPluginFileMode_t;
+
+...
+class NDPluginFile : public NDPluginDriver {
+public:
+    NDPluginFile(const char *portName, int queueSize, int blockingCallbacks, 
+                 const char *NDArrayPort, int NDArrayAddr);
+                 
+    /* These methods override those in the base class */
+    void processCallbacks(NDArray *pArray);
+    asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value);
+    asynStatus writeNDArray(asynUser *pasynUser, void *genericPointer);
+    asynStatus drvUserCreate(asynUser *pasynUser, const char *drvInfo, 
+                             const char **pptypeName, size_t *psize);
+
+...
+}
+
+

+ NDPluginFile supports all of the file saving parameters defined in + ADStdDriverParams.h, e.g. ADFilePath, ADFileName, etc. Thus, the same interface + that is used for saving files directly in a driver is used for this plugin. +

+

+ Configuration

+

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

+
drvNDFileConfigure(const char *portName, int queueSize, int blockingCallbacks, 
+                   const char *NDArrayPort, int NDArrayAddr)
+  
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ Argument + Description
+ portName + The name of the asyn port for this plugin. +
+ queueSize + The maximum number of NDArray objects that can be queued for processing. Passed + to the NDPluginDriver base class constructor. +
+ blockingCallbacks + Flag controlling whether callbacks block. Passed to the NDPluginDriver base class + constructor. +
+ NDArrayPort + The name of the asyn port of the driver that will provide the NDArray data. Passed + to the NDPluginDriver base class constructor. +
+ NDArrayAddr + The asyn addr of the asyn port of the driver that will provide the NDArray data. + Passed to the NDPluginDriver base class constructor. +
+

+ Screen shots

+

+ The following is the MEDM screen that provides access to the parameters in NDPluginDriver.h + and NDPluginFile.h through records in NDPluginBase.template and NDFile.template. + This is the MEDM screen that is used to control the saving of images to disk for + drivers that do not support saving files to disk themselves. +

+
+

+ NDFile.adl

+

+ NDFile.png

+
+

+ netCDF file contents

+

+ The following is the header contents of a netCDF file produced by this plugin. This + information was produced with the following command:

+
+ncdump -h test_A_2.nc
+
+netcdf test_A_2 {
+dimensions:
+	numArrays = 200 ;
+	dim0 = 480 ;
+	dim1 = 640 ;
+variables:
+	int uniqueId(numArrays) ;
+	double timeStamp(numArrays) ;
+	byte array_data(numArrays, dim0, dim1) ;
+
+// global attributes:
+		:dataType = 0 ;
+		:numArrayDims = 2 ;
+		:dimSize = 640, 480 ;
+		:dimOffset = 0, 0 ;
+		:dimBinning = 1, 1 ;
+		:dimReverse = 0, 0 ;
+}
+  
+

+ This is an explanation of this output: +

+ +

+ IDL file reading function

+

+ There is an IDL function, + read_nd_netcdf that can be used to read the netCDF files created by this plugin. + This routine is contained in the + CARS IDL detector package. This function is currently limited to reading the + entire file at once, so it may fail for very large files on machines with insufficient + virtual memory. This will be fixed in a future release. +

+

+ Future plans

+

+ Additional file formats, such as TIFF and HDF may be supported in the future. +

+

+ The IDL function described above will be enhanced to allow reading only a subset + of the file at a time. +

+ + diff --git a/documentation/NDPluginStdArrays.html b/documentation/NDPluginStdArrays.html index 0cb78a2..bd15699 100755 --- a/documentation/NDPluginStdArrays.html +++ b/documentation/NDPluginStdArrays.html @@ -1,256 +1,256 @@ - - - areaDetector Plugin NDPluginStdArrays - - -
-

- areaDetector Plugin NDPluginStdArrays

-

- September 19, 2008

-

- Mark Rivers

-

- University of Chicago

-
-

- Contents

- -

- Overview -

-

- This plugin is the tool for converting the NDArray data produced by asynNDArrayDriver - drivers into a form that can be accessed by EPICS. -

-

- NDPluginStdArrays inherits from NDPluginDriver. NDPluginStdArrays converts the NDArray - data from a callback into the 1-dimensional arrays supported by the standard asyn - array interfaces, i.e. asyn[Int8, Int16, Int32, Float32, Float64]Array. These interfaces - are supported by the EPICS waveform record using standard asyn device support. Because - this plugin inherits from NDPluginDriver - it also provides additional information on the array data (e.g. number of dimensions - and dimension data) that are made available as EPICS PVs so that clients can correctly - interpret the array data. The NDPluginStdArrays public interface is defined in NDPluginStdArrays.h - as follows:

-
-class NDPluginStdArrays : public NDPluginDriver {
-public:
-    NDPluginStdArrays(const char *portName, int queueSize, int blockingCallbacks, 
-                      const char *NDArrayPort, int NDArrayAddr,
-                      size_t maxMemory);
-
-    /* These methods override the virtual methods in the base class */
-    void processCallbacks(NDArray *pArray);
-    virtual asynStatus readInt8Array(asynUser *pasynUser, epicsInt8 *value,
-                                        size_t nElements, size_t *nIn);
-    virtual asynStatus readInt16Array(asynUser *pasynUser, epicsInt16 *value,
-                                        size_t nElements, size_t *nIn);
-    virtual asynStatus readInt32Array(asynUser *pasynUser, epicsInt32 *value,
-                                        size_t nElements, size_t *nIn);
-    virtual asynStatus readFloat32Array(asynUser *pasynUser, epicsFloat32 *value,
-                                        size_t nElements, size_t *nIn);
-    virtual asynStatus readFloat64Array(asynUser *pasynUser, epicsFloat64 *value,
-                                        size_t nElements, size_t *nIn);
-    asynStatus drvUserCreate(asynUser *pasynUser, const char *drvInfo, 
-                                        const char **pptypeName, size_t *psize);
-...
-}
-
-

- NDPluginStdArrays defines the following parameters. It also implements all of the - standard plugin parameters from NDPluginDriver - . The EPICS database NDStdArrays.template provides access to these parameters, listed - in the following table. -

- - - - - - - - - - - - - - - - - - - - - - - - -
- Parameter Definitions in NDPluginStdArrays.h and EPICS Record Definitions in NDStdArrays.template
- Enum name - asyn interface - Access - Description - drvUser string - EPICS record name - EPICS record type
- NDPluginStdArraysData - asyn[Int8, Int16, Int32, Float32, Float64]Array - r/o - Array data as a 1-D array, possibly converted in data type from that in the NDArray - object to the specific asyn interface. - STD_ARRAY_DATA - $(P)$(R)ArrayData - waveform
-

- If the array data contains more than 16,000 bytes then in order for EPICS clients - to receive this data they must be built with EPICS R3.14 (not R3.13), and the environment - variable EPICS_CA_MAX_ARRAY_BYTES on both the EPICS IOC computer and EPICS client - computer must be set to a value at least as large as the array size in bytes.

-

- Configuration

-

- The NDPluginStdArrays plugin is created with the following command, either from - C/C++ or from the EPICS IOC shell. -

-
drvNDStdArraysConfigure(const char *portName, int queueSize, int blockingCallbacks, 
-                        const char *NDArrayPort, int NDArrayAddr, size_t maxMemory)
-  
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Argument - Description
- portName - The name of the asyn port for this plugin. -
- queueSize - The maximum number of NDArray objects that can be queued for processing. Passed - to the NDPluginDriver base class constructor. -
- blockingCallbacks - Flag controlling whether callbacks block. Passed to the NDPluginDriver base class - constructor. -
- NDArrayPort - The name of the asyn port of the driver that will provide the NDArray data. Passed - to the NDPluginDriver base class constructor. -
- NDArrayAddr - The asyn addr of the asyn port of the driver that will provide the NDArray data. - Passed to the NDPluginDriver base class constructor. -
- maxMemory - Maximum number of bytes of memory to be allocated from the NDArrayPool. Passed to - the constructor for the NDPluginDriver base class. The NDStdArrays plugin allocates - 2 NDArray objects, so this should be at least twice the size of the largest NDArray - to be used.
-

- Screen shots

-

- The following is the MEDM screen that provides access to the parameters in NDPluginDriver.h - and NDPluginStdArrays.h through records in NDPluginBase.template and NDStdArrays.template. - This is the MEDM screen that is normally used to control the display of images via - EPICS channel access. -

-
-

- NDStdArrays.adl

-

- NDStdArrays.png

-
-

- IDL Image Display Client

-

- There is an IDL procedure called - epics_ad_display that can be used to display 2-dimensional array data that - the NDStdArrays plugin sends to EPICS. This IDL client is available as source code - (which requires an IDL license), and also as a pre-built IDL .sav file that can - be run for free under the IDL Virtual Machine. This IDL program can run on any machine - that IDL runs on, and that has the ezcaIDL shareable library built for it. This - includes Windows, Linux, Solaris, and Mac. epics_ad_display is included - in the CARS IDL imaging - software. -

-

- The control window for epics_ad_display is shown below. It has a field - to input the base name of the EPICS PVs with the image data. It also has fields - to enable/display the IDL display update, to change the display mode, to autoscale - the intensity, and to invert the image in the Y direction. If autoscale is set to - No then manual scaling can be entered in the Min and Max fields. The number of frames - per second actually being displayed by IDL is shown. There is a status window that - shows whether the EPICS PVs are connected and the time the last was array received, - updated once per second. -

-
-

- Main window for IDL epics_ad_display

-

- IDL_epics_ad_display.png

-
-

- epics_ad_display can use the simple IDL routine tv to - display the images. This is the fastest mode, and results in a non-scalable unadorned - window.

-
-

- IDL epics_ad_display using the IDL tv routine.

-

- IDL_epics_ad_display_tv.jpg

-
-

- epics_ad_display can also use the routine - image_display.pro to display the images. This routine displays row and column - profiles as the cursor is moved. It allows changing the color lookup tables, and - zooming in (right mouse click) and out (left mouse click). The following is an example - of image_display displaying an image from the simulation detector.

-
-

- epics_ad_display using the image_display routine

-

- simDetector_image_display.png

-
-

- Future plans

-

- Stephen Mudie at the Australian Synchrotron has written a very nice IDL client to - display the EPICS images from the Flea Firewire cameras. This client should be converted - to display the data from this areaDetector plugin. -

- - + + + areaDetector Plugin NDPluginStdArrays + + +
+

+ areaDetector Plugin NDPluginStdArrays

+

+ September 19, 2008

+

+ Mark Rivers

+

+ University of Chicago

+
+

+ Contents

+ +

+ Overview +

+

+ This plugin is the tool for converting the NDArray data produced by asynNDArrayDriver + drivers into a form that can be accessed by EPICS. +

+

+ NDPluginStdArrays inherits from NDPluginDriver. NDPluginStdArrays converts the NDArray + data from a callback into the 1-dimensional arrays supported by the standard asyn + array interfaces, i.e. asyn[Int8, Int16, Int32, Float32, Float64]Array. These interfaces + are supported by the EPICS waveform record using standard asyn device support. Because + this plugin inherits from NDPluginDriver + it also provides additional information on the array data (e.g. number of dimensions + and dimension data) that are made available as EPICS PVs so that clients can correctly + interpret the array data. The NDPluginStdArrays public interface is defined in NDPluginStdArrays.h + as follows:

+
+class NDPluginStdArrays : public NDPluginDriver {
+public:
+    NDPluginStdArrays(const char *portName, int queueSize, int blockingCallbacks, 
+                      const char *NDArrayPort, int NDArrayAddr,
+                      size_t maxMemory);
+
+    /* These methods override the virtual methods in the base class */
+    void processCallbacks(NDArray *pArray);
+    virtual asynStatus readInt8Array(asynUser *pasynUser, epicsInt8 *value,
+                                        size_t nElements, size_t *nIn);
+    virtual asynStatus readInt16Array(asynUser *pasynUser, epicsInt16 *value,
+                                        size_t nElements, size_t *nIn);
+    virtual asynStatus readInt32Array(asynUser *pasynUser, epicsInt32 *value,
+                                        size_t nElements, size_t *nIn);
+    virtual asynStatus readFloat32Array(asynUser *pasynUser, epicsFloat32 *value,
+                                        size_t nElements, size_t *nIn);
+    virtual asynStatus readFloat64Array(asynUser *pasynUser, epicsFloat64 *value,
+                                        size_t nElements, size_t *nIn);
+    asynStatus drvUserCreate(asynUser *pasynUser, const char *drvInfo, 
+                                        const char **pptypeName, size_t *psize);
+...
+}
+
+

+ NDPluginStdArrays defines the following parameters. It also implements all of the + standard plugin parameters from NDPluginDriver + . The EPICS database NDStdArrays.template provides access to these parameters, listed + in the following table. +

+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Parameter Definitions in NDPluginStdArrays.h and EPICS Record Definitions in NDStdArrays.template
+ Enum name + asyn interface + Access + Description + drvUser string + EPICS record name + EPICS record type
+ NDPluginStdArraysData + asyn[Int8, Int16, Int32, Float32, Float64]Array + r/o + Array data as a 1-D array, possibly converted in data type from that in the NDArray + object to the specific asyn interface. + STD_ARRAY_DATA + $(P)$(R)ArrayData + waveform
+

+ If the array data contains more than 16,000 bytes then in order for EPICS clients + to receive this data they must be built with EPICS R3.14 (not R3.13), and the environment + variable EPICS_CA_MAX_ARRAY_BYTES on both the EPICS IOC computer and EPICS client + computer must be set to a value at least as large as the array size in bytes.

+

+ Configuration

+

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

+
drvNDStdArraysConfigure(const char *portName, int queueSize, int blockingCallbacks, 
+                        const char *NDArrayPort, int NDArrayAddr, size_t maxMemory)
+  
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Argument + Description
+ portName + The name of the asyn port for this plugin. +
+ queueSize + The maximum number of NDArray objects that can be queued for processing. Passed + to the NDPluginDriver base class constructor. +
+ blockingCallbacks + Flag controlling whether callbacks block. Passed to the NDPluginDriver base class + constructor. +
+ NDArrayPort + The name of the asyn port of the driver that will provide the NDArray data. Passed + to the NDPluginDriver base class constructor. +
+ NDArrayAddr + The asyn addr of the asyn port of the driver that will provide the NDArray data. + Passed to the NDPluginDriver base class constructor. +
+ maxMemory + Maximum number of bytes of memory to be allocated from the NDArrayPool. Passed to + the constructor for the NDPluginDriver base class. The NDStdArrays plugin allocates + 2 NDArray objects, so this should be at least twice the size of the largest NDArray + to be used.
+

+ Screen shots

+

+ The following is the MEDM screen that provides access to the parameters in NDPluginDriver.h + and NDPluginStdArrays.h through records in NDPluginBase.template and NDStdArrays.template. + This is the MEDM screen that is normally used to control the display of images via + EPICS channel access. +

+
+

+ NDStdArrays.adl

+

+ NDStdArrays.png

+
+

+ IDL Image Display Client

+

+ There is an IDL procedure called + epics_ad_display that can be used to display 2-dimensional array data that + the NDStdArrays plugin sends to EPICS. This IDL client is available as source code + (which requires an IDL license), and also as a pre-built IDL .sav file that can + be run for free under the IDL Virtual Machine. This IDL program can run on any machine + that IDL runs on, and that has the ezcaIDL shareable library built for it. This + includes Windows, Linux, Solaris, and Mac. epics_ad_display is included + in the CARS IDL imaging + software. +

+

+ The control window for epics_ad_display is shown below. It has a field + to input the base name of the EPICS PVs with the image data. It also has fields + to enable/display the IDL display update, to change the display mode, to autoscale + the intensity, and to invert the image in the Y direction. If autoscale is set to + No then manual scaling can be entered in the Min and Max fields. The number of frames + per second actually being displayed by IDL is shown. There is a status window that + shows whether the EPICS PVs are connected and the time the last was array received, + updated once per second. +

+
+

+ Main window for IDL epics_ad_display

+

+ IDL_epics_ad_display.png

+
+

+ epics_ad_display can use the simple IDL routine tv to + display the images. This is the fastest mode, and results in a non-scalable unadorned + window.

+
+

+ IDL epics_ad_display using the IDL tv routine.

+

+ IDL_epics_ad_display_tv.jpg

+
+

+ epics_ad_display can also use the routine + image_display.pro to display the images. This routine displays row and column + profiles as the cursor is moved. It allows changing the color lookup tables, and + zooming in (right mouse click) and out (left mouse click). The following is an example + of image_display displaying an image from the simulation detector.

+
+

+ epics_ad_display using the image_display routine

+

+ simDetector_image_display.png

+
+

+ Future plans

+

+ Stephen Mudie at the Australian Synchrotron has written a very nice IDL client to + display the EPICS images from the Flea Firewire cameras. This client should be converted + to display the data from this areaDetector plugin. +

+ + diff --git a/documentation/adscDoc.html b/documentation/adscDoc.html index d5bff74..4d14591 100644 --- a/documentation/adscDoc.html +++ b/documentation/adscDoc.html @@ -1,329 +1,329 @@ - - - - areaDetector ADSC driver - - - -
-

- areaDetector ADSC driver

-

- September 17, 2008

-

- Lewis Muir

-

- University of Chicago

-
-

- Table of Contents

-
    -
  1. Introduction
  2. -
  3. Dependencies
  4. -
  5. Building
  6. -
  7. Configuring
  8. -
  9. Image Modes
  10. -
  11. Trigger Modes
  12. -
  13. Dark Images
  14. -
  15. Driver Specific Values and Settings
  16. -
  17. Screenshots
  18. -
  19. Unsupported areaDetector base Features
  20. -
  21. Limitations
  22. -
-

- Introduction

-

- This is a driver for ADSC detectors. It - has been tested with the ADSC Q210. While not yet tested with other models, it should - work with the ADSC Q4 (with the upgrade to four computers), Q4r, Q210, Q210r, Q270, - Q315, and Q315r. -

-

- Dependencies

-

- This driver controls the detector via the detcon_lib_th detector control - library provided by ADSC. The detcon_lib_th library must date from 2008-06-30 - or newer. -

-

- Building

-
    -
  1. Build the ADSC control library
  2. -
  3. Copy and rename, or create a symlink to, the ADSC auxlib.a library so - that it has the name libauxlib.a to satisfy the EPICS build facility's - requirement that a library file name start with lib
  4. -
  5. Add DIRS += adscSrc to ADApp/Makefile
  6. -
  7. Set ADSC_HOME in ADApp/adscSrc/Makefile
  8. -
  9. Rebuild the areaDetector module
  10. -
-

- Configuring

-

- This driver is configured via the adscConfig() function. If this is to - be used in an IOC, it must be called before iocInit(). It has the following - signature: -

-
-
int adscConfig(const char *portName, const char *modelName)
-
-
-
portName
-
- ASYN port name for the driver instance
-
modelName
-
- ADSC detector model name; must be one of Q4, Q4r, Q210, - Q210r, Q270, Q315, Q315r
-
-
-
-

- The underlying ADSC control library obtains its configuration from the environment. - Therefore, the environment must be correctly configured (i.e. ADSC environment variables - set) for the ADSC control library before calling adscConfig(). -

-

- If being used in an IOC, and an EPICS PV interface with the driver is desired, the - ADBase.template and adsc.template databases should also be loaded - for the driver instance. -

-

- An example IOC configuration for this driver is at iocBoot/iocAdsc/st.cmd. -

-

- Image Modes

-

- Single

-

- The Single mode acquires just one image. -

-

- Multiple

-

- The Multiple mode acquires the number of images specified in $(P)$(R)NumImages_RBV. -

-

- Continuous

-

- The Continuous mode acquires images indefinitely until last image - is set. In this mode, the last image of the acquisition must be signaled before - exposing the last image by setting $(P)$(R)ADSCLastImage to 1. - This requirement is due to how the underlying ADSC control library works. -

-

- Trigger Modes

-

- Internal

-

- The Internal mode will make the driver expose images on its own once the - acquisition is started. -

-

- External

-

- The External mode will make the driver expose images only when told to - once the acquisition is started. A special protocol must be followed to trigger - each image exposure. This would normally be very simple, but because the ADSC control - library can report that an exposure did not work and should be retried after any - exposure, a more complex protocol is required. -

-

- The protocol is described in terms of the EPICS PV driver interface, but the same - rules apply if controlling the driver directly through ASYN. The protocol is as - follows: -

-
    -
  1. Wait for $(P)$(R)ADSCOkToExpose to be Yes
  2. -
  3. Set $(P)$(R)ADSCExTrCtl to Start to start the exposure
  4. -
  5. Set $(P)$(R)ADSCExTrCtl to Stop to stop the exposure
  6. -
  7. Wait for $(P)$(R)ADSCExTrCtl_RBV to be OK or Again
  8. -
  9. If $(P)$(R)ADSCExTrCtl_RBV is Again, the exposure did not work - and should be tried again
  10. -
-

- Note that care must be taken when waiting for $(P)$(R)ADSCExTrCtl_RBV to - be OK or Again to ensure the PV value is not stale (i.e. from - the previous exposure). There are at least two methods to ensure this: -

- -

- Dark Images

-

- Dark images are acquired automatically at the beginning of a data acquisition. They - are taken if any of the following conditions are true: -

- -

- Driver Specific Values and Settings

-

- This driver provides status values and settings in addition to what is provided - by areaDetector base. They are listed here according to their label - in the driver specific MEDM GUI and their EPICS PV name in the EPICS PV driver interface. - A screenshot of the driver specific MEDM GUI can be seen in the - Screenshots section. -

-

- Detector Condition

-
-
State, $(P)$(R)ADSCState
-
- State of the detector reported by the ADSC control library.
-
Status, $(P)$(R)ADSCStatus
-
- Status message reported by the ADSC control library.
-
Last error, $(P)$(R)ADSCLastError
-
- Last error message reported by the ADSC control library.
-
Update rate for above properties, $(P)$(R)ADSCReadConditn.SCAN
-
- How frequently to update the above properties.
-
-

- Detector Error Recovery

-
-
Software Reset, $(P)$(R)ADSCSoftReset
-
- Performs a software reset. Aborts any current operation, clears status and error - messages, and sets detector state to Idle.
-
-

- Detector Continuous Image Mode

-
-
Last Image, $(P)$(R)ADSCLastImage
-
- Signals that the next exposure is the last image when in Continuous image - mode.
-
-

- Detector External Trigger

-
-
OK to expose, $(P)$(R)ADSCOkToExpose
-
- When in External trigger mode, indicates whether it is OK to start an image - exposure.
-
Start, Stop, $(P)$(R)ADSCExTrCtl
-
- When in External trigger mode, set to 1 to start an exposure and - 0 to stop it.
-
$(P)$(R)ADSCExTrCtl_RBV
-
- When in External trigger mode, will be Start, Stop, - OK, or Again. See Trigger Modes section - for more about how this property will behave.
-
-

- Driver Parameters

-
-
Reuse darks, $(P)$(R)ADSCReusDrk
-
- Reuse dark images when possible. This is useful to avoid wasting time acquiring - dark images when previously acquired dark images are available and can be reused.
-
Dezinger, $(P)$(R)ADSCDezingr
-
- Acquire dezingered images.
-
-

- Detector Hardware Parameters

-
-
ADC/Binning, $(P)$(R)ADSCAdc
-
- For Q4 and Q4r detectors, controls whether to use Fast or Slow - ADC. For all other detectors, controls whether to use Hardware or Software - binning.
-
Raw images, $(P)$(R)ADSCRaw
-
- Write raw images.
-
Image transforms, $(P)$(R)ADSCImXform
-
- Perform image transformations.
-
Stored darks, $(P)$(R)ADSCStrDrks
-
- Use stored dark images. If set to Yes, stored dark images are assumed to - have been installed by ADSC and should be used.
-
-

- Detector File Parameters

-
-
Beam center X, $(P)$(R)ADSCBeamX
-
- Beam center in the X dimension.
-
Beam center Y, $(P)$(R)ADSCBeamY
-
- Beam center in the Y dimension.
-
Distance, $(P)$(R)ADSCDistnce
-
- Detector distance.
-
Two theta, $(P)$(R)ADSC2Theta
-
- Detector 2θ angle.
-
Axis, $(P)$(R)ADSCAxis
-
- Crystal rotation axis.
-
Wavelength, $(P)$(R)ADSCWavelen
-
- X-ray wavelength.
-
Image width, $(P)$(R)ADSCImWidth
-
- Crystal rotation during exposure.
-
Phi, $(P)$(R)ADSCPhi
-
- Phi position at start of exposure.
-
Omega, $(P)$(R)ADSCOmega
-
- Omega position at start of exposure.
-
Kappa, $(P)$(R)ADSCKappa
-
- Kappa position at start of exposure.
-
-

- Screenshots

- -

- Unsupported areaDetector base Features

- -

- Limitations

- - - + + + + areaDetector ADSC driver + + + +
+

+ areaDetector ADSC driver

+

+ September 17, 2008

+

+ Lewis Muir

+

+ University of Chicago

+
+

+ Table of Contents

+
    +
  1. Introduction
  2. +
  3. Dependencies
  4. +
  5. Building
  6. +
  7. Configuring
  8. +
  9. Image Modes
  10. +
  11. Trigger Modes
  12. +
  13. Dark Images
  14. +
  15. Driver Specific Values and Settings
  16. +
  17. Screenshots
  18. +
  19. Unsupported areaDetector base Features
  20. +
  21. Limitations
  22. +
+

+ Introduction

+

+ This is a driver for ADSC detectors. It + has been tested with the ADSC Q210. While not yet tested with other models, it should + work with the ADSC Q4 (with the upgrade to four computers), Q4r, Q210, Q210r, Q270, + Q315, and Q315r. +

+

+ Dependencies

+

+ This driver controls the detector via the detcon_lib_th detector control + library provided by ADSC. The detcon_lib_th library must date from 2008-06-30 + or newer. +

+

+ Building

+
    +
  1. Build the ADSC control library
  2. +
  3. Copy and rename, or create a symlink to, the ADSC auxlib.a library so + that it has the name libauxlib.a to satisfy the EPICS build facility's + requirement that a library file name start with lib
  4. +
  5. Add DIRS += adscSrc to ADApp/Makefile
  6. +
  7. Set ADSC_HOME in ADApp/adscSrc/Makefile
  8. +
  9. Rebuild the areaDetector module
  10. +
+

+ Configuring

+

+ This driver is configured via the adscConfig() function. If this is to + be used in an IOC, it must be called before iocInit(). It has the following + signature: +

+
+
int adscConfig(const char *portName, const char *modelName)
+
+
+
portName
+
+ ASYN port name for the driver instance
+
modelName
+
+ ADSC detector model name; must be one of Q4, Q4r, Q210, + Q210r, Q270, Q315, Q315r
+
+
+
+

+ The underlying ADSC control library obtains its configuration from the environment. + Therefore, the environment must be correctly configured (i.e. ADSC environment variables + set) for the ADSC control library before calling adscConfig(). +

+

+ If being used in an IOC, and an EPICS PV interface with the driver is desired, the + ADBase.template and adsc.template databases should also be loaded + for the driver instance. +

+

+ An example IOC configuration for this driver is at iocBoot/iocAdsc/st.cmd. +

+

+ Image Modes

+

+ Single

+

+ The Single mode acquires just one image. +

+

+ Multiple

+

+ The Multiple mode acquires the number of images specified in $(P)$(R)NumImages_RBV. +

+

+ Continuous

+

+ The Continuous mode acquires images indefinitely until last image + is set. In this mode, the last image of the acquisition must be signaled before + exposing the last image by setting $(P)$(R)ADSCLastImage to 1. + This requirement is due to how the underlying ADSC control library works. +

+

+ Trigger Modes

+

+ Internal

+

+ The Internal mode will make the driver expose images on its own once the + acquisition is started. +

+

+ External

+

+ The External mode will make the driver expose images only when told to + once the acquisition is started. A special protocol must be followed to trigger + each image exposure. This would normally be very simple, but because the ADSC control + library can report that an exposure did not work and should be retried after any + exposure, a more complex protocol is required. +

+

+ The protocol is described in terms of the EPICS PV driver interface, but the same + rules apply if controlling the driver directly through ASYN. The protocol is as + follows: +

+
    +
  1. Wait for $(P)$(R)ADSCOkToExpose to be Yes
  2. +
  3. Set $(P)$(R)ADSCExTrCtl to Start to start the exposure
  4. +
  5. Set $(P)$(R)ADSCExTrCtl to Stop to stop the exposure
  6. +
  7. Wait for $(P)$(R)ADSCExTrCtl_RBV to be OK or Again
  8. +
  9. If $(P)$(R)ADSCExTrCtl_RBV is Again, the exposure did not work + and should be tried again
  10. +
+

+ Note that care must be taken when waiting for $(P)$(R)ADSCExTrCtl_RBV to + be OK or Again to ensure the PV value is not stale (i.e. from + the previous exposure). There are at least two methods to ensure this: +

+ +

+ Dark Images

+

+ Dark images are acquired automatically at the beginning of a data acquisition. They + are taken if any of the following conditions are true: +

+ +

+ Driver Specific Values and Settings

+

+ This driver provides status values and settings in addition to what is provided + by areaDetector base. They are listed here according to their label + in the driver specific MEDM GUI and their EPICS PV name in the EPICS PV driver interface. + A screenshot of the driver specific MEDM GUI can be seen in the + Screenshots section. +

+

+ Detector Condition

+
+
State, $(P)$(R)ADSCState
+
+ State of the detector reported by the ADSC control library.
+
Status, $(P)$(R)ADSCStatus
+
+ Status message reported by the ADSC control library.
+
Last error, $(P)$(R)ADSCLastError
+
+ Last error message reported by the ADSC control library.
+
Update rate for above properties, $(P)$(R)ADSCReadConditn.SCAN
+
+ How frequently to update the above properties.
+
+

+ Detector Error Recovery

+
+
Software Reset, $(P)$(R)ADSCSoftReset
+
+ Performs a software reset. Aborts any current operation, clears status and error + messages, and sets detector state to Idle.
+
+

+ Detector Continuous Image Mode

+
+
Last Image, $(P)$(R)ADSCLastImage
+
+ Signals that the next exposure is the last image when in Continuous image + mode.
+
+

+ Detector External Trigger

+
+
OK to expose, $(P)$(R)ADSCOkToExpose
+
+ When in External trigger mode, indicates whether it is OK to start an image + exposure.
+
Start, Stop, $(P)$(R)ADSCExTrCtl
+
+ When in External trigger mode, set to 1 to start an exposure and + 0 to stop it.
+
$(P)$(R)ADSCExTrCtl_RBV
+
+ When in External trigger mode, will be Start, Stop, + OK, or Again. See Trigger Modes section + for more about how this property will behave.
+
+

+ Driver Parameters

+
+
Reuse darks, $(P)$(R)ADSCReusDrk
+
+ Reuse dark images when possible. This is useful to avoid wasting time acquiring + dark images when previously acquired dark images are available and can be reused.
+
Dezinger, $(P)$(R)ADSCDezingr
+
+ Acquire dezingered images.
+
+

+ Detector Hardware Parameters

+
+
ADC/Binning, $(P)$(R)ADSCAdc
+
+ For Q4 and Q4r detectors, controls whether to use Fast or Slow + ADC. For all other detectors, controls whether to use Hardware or Software + binning.
+
Raw images, $(P)$(R)ADSCRaw
+
+ Write raw images.
+
Image transforms, $(P)$(R)ADSCImXform
+
+ Perform image transformations.
+
Stored darks, $(P)$(R)ADSCStrDrks
+
+ Use stored dark images. If set to Yes, stored dark images are assumed to + have been installed by ADSC and should be used.
+
+

+ Detector File Parameters

+
+
Beam center X, $(P)$(R)ADSCBeamX
+
+ Beam center in the X dimension.
+
Beam center Y, $(P)$(R)ADSCBeamY
+
+ Beam center in the Y dimension.
+
Distance, $(P)$(R)ADSCDistnce
+
+ Detector distance.
+
Two theta, $(P)$(R)ADSC2Theta
+
+ Detector 2θ angle.
+
Axis, $(P)$(R)ADSCAxis
+
+ Crystal rotation axis.
+
Wavelength, $(P)$(R)ADSCWavelen
+
+ X-ray wavelength.
+
Image width, $(P)$(R)ADSCImWidth
+
+ Crystal rotation during exposure.
+
Phi, $(P)$(R)ADSCPhi
+
+ Phi position at start of exposure.
+
Omega, $(P)$(R)ADSCOmega
+
+ Omega position at start of exposure.
+
Kappa, $(P)$(R)ADSCKappa
+
+ Kappa position at start of exposure.
+
+

+ Screenshots

+ +

+ Unsupported areaDetector base Features

+ +

+ Limitations

+ + + diff --git a/documentation/areaDetector.html b/documentation/areaDetector.html index 3a5b34b..99c4e06 100755 --- a/documentation/areaDetector.html +++ b/documentation/areaDetector.html @@ -1,296 +1,296 @@ - - - areaDetector: EPICS software for area detectors - - -

- areaDetector: EPICS software for area detectors

-

- Module Owner: Mark Rivers: University of Chicago

-

- This page is the home of areaDetector, an application for controlling area - (2-D) detectors, including CCDs, pixel array detectors, and online imaging plates. -

-

- NOTE: This module will replace the - ccd and pilatusROI - modules.  

-

- Devices supported in areaDetector include:

-

- From Dectris -

- -

- From Prosilica -

- -

- From MAR (coming soon)

- -

- From Roper (coming soon)

- -

- From Bruker (coming soon)

- -

- Please email any comments and bug reports to - Mark Rivers who is responsible for coordinating development and releases.

-

- Where to find it

-

- The areaDetector module is in the EPICS Applications SVN repository on - SourceForge. Persons wishing to collaborate on this project can contact Mark - Rivers to get write access to this application there. -

-

- You can download the software from the links in the table below:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Module Version - Release Date - Filename - Documentation - Release Notes - Known Problems
- 1-2 - 19-Sep-2008 - areaDetectorR1-2.tgz - areaDetectorDoc - Release notes - See release notes
- 1-1 - 10-May-2008 - areaDetectorR1-1.tgz - areaDetectorDoc - Release notes - See release notes
- 1-0 - 11-Apr-2008 - areaDetectorR1-0.tgz - areaDetectorDoc - Release notes - See release notes
-

- Required Modules

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Module Version - Requires module - Release needed - Required for
- 1-2 - EPICS base - 3.14.8.2 - Base support
- asyn - 4-10 - Socket and interface support
- calc - 2-6-5 - scalcout record, needed by sscan database and useful for other databases
- sscan - 2-5-6 - Busy record
- mca - 6-10 - mca record for getting time sequence of ROI counts
- autosave - 4-3 - Save/restore
- 1-1 - EPICS base - 3.14.8.2 - Base support
- asyn - 4-10 - Socket and interface support
- sscan - 2-5-6 - Busy record
- autosave - 4-3 - Save/restore
- 1-0 - EPICS base - 3.14.8.2 - Base support
- asyn - 4-10 - Socket and interface support
- sscan - 2-5-6 - Busy record
- autosave - 4-3 - Save/restore
-

- Installation and Building

-

- After obtaining a copy of the distribution, it must be installed and built for use - at your site. These steps only need to be performed once for the site (unless versions - of the module running under different releases of EPICS and/or the other required - modules are needed).

-
    -
  1. Create an installation directory for the module, usually this will end with
    -
    - .../support/ -
    -
  2. -
  3. Place the distribution file in this directory. Then issue the commands (Unix style) -
    tar xvzf areaDetectorRX-Y.tgz
    -
    -
    - where X-Y is the release.
  4. -
  5. This creates a <top> application.
    -
    .../support/areaDetectorRX-Y
    -
    -
  6. -
  7. Edit the config[ure]/RELEASE file and set the paths to your installation - of EPICS base and to your versions of supporting modules.
  8. -
  9. Run gnumake in the top level directory and check for any compilation - errors.
  10. -
  11. Please email  Mark Rivers  - so that a record can be kept of which sites are using this software.
  12. -
-

- In Use

-

- This software was originally developed by Mark Rivers.

- - - + + + areaDetector: EPICS software for area detectors + + +

+ areaDetector: EPICS software for area detectors

+

+ Module Owner: Mark Rivers: University of Chicago

+

+ This page is the home of areaDetector, an application for controlling area + (2-D) detectors, including CCDs, pixel array detectors, and online imaging plates. +

+

+ NOTE: This module will replace the + ccd and pilatusROI + modules.  

+

+ Devices supported in areaDetector include:

+

+ From Dectris +

+ +

+ From Prosilica +

+ +

+ From MAR (coming soon)

+ +

+ From Roper (coming soon)

+ +

+ From Bruker (coming soon)

+ +

+ Please email any comments and bug reports to + Mark Rivers who is responsible for coordinating development and releases.

+

+ Where to find it

+

+ The areaDetector module is in the EPICS Applications SVN repository on + SourceForge. Persons wishing to collaborate on this project can contact Mark + Rivers to get write access to this application there. +

+

+ You can download the software from the links in the table below:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Module Version + Release Date + Filename + Documentation + Release Notes + Known Problems
+ 1-2 + 19-Sep-2008 + areaDetectorR1-2.tgz + areaDetectorDoc + Release notes + See release notes
+ 1-1 + 10-May-2008 + areaDetectorR1-1.tgz + areaDetectorDoc + Release notes + See release notes
+ 1-0 + 11-Apr-2008 + areaDetectorR1-0.tgz + areaDetectorDoc + Release notes + See release notes
+

+ Required Modules

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Module Version + Requires module + Release needed + Required for
+ 1-2 + EPICS base + 3.14.8.2 + Base support
+ asyn + 4-10 + Socket and interface support
+ calc + 2-6-5 + scalcout record, needed by sscan database and useful for other databases
+ sscan + 2-5-6 + Busy record
+ mca + 6-10 + mca record for getting time sequence of ROI counts
+ autosave + 4-3 + Save/restore
+ 1-1 + EPICS base + 3.14.8.2 + Base support
+ asyn + 4-10 + Socket and interface support
+ sscan + 2-5-6 + Busy record
+ autosave + 4-3 + Save/restore
+ 1-0 + EPICS base + 3.14.8.2 + Base support
+ asyn + 4-10 + Socket and interface support
+ sscan + 2-5-6 + Busy record
+ autosave + 4-3 + Save/restore
+

+ Installation and Building

+

+ After obtaining a copy of the distribution, it must be installed and built for use + at your site. These steps only need to be performed once for the site (unless versions + of the module running under different releases of EPICS and/or the other required + modules are needed).

+
    +
  1. Create an installation directory for the module, usually this will end with
    +
    + .../support/ +
    +
  2. +
  3. Place the distribution file in this directory. Then issue the commands (Unix style) +
    tar xvzf areaDetectorRX-Y.tgz
    +
    +
    + where X-Y is the release.
  4. +
  5. This creates a <top> application.
    +
    .../support/areaDetectorRX-Y
    +
    +
  6. +
  7. Edit the config[ure]/RELEASE file and set the paths to your installation + of EPICS base and to your versions of supporting modules.
  8. +
  9. Run gnumake in the top level directory and check for any compilation + errors.
  10. +
  11. Please email  Mark Rivers  + so that a record can be kept of which sites are using this software.
  12. +
+

+ In Use

+

+ This software was originally developed by Mark Rivers.

+ + +