This is an EPICS areaDetector driver for the Lambda detector from X-spectrum
The interface to the detector is provided by a TCP/UDP/IP socket interface to the detector. X-Spectrum provides a library to handle communications and acquisition in the camera. This driver provides an interface layer between the vendor library and EPICS areaDetector.
The hardware interface between the camera and the controlling computer consists of
This detector is capable of acquiring up to 2000 images/sec. It may be necessary, therefore, to adapt standard areaDetector plugins for faster collection to ensure processing of all images.
The following table describes how the Lambda driver implements some of the standard driver parameters.
Parameter index variable | EPICS record name | Description |
---|---|---|
ADAcquireTime | $(P)$(R)AcquireTime | Controls the exposure time of the camera in seconds. |
ADAcquirePeriod | $(P$(R)AcquirePeriod | NOT YET IMPLEMENTED IN FIRMWARE. Controls the period between exposures in internal trigger mode. Currently this feature is not supported by the camera firmware but this is a planned feature. Once the firmware supports this feature, the software should support this. |
ADTriggerMode | $(P)$(R)TriggerMode | Default descriptions are overloaded. Allows four modes:
|
ADAcquire | $(P)$(R)Acquire | Controls starting and stopping camera images. |
ADNumImages | $(P)$(R)NumImages | In Multiple Image mode, this controls the number of images to be collected. |
ADImageMode | $(P)$(R)ImageMode | Sets selection of Single or multiple Images when acquire button is pressed. Acquisition on the Lambda is controlled by setting a defined number of images. "Continuous" has been removed from the options. |
Parameter Definition in ADLambda.cpp and record definitions in ADLambda.template | ||||||
Parameter index variable | asyn interface | Access | Description | drvInfo string | EPICS record name | EPICS record type |
---|---|---|---|---|---|---|
LAMBDA_ConfigFilePath | asynOctet | r/w | Displays the full path to the detector's configueationFile | LAMBDA_CONFIG_FILE_PATH | ConfigFilePath | waveform |
LAMBDA_EnergyThreshold | asynFloat64 | r/w | Sets the minimum energy that should register a valid event. | LAMBDA_ENERGY_THRESHOLD | EnergyThreshold | ao |
LAMBDA_DecodedQueueDepth | asynInt32 | r | Displays how far into the decoded queue we have reached. | LAMBDA_DECODED_QUEUE_DEPTH | DecodedQueueDepth | longin |
LAMBDA_BadFrameCounter | asynInt32 | r | Counts the number of bad frames detected during decoding. images are sent as a number of packets, rotating over 4 network ports. If the packets for the next image are received on all 4 ports, before the finish of an image, then the frame is counted as a bad frame. | LAMBDA_BAD_FRAME_COUNTER | BadFrameCounter | longin |
LAMBDA_OperatingMode | asynInt32 | r/w | Switches between 12 and 24 bit counting mode. These are
referenced in pulldown as
|
LAMBDA_OPERATING_MODE | OperatingMode OperatingMode_RBV |
mbbo mbbi |
LAMBDA_DetectorState | asynInt32 | r | Displays the current state of the image processing of the
detector.
|
LAMBDA_DETECTOR_STATE | LambdaState | mbbi |
The Lambda detector instance is created using the LambdaConfig command, either from C/C++ or from the EPICS IOC shell.
int LambdaConfig(const char *portName, const char* configPath, int maxBuffers, size_t maxMemory, int priority, int stackSize)
For details on the meaning of the parameters to this function refer to the documentation on the LambdaConfig function in the Lambda.cpp documentation
and in the documentation for the constructor in the ADLambda class)The Lambda detector itself is rated at 2000 frames/sec. This rate has been achieved simply processing the detector images into NDArrays. We have been able to save up to 2000 images/sec for a period of time using a PipeWriterPlugin that writes to a Unix Pipe which feeds an external MPI program which compresses the image data and writes to a binary file with occasional bad frame errors. Sometimes the detector seems to persist giving bad frames once it gets started and the detector has to be reset. Sometimes we lose communication with the detector through the 1GB command interface. When this happens we have to power down the detector for about 10 minutes before it will come on again.
This detector is capable of supporting a number of features which are not currently available in the detector driver & firmware. These features will be added as they are made available by the vendor.
To be added later...