Add the ability to set the BaselineClamp setting in the Andor SDK.

This commit is contained in:
Matthew Pearson
2016-06-23 12:00:48 -04:00
parent ebdef4d560
commit 5ca26492e6
3 changed files with 23 additions and 1 deletions

View File

@@ -277,6 +277,22 @@ record(mbbi, "$(P)$(R)AndorPreAmpGain_RBV")
field(SCAN, "I/O Intr")
}
record(bo, "$(P)$(R)AndorBaselineClamp")
{
field(DTYP, "asynInt32")
field(OUT, "@asyn($(PORT),$(ADDR),$(TIMEOUT))ANDOR_BASELINE_CLAMP")
field(ZNAM, "Disable")
field(ONAM, "Enable")
}
record(bi, "$(P)$(R)AndorBaselineClamp_RBV")
{
field(DTYP, "asynInt32")
field(INP, "@asyn($(PORT),$(ADDR),$(TIMEOUT))ANDOR_BASELINE_CLAMP")
field(ZNAM, "Disable")
field(ONAM, "Enable")
field(SCAN, "I/O Intr")
}
#Records in ADBase that do not apply to Andor

View File

@@ -136,6 +136,7 @@ AndorCCD::AndorCCD(const char *portName, const char *installPath, int shamrockID
createParam(AndorAccumulatePeriodString, asynParamFloat64, &AndorAccumulatePeriod);
createParam(AndorPreAmpGainString, asynParamInt32, &AndorPreAmpGain);
createParam(AndorAdcSpeedString, asynParamInt32, &AndorAdcSpeed);
createParam(AndorBaselineClampString, asynParamInt32, &AndorBaselineClamp);
// Create the epicsEvent for signaling to the status task when parameters should have changed.
// This will cause it to do a poll immediately, rather than wait for the poll time period.
@@ -579,6 +580,9 @@ asynStatus AndorCCD::writeInt32(asynUser *pasynUser, epicsInt32 value)
(function == AndorShutterExTTL)) {
status = setupShutter(-1);
}
else if (function == AndorBaselineClamp) {
checkStatus(SetBaselineClamp(value));
}
else {
status = ADDriver::writeInt32(pasynUser, value);
}

View File

@@ -29,6 +29,7 @@
#define AndorAccumulatePeriodString "ANDOR_ACCUMULATE_PERIOD"
#define AndorPreAmpGainString "ANDOR_PREAMP_GAIN"
#define AndorAdcSpeedString "ANDOR_ADC_SPEED"
#define AndorBaselineClampString "ANDOR_BASELINE_CLAMP"
/**
* Structure defining an ADC speed for the ADAndor driver.
@@ -86,7 +87,8 @@ class AndorCCD : public ADDriver {
int AndorAccumulatePeriod;
int AndorPreAmpGain;
int AndorAdcSpeed;
#define LAST_ANDOR_PARAM AndorAdcSpeed
int AndorBaselineClamp;
#define LAST_ANDOR_PARAM AndorBaselineClamp
private: