areaDetector Prosilica driver

January 30, 2009

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 only supported under Windows (EPICS win32-x86 architecture) and Linux because the vendor library is only provided as a pre-built binary for those operating systems. 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 hardware timing input and output signals that are supported in the driver.

The ADFileFormat choices for the Prosilica are:

The ADDataType choices for the Prosilica are:

The ADColorMode choices for the Prosilica are:

The color Prosilica cameras are also capable of various YUV color formats but these are not supported in the driver. They may be added in a future release.

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
Trigger and I/O Control
PSSyncIn1Level asynInt32 r/o The level of the Sync In 1 signal PS_SYNC_IN_1_LEVEL $(P)$(R)SyncIn1Level_RBV bi
PSSyncIn2Level asynInt32 r/o The level of the Sync In 2 signal PS_SYNC_IN_2_LEVEL $(P)$(R)SyncIn2Level_RBV bi
PSSyncOut1Mode asynInt32 r/w The mode of the Sync Out 1 signal. Allowed values are:
GPO (general purpose output)
AcqTrigReady
FrameTrigReady
FrameTrigger
Exposing
FrameReadout
Imaging
Acquiring
SyncIn1
SyncIn2
SyncIn3
SyncIn4
Strobe1
Strobe2
Strobe3
Strobe4
PS_SYNC_OUT_1_MODE $(P)$(R)SyncOut1Mode
$(P)$(R)SyncOut1Mode_RBV
mbbo
mbbi
PSSyncOut1Level asynInt32 r/w The level of the Sync Out 1 signal. This is only programmable when SyncOut1Mode=GPO. PS_SYNC_OUT_1_LEVEL $(P)$(R)SyncOut1Level
$(P)$(R)SyncOut1Level_RBV
bo
bi
PSSyncOut1Invert asynInt32 r/w Flag to invert the Sync Out 1 signal. PS_SYNC_OUT_1_INVERT $(P)$(R)SyncOut1Invert
$(P)$(R)SyncOut1Invert_RBV
bo
bi
PSSyncOut2Mode asynInt32 r/w The mode of the Sync Out 2 signal. Allowed values are the same as for PSSyncOut1Mode. PS_SYNC_OUT_2_MODE $(P)$(R)SyncOut2Mode
$(P)$(R)SyncOut2Mode_RBV
mbbo
mbbi
PSSyncOut2Level asynInt32 r/w The level of the Sync Out 2 signal. This is only programmable when SyncOut2Mode=GPO. PS_SYNC_OUT_2_LEVEL $(P)$(R)SyncOut2Level
$(P)$(R)SyncOut1Level_RBV
bo
bi
PSSyncOut2Invert asynInt32 r/w Flag to invert the Sync Out 2 signal. PS_SYNC_OUT_2_INVERT $(P)$(R)SyncOut2Invert
$(P)$(R)SyncOut2Invert_RBV
bo
bi
PSSyncOut3Mode asynInt32 r/w The mode of the Sync Out 3 signal. Allowed values are the same as for PSSyncOut1Mode. PS_SYNC_OUT_3_MODE $(P)$(R)SyncOut3Mode
$(P)$(R)SyncOut3Mode_RBV
mbbo
mbbi
PSSyncOut3Level asynInt32 r/w The level of the Sync Out 3 signal. This is only programmable when SyncOut3Mode=GPO. PS_SYNC_OUT_3_LEVEL $(P)$(R)SyncOut3Level
$(P)$(R)SyncOut3Level_RBV
bo
bi
PSSyncOut3Invert asynInt32 r/w Flag to invert the Sync Out 3 signal. PS_SYNC_OUT_3_INVERT $(P)$(R)SyncOut3Invert
$(P)$(R)SyncOut3Invert_RBV
bo
bi
PSStrobe1Mode asynInt32 r/w The mode of the Strobe 1 signal. The Strobe signals are based on the following values, but allow for changing the delay and width relative to the underlying value. Any of the outputs can be set to the Stobe1 value, rather than the raw values of these signals. Allowed values are:
AcqTrigReady
FrameTrigReady
FrameTrigger
Exposing
FrameReadout
Acquiring
SyncIn1
SyncIn2
SyncIn3
SyncIn4
PS_STROBE_1_MODE $(P)$(R)Strobe1Mode
$(P)$(R)Strobe1Mode_RBV
mbbo
mbbi
PSStrobe1CtlDuration asynInt32 r/w Flag to allow controlling the strobe duration. PS_STROBE_1_CTL_DURATION $(P)$(R)Strobe1CtlDuration
$(P)$(R)Strobe1CtlDuration_RBV
bo
bi
PSStrobe1Duration asynFloat64 r/w The strobe duration if PSStrobe1CtlDuration is On. PS_STROBE_1_DURATION $(P)$(R)Strobe1Duration
$(P)$(R)Strobe1Duration_RBV
ao
ai
PSStrobe1Delay asynFloat64 r/w The strobe delay relative to the underlying signal that the strobe is based on. PS_STROBE_1_DELAY $(P)$(R)Strobe1Delay
$(P)$(R)Strobe1Delay_RBV
ao
ai
Statistics Information
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

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

The Linux driver currently requires some modifications to EPICS base. This should be resolved either by modifying base or with changes from Prosilica for their driver.