diff --git a/documentation/areaDetectorReleaseNotes.html b/documentation/areaDetectorReleaseNotes.html index 9345223..38bc5f8 100755 --- a/documentation/areaDetectorReleaseNotes.html +++ b/documentation/areaDetectorReleaseNotes.html @@ -1,60 +1,60 @@ - - - areaDetectorReleaseNotes.html - - -

- areaDetector Release Notes

-

- Release 1-2 (19-Sept-2008)

- -

- Release 1-1 (10-May-2008)

- -

- Release 1-0 (11-Apr-2008)

- -
- Suggestions and Comments to: -
- Mark Rivers : (rivers@cars.uchicago.edu) -
-
- - + + + areaDetectorReleaseNotes.html + + +

+ areaDetector Release Notes

+

+ Release 1-2 (19-Sept-2008)

+ +

+ Release 1-1 (10-May-2008)

+ +

+ Release 1-0 (11-Apr-2008)

+ +
+ Suggestions and Comments to: +
+ Mark Rivers : (rivers@cars.uchicago.edu) +
+
+ + diff --git a/documentation/prosilicaDoc.html b/documentation/prosilicaDoc.html index 2c37859..403851d 100755 --- a/documentation/prosilicaDoc.html +++ b/documentation/prosilicaDoc.html @@ -1,321 +1,321 @@ - - - areaDetector Prosilica driver - - -
-

- areaDetector Prosilica driver

-

- September 20, 2008

-

- Mark Rivers

-

- University of Chicago

-
-

- Contents

- -

- Prosilica Driver

-

- This is a driver for Gigabit Ethernet and Firewire cameras from - Prosilica. It inherits from ADDriver and implements nearly all of the parameters - in ADStdDriverParams.h. It also implements a number of parameters that are specific - to the Prosilica cameras. The driver is currently only supported under Windows (EPICS - win32-x86 architecture) because the vendor library is provided as a Windows DLL. - The vendor library provided by Prosilica does callbacks to a user-supplied function - each time there is a new frame. Thus, the driver does not need to create a thread - itself for callbacks. -

-

- The vendor library supports saving individual frames as TIFF files, and this is - implemented in the driver. The NDPluginFile plugin can be used to capture or stream - images much more rapidly in the netCDF file format. -

-

- The driver redefines the choices for 2 of the parameters defined in ADStdDriverParams.h. - The ADTriggerMode choices for the Prosilica are: -

- -

- The Prosilica supports additional hardware timing signals that may be supported - in a future release. -

-

- The ADFileFormat choices for the Prosilica are: -

- -

- The Prosilica driver implements the following parameters in addition to those in - ADStdDriverParams.h: -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Parameter Definitions in prosilica.cpp and EPICS Record Definitions in prosilica.template
- Enum name - asyn interface - Access - Description - drvUser string - EPICS record name - EPICS record type
- PSReadStatistics - asynInt32 - r/w - Read the Gigabit Ethernet statistics when 1 - PS_READ_STATISTICS - $(P)$(R)PSReadStatistics - longout
- PSStatDriverType - asynOctet - r/o - Driver type - PS_DRIVER_TYPE - $(P)$(R)PSDriverType_RBV - stringin
- PSStatFilterVersion - asynOctet - r/o - Packet filter version - PS_FILTER_VERSION - $(P)$(R)PSFilterVersion_RBV - stringin
- PSStatFrameRate - asynFloat64 - r/o - Frame rate (Hz) - PS_FRAME_RATE - $(P)$(R)PSFrameRate_RBV - ai
- PSStatFramesCompleted - asynInt32 - r/o - Number of frames completed - PS_FRAMES_COMPLETED - $(P)$(R)PSFramesCompleted_RBV - longin
- PSStatFramesDropped - asynInt32 - r/o - Number of frames dropped - PS_FRAMES_DROPPED - $(P)$(R)PSFramesDropped_RBV - longin
- PSStatPacketsErroneous - asynInt32 - r/o - Number of erroneous packets - PS_PACKETS_ERRONEOUS - $(P)$(R)PSPacketsErroneous_RBV - longin
- PSStatPacketsMissed - asynInt32 - r/o - Number of missed packets - PS_PACKETS_MISSED - $(P)$(R)PSPacketsMissed_RBV - longin
- PSStatPacketsReceived - asynInt32 - r/o - Number of received packets - PS_PACKETS_RECEIVED - $(P)$(R)PSPacketsReceived_RBV - longin
- PSStatPacketsRequested - asynInt32 - r/o - Number of packets requested - PS_PACKETS_REQUESTED - $(P)$(R)PSPacketsRequested_RBV - longin
- PSStatPacketsResent - asynInt32 - r/o - Number of packets resent - PS_PACKETS_RESENT - $(P)$(R)PSPacketsResent_RBV - longin
- PSBadFrameCounter - asynInt32 - r/o - Number of bad frames - PS_BAD_FRAME_COUNTER - $(P)$(R)PSBadFrameCounter_RBV - longin
-

- The following is the MEDM screen ADBase.adl connected to a Prosilica camera. -

-
-

- ADBase.adl

- ADBase_prosilica.png
-

- The following is the MEDM screen that provides access to the specific parameters - for the Prosilica detector. -

-
-

- prosilica.adl

- prosilica.png
-

- The following is an IDL - epics_ad_display screen displaying the Prosilica detector images. -

-
-

- epics_ad_display.pro

- prosilica_tvscl.jpg
-

- Future enhancements

-

- The driver does not currently support color. This will be added in the near future. -

-

- Work is needed on connection management. If the camera is unplugged or powered off - which the areaDetector driver is running it does not gracefully recover. -

- - + + + areaDetector Prosilica driver + + +
+

+ areaDetector Prosilica driver

+

+ September 20, 2008

+

+ Mark Rivers

+

+ University of Chicago

+
+

+ Contents

+ +

+ Prosilica Driver

+

+ This is a driver for Gigabit Ethernet and Firewire cameras from + Prosilica. It inherits from ADDriver and implements nearly all of the parameters + in ADStdDriverParams.h. It also implements a number of parameters that are specific + to the Prosilica cameras. The driver is currently only supported under Windows (EPICS + win32-x86 architecture) because the vendor library is provided as a Windows DLL. + The vendor library provided by Prosilica does callbacks to a user-supplied function + each time there is a new frame. Thus, the driver does not need to create a thread + itself for callbacks. +

+

+ The vendor library supports saving individual frames as TIFF files, and this is + implemented in the driver. The NDPluginFile plugin can be used to capture or stream + images much more rapidly in the netCDF file format. +

+

+ The driver redefines the choices for 2 of the parameters defined in ADStdDriverParams.h. + The ADTriggerMode choices for the Prosilica are: +

+ +

+ The Prosilica supports additional hardware timing signals that may be supported + in a future release. +

+

+ The ADFileFormat choices for the Prosilica are: +

+ +

+ The Prosilica driver implements the following parameters in addition to those in + ADStdDriverParams.h: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Parameter Definitions in prosilica.cpp and EPICS Record Definitions in prosilica.template
+ Enum name + asyn interface + Access + Description + drvUser string + EPICS record name + EPICS record type
+ PSReadStatistics + asynInt32 + r/w + Read the Gigabit Ethernet statistics when 1 + PS_READ_STATISTICS + $(P)$(R)PSReadStatistics + longout
+ PSStatDriverType + asynOctet + r/o + Driver type + PS_DRIVER_TYPE + $(P)$(R)PSDriverType_RBV + stringin
+ PSStatFilterVersion + asynOctet + r/o + Packet filter version + PS_FILTER_VERSION + $(P)$(R)PSFilterVersion_RBV + stringin
+ PSStatFrameRate + asynFloat64 + r/o + Frame rate (Hz) + PS_FRAME_RATE + $(P)$(R)PSFrameRate_RBV + ai
+ PSStatFramesCompleted + asynInt32 + r/o + Number of frames completed + PS_FRAMES_COMPLETED + $(P)$(R)PSFramesCompleted_RBV + longin
+ PSStatFramesDropped + asynInt32 + r/o + Number of frames dropped + PS_FRAMES_DROPPED + $(P)$(R)PSFramesDropped_RBV + longin
+ PSStatPacketsErroneous + asynInt32 + r/o + Number of erroneous packets + PS_PACKETS_ERRONEOUS + $(P)$(R)PSPacketsErroneous_RBV + longin
+ PSStatPacketsMissed + asynInt32 + r/o + Number of missed packets + PS_PACKETS_MISSED + $(P)$(R)PSPacketsMissed_RBV + longin
+ PSStatPacketsReceived + asynInt32 + r/o + Number of received packets + PS_PACKETS_RECEIVED + $(P)$(R)PSPacketsReceived_RBV + longin
+ PSStatPacketsRequested + asynInt32 + r/o + Number of packets requested + PS_PACKETS_REQUESTED + $(P)$(R)PSPacketsRequested_RBV + longin
+ PSStatPacketsResent + asynInt32 + r/o + Number of packets resent + PS_PACKETS_RESENT + $(P)$(R)PSPacketsResent_RBV + longin
+ PSBadFrameCounter + asynInt32 + r/o + Number of bad frames + PS_BAD_FRAME_COUNTER + $(P)$(R)PSBadFrameCounter_RBV + longin
+

+ The following is the MEDM screen ADBase.adl connected to a Prosilica camera. +

+
+

+ ADBase.adl

+ ADBase_prosilica.png
+

+ The following is the MEDM screen that provides access to the specific parameters + for the Prosilica detector. +

+
+

+ prosilica.adl

+ prosilica.png
+

+ The following is an IDL + epics_ad_display screen displaying the Prosilica detector images. +

+
+

+ epics_ad_display.pro

+ prosilica_tvscl.jpg
+

+ Future enhancements

+

+ The driver does not currently support color. This will be added in the near future. +

+

+ Work is needed on connection management. If the camera is unplugged or powered off + which the areaDetector driver is running it does not gracefully recover. +

+ + diff --git a/documentation/simDetectorDoc.html b/documentation/simDetectorDoc.html index 5f1baac..985157f 100755 --- a/documentation/simDetectorDoc.html +++ b/documentation/simDetectorDoc.html @@ -1,299 +1,299 @@ - - - areaDetector Simulation driver - - -
-

- areaDetector Simulation driver

-

- September 20, 2008

-

- Mark Rivers

-

- University of Chicago

-
-

-  

-

- Table of Contents

- -

- Introduction

-

- simDetector is a driver for a simulated area detector. It inherits from ADDriver. - The simulation detector implements nearly all of the parameters defined in ADStdDriverParams.h, - with the exception of the file saving parameters, which it does not implement. It - also implements a few parameters that are specific to the simulation detector. The - simulation detector is useful as a model for writing real detector drivers. It is - also very useful for testing plugins and channel access clients. This is part of - the definition of the simDetector class: -

-
-class simDetector : public ADDriver {
-public:
-    simDetector(const char *portName, int maxSizeX, int maxSizeY, NDDataType_t dataType,
-                int maxBuffers, size_t maxMemory);
-                 
-    /* These are the methods that we override from ADDriver */
-    virtual asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value);
-    virtual asynStatus writeFloat64(asynUser *pasynUser, epicsFloat64 value);
-    virtual asynStatus drvUserCreate(asynUser *pasynUser, const char *drvInfo, 
-                                     const char **pptypeName, size_t *psize);
-    void report(FILE *fp, int details);
-
-

- In the constructor simDetector the portName, maxBuffers, and maxMemory - arguments are passed to the ADDriver base class constructor. The maxSizeX, maxSizeY, - and dataType arguments are specific to the simulation driver, controlling the maximum - image size and initial data type of the computed images. The writeInt32 and writeFloat64 - methods override those in the base class. The driver takes action when new parameters - are passed via those interfaces. For example, the ADAcquire parameter (on the asynInt32 - interface) is used to turn acquisition (i.e. computing new images) on and off. -

-

- The simulation driver initially sets the image[i, j] = i*gainX + j*gainY * gain - * exposureTime * 1000. Thus the image is a linear ramp in the X and Y directions, - with the gains in each direction being detector-specific parameters. Each subsquent - acquisition increments each pixel value by gain*exposureTime*1000. Thus if gain=1 - and exposureTime=.001 second then the pixels are incremented by 1. If the array - is an unsigned 8 or 16 bit integer then the pixels will overflow and wrap around - to 0 after some period of time. This gives the appearance of bands that appear to - move with time. The slope of the bands and their periodicity can be adjusted by - changing the gains and exposure times. -

-

- The driver creates a thread that waits for a signal to start acquisition. When acquisition - is started that thread computes new images and then calls back any registered plugins - as follows: -

-
-        /* Put the frame number and time stamp into the buffer */
-        pImage->uniqueId = imageCounter;
-        pImage->timeStamp = startTime.secPastEpoch + startTime.nsec / 1.e9;
-        
-        /* Call the NDArray callback */
-        /* Must release the lock here, or we can get into a deadlock, because we can
-         * block on the plugin lock, and the plugin can be calling us */
-        epicsMutexUnlock(this->mutexId);
-        asynPrint(this->pasynUser, ASYN_TRACE_FLOW, 
-             "%s:%s: calling imageData callback\n", driverName, functionName);
-        doCallbacksGenericPointer(pImage, NDArrayData, addr);
-        epicsMutexLock(this->mutexId);
-
-

- Simulation driver specific parameters

-

- The simulation driver-specific parameters are the following: -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Parameter Definitions in simDetector.cpp and EPICS Record Definitions in simDetector.template
- Enum name - asyn interface - Access - Description - drvUser string - EPICS record name - EPICS record type
- SimGainX - asynFloat64 - r/w - Gain in the X direction - SIM_GAINX - $(P)$(R)GainX
- $(P)$(R)GainX_RBV
- ao
- ai
- SimGainY - asynFloat64 - r/w - Gain in the Y direction - SIM_GAINY - $(P)$(R)GainY
- $(P)$(R)GainY_RBV
- ao
- ai
- SimResetImage - asynInt32 - r/w - Reset image back to initial conditions when 1. - RESET_IMAGE - $(P)$(R)Reset
- $(P)$(R)Reset_RBV
- longout
- longin
-

- Unsupported standard driver parameters

- -

- Screenshots

-

- The following is the MEDM screen ADBase.adl connected to a simulation detector. -

-
-

- ADBase.adl

- ADBase_sim.png -
-

- The following is the MEDM screen that provides access to the specific parameters - for the simulation detector. -

-
-

- simDetector.adl

- simDetector.png -
-

- The following is an IDL - epics_ad_display screen using - image_display to display the simulation detector images. -

-
-

- epics_ad_display.pro

- simDetector_image_display.png -
-

- Configuration

-

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

-
-simDetectorConfig(const char *portName, int maxSizeX, int maxSizeY, 
-                  int dataType, int maxBuffers, size_t maxMemory)
-  
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Argument - Description
- portName - The name of the asyn port for this detector. -
- maxSizeX - Maximum number of pixels in the X direction for the simulated detector. -
- maxSizeY - Maximum number of pixels in the Y direction for the simulated detector. -
- dataType - Initial data type of the detector data. These are the enum values for NDDataType_t, - i.e. -
    -
  • 0=NDInt8
  • -
  • 1=NDUInt8
  • -
  • 2=NDInt16
  • -
  • 3=NDUInt16
  • -
  • 4=NDInt32
  • -
  • 5=NDUInt32
  • -
  • 6=NDFloat32
  • -
  • 7=NDFloat64
  • -
-
- maxBuffers - Maxiumum number of NDArray objects (image buffers) this driver is allowed to allocate. - The driver itself requires 2 buffers, and each queue element in a plugin can require - one buffer. So, for example, if 3 plugins are connected to this driver, and each - has a queue size of 10, then maxBuffers should be at least 32. -
- maxMemory - Maxiumum number of bytes of memory for all NDArray objects (image buffers) allocated - by this driver. If maxSizeX=maxSizeY=1024, and maxBuffers=32, then maxMemory should - be at least 33554432 (32MB). -
-

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

-

- The areaDetector software comes with an example IOC for the simulation driver, - iocBoot/iocSimDetector. -

- - + + + areaDetector Simulation driver + + +
+

+ areaDetector Simulation driver

+

+ September 20, 2008

+

+ Mark Rivers

+

+ University of Chicago

+
+

+  

+

+ Table of Contents

+ +

+ Introduction

+

+ simDetector is a driver for a simulated area detector. It inherits from ADDriver. + The simulation detector implements nearly all of the parameters defined in ADStdDriverParams.h, + with the exception of the file saving parameters, which it does not implement. It + also implements a few parameters that are specific to the simulation detector. The + simulation detector is useful as a model for writing real detector drivers. It is + also very useful for testing plugins and channel access clients. This is part of + the definition of the simDetector class: +

+
+class simDetector : public ADDriver {
+public:
+    simDetector(const char *portName, int maxSizeX, int maxSizeY, NDDataType_t dataType,
+                int maxBuffers, size_t maxMemory);
+                 
+    /* These are the methods that we override from ADDriver */
+    virtual asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value);
+    virtual asynStatus writeFloat64(asynUser *pasynUser, epicsFloat64 value);
+    virtual asynStatus drvUserCreate(asynUser *pasynUser, const char *drvInfo, 
+                                     const char **pptypeName, size_t *psize);
+    void report(FILE *fp, int details);
+
+

+ In the constructor simDetector the portName, maxBuffers, and maxMemory + arguments are passed to the ADDriver base class constructor. The maxSizeX, maxSizeY, + and dataType arguments are specific to the simulation driver, controlling the maximum + image size and initial data type of the computed images. The writeInt32 and writeFloat64 + methods override those in the base class. The driver takes action when new parameters + are passed via those interfaces. For example, the ADAcquire parameter (on the asynInt32 + interface) is used to turn acquisition (i.e. computing new images) on and off. +

+

+ The simulation driver initially sets the image[i, j] = i*gainX + j*gainY * gain + * exposureTime * 1000. Thus the image is a linear ramp in the X and Y directions, + with the gains in each direction being detector-specific parameters. Each subsquent + acquisition increments each pixel value by gain*exposureTime*1000. Thus if gain=1 + and exposureTime=.001 second then the pixels are incremented by 1. If the array + is an unsigned 8 or 16 bit integer then the pixels will overflow and wrap around + to 0 after some period of time. This gives the appearance of bands that appear to + move with time. The slope of the bands and their periodicity can be adjusted by + changing the gains and exposure times. +

+

+ The driver creates a thread that waits for a signal to start acquisition. When acquisition + is started that thread computes new images and then calls back any registered plugins + as follows: +

+
+        /* Put the frame number and time stamp into the buffer */
+        pImage->uniqueId = imageCounter;
+        pImage->timeStamp = startTime.secPastEpoch + startTime.nsec / 1.e9;
+        
+        /* Call the NDArray callback */
+        /* Must release the lock here, or we can get into a deadlock, because we can
+         * block on the plugin lock, and the plugin can be calling us */
+        epicsMutexUnlock(this->mutexId);
+        asynPrint(this->pasynUser, ASYN_TRACE_FLOW, 
+             "%s:%s: calling imageData callback\n", driverName, functionName);
+        doCallbacksGenericPointer(pImage, NDArrayData, addr);
+        epicsMutexLock(this->mutexId);
+
+

+ Simulation driver specific parameters

+

+ The simulation driver-specific parameters are the following: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Parameter Definitions in simDetector.cpp and EPICS Record Definitions in simDetector.template
+ Enum name + asyn interface + Access + Description + drvUser string + EPICS record name + EPICS record type
+ SimGainX + asynFloat64 + r/w + Gain in the X direction + SIM_GAINX + $(P)$(R)GainX
+ $(P)$(R)GainX_RBV
+ ao
+ ai
+ SimGainY + asynFloat64 + r/w + Gain in the Y direction + SIM_GAINY + $(P)$(R)GainY
+ $(P)$(R)GainY_RBV
+ ao
+ ai
+ SimResetImage + asynInt32 + r/w + Reset image back to initial conditions when 1. + RESET_IMAGE + $(P)$(R)Reset
+ $(P)$(R)Reset_RBV
+ longout
+ longin
+

+ Unsupported standard driver parameters

+ +

+ Screenshots

+

+ The following is the MEDM screen ADBase.adl connected to a simulation detector. +

+
+

+ ADBase.adl

+ ADBase_sim.png +
+

+ The following is the MEDM screen that provides access to the specific parameters + for the simulation detector. +

+
+

+ simDetector.adl

+ simDetector.png +
+

+ The following is an IDL + epics_ad_display screen using + image_display to display the simulation detector images. +

+
+

+ epics_ad_display.pro

+ simDetector_image_display.png +
+

+ Configuration

+

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

+
+simDetectorConfig(const char *portName, int maxSizeX, int maxSizeY, 
+                  int dataType, int maxBuffers, size_t maxMemory)
+  
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Argument + Description
+ portName + The name of the asyn port for this detector. +
+ maxSizeX + Maximum number of pixels in the X direction for the simulated detector. +
+ maxSizeY + Maximum number of pixels in the Y direction for the simulated detector. +
+ dataType + Initial data type of the detector data. These are the enum values for NDDataType_t, + i.e. +
    +
  • 0=NDInt8
  • +
  • 1=NDUInt8
  • +
  • 2=NDInt16
  • +
  • 3=NDUInt16
  • +
  • 4=NDInt32
  • +
  • 5=NDUInt32
  • +
  • 6=NDFloat32
  • +
  • 7=NDFloat64
  • +
+
+ maxBuffers + Maxiumum number of NDArray objects (image buffers) this driver is allowed to allocate. + The driver itself requires 2 buffers, and each queue element in a plugin can require + one buffer. So, for example, if 3 plugins are connected to this driver, and each + has a queue size of 10, then maxBuffers should be at least 32. +
+ maxMemory + Maxiumum number of bytes of memory for all NDArray objects (image buffers) allocated + by this driver. If maxSizeX=maxSizeY=1024, and maxBuffers=32, then maxMemory should + be at least 33554432 (32MB). +
+

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

+

+ The areaDetector software comes with an example IOC for the simulation driver, + iocBoot/iocSimDetector. +

+ +