Implemented readout delay

This commit is contained in:
2016-11-24 17:19:27 +01:00
parent 16b6359c37
commit 403dc702fb
3 changed files with 18 additions and 1 deletions
Binary file not shown.
+2
View File
@@ -76,6 +76,7 @@ unsigned int millitime();
#define REG_EEPROM_PAGE_MEZZ 0x0001A // DRS4 Mezz
#define REG_TRG_CONFIG 0x0001C // DRS4 Eval4
#define REG_LMK_LSB 0x0001E // DRS4 Mezz
#define REG_READOUT_DELAY 0x00020 // DRS4 Eval5
#define REG_WARMUP 0x00020 // DRS4 Mezz
#define REG_COOLDOWN 0x00022 // DRS4 Mezz
#define REG_READ_POINTER 0x00026 // DRS4 Mezz
@@ -640,6 +641,7 @@ public:
int GetTriggerDelay() { return fTriggerDelay; }
double GetTriggerDelayNs() { return fTriggerDelayNs; }
int SetSyncDelay(int ticks);
int SetReadoutDelay(int ticks);
int SetTriggerLevel(double value);
int SetIndividualTriggerLevel(int channel, double voltage);
int SetTriggerPolarity(bool negative);
+16 -1
View File
@@ -2020,6 +2020,8 @@ int DRSBoard::Init()
SetDecimation(0);
}
SetReadoutDelay(30303 * 0); // in ms
// disable calibration signals
EnableAcal(0, 0);
SetCalibTiming(0, 0);
@@ -2318,6 +2320,19 @@ int DRSBoard::SetSyncDelay(int ticks)
/*------------------------------------------------------------------*/
int DRSBoard::SetReadoutDelay(int ticks)
{
if (fBoardType == 9) {
Write(T_CTRL, REG_READOUT_DELAY, &ticks, 4);
return 1;
}
return 0;
}
/*------------------------------------------------------------------*/
int DRSBoard::SetTriggerSource(int source)
{
short int reg;
@@ -4560,7 +4575,7 @@ double DRSBoard::GetTrueFrequency()
int DRSBoard::GetTime(unsigned int chipIndex, int channelIndex, int tc, float *time, bool tcalibrated, bool rotated)
{
int i, scale, iend;
int i, scale;
double gt0, gt;
/* for DRS2, please use function below */