* dac WIP

* dacs WIP

* DACs are working with names

* namechanges of vrfsh->vshaper, vrfshnpol->vshaperneg

* pattern for MY3, configure MAC for MY3
This commit is contained in:
Marie Andrä
2019-10-07 12:13:25 +02:00
committed by Dhanya Thattil
parent 16f7b42533
commit 5f94b5c246
14 changed files with 665 additions and 151 deletions

View File

@ -934,6 +934,13 @@ slsDetectorCommand::slsDetectorCommand(multiSlsDetector *det) {
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC;
++i;
/*! \page settings
- <b>vhaper1 [i] [mv]</b> Sets/gets the voltage to define the feedback resistance of the first shaper. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"])
*/
descrToFuncMap[i].m_pFuncName = "vshaper";
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC;
++i;
/*! \page settings
- <b>vshaper2 [i] [mv]</b> Sets/gets the voltage to define the feedback resistance of the second shaper. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"])
*/
@ -941,6 +948,13 @@ slsDetectorCommand::slsDetectorCommand(multiSlsDetector *det) {
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC;
++i;
/*! \page settings
- <b>vhaper1 [i] [mv]</b> Sets/gets the voltage to define the feedback resistance of the first shaper. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"])
*/
descrToFuncMap[i].m_pFuncName = "vshaperneg";
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC;
++i;
/*! \page settings
- <b>vhighvoltage [i]</b> Sets/gets the high voltage to the sensor in V. \c Returns \c (int ["mV"]).
*/
@ -1214,51 +1228,51 @@ slsDetectorCommand::slsDetectorCommand(multiSlsDetector *det) {
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC;
++i;
/* MYTHEN 3.01
/* MYTHEN 3.0
all values are in DACu */
descrToFuncMap[i].m_pFuncName = "vIpre";
descrToFuncMap[i].m_pFuncName = "vipre";
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC;
++i;
descrToFuncMap[i].m_pFuncName = "VcdSh";
descrToFuncMap[i].m_pFuncName = "vdcsh";
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC;
++i;
/*! \page settings
- <b>Vth1</b> Sets/gets first detector threshold voltage for Mythen 3.01. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"])
*/
descrToFuncMap[i].m_pFuncName = "Vth1";
descrToFuncMap[i].m_pFuncName = "vth1";
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC;
++i;
/*! \page settings
- <b>Vth1</b> Sets/gets second detector threshold voltage for Mythen 3.01. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"])
- <b>Vth1</b> Sets/gets second detector threshold voltage for Mythen 3.0. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"])
*/
descrToFuncMap[i].m_pFuncName = "Vth2";
descrToFuncMap[i].m_pFuncName = "vth2";
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC;
++i;
/*! \page settings
- <b>Vth1</b> Sets/gets third detector threshold voltage for Mythen 3.01. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"])
- <b>Vth1</b> Sets/gets third detector threshold voltage for Mythen 3.0. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"])
*/
descrToFuncMap[i].m_pFuncName = "Vth3";
descrToFuncMap[i].m_pFuncName = "vth3";
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC;
++i;
descrToFuncMap[i].m_pFuncName = "VPL"; //baseline for analog pulsing
descrToFuncMap[i].m_pFuncName = "vpl"; //baseline for analog pulsing
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC;
++i;
descrToFuncMap[i].m_pFuncName = "Vtrim";
descrToFuncMap[i].m_pFuncName = "vph";
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC;
++i;
descrToFuncMap[i].m_pFuncName = "vIbias";
descrToFuncMap[i].m_pFuncName = "vtrim";
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC;
++i;
descrToFuncMap[i].m_pFuncName = "vIinSh";
descrToFuncMap[i].m_pFuncName = "viinsh";
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC;
++i;
@ -1266,19 +1280,23 @@ slsDetectorCommand::slsDetectorCommand(multiSlsDetector *det) {
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC;
++i;
descrToFuncMap[i].m_pFuncName = "casSh";
descrToFuncMap[i].m_pFuncName = "cassh";
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC;
++i;
descrToFuncMap[i].m_pFuncName = "vIbiasSh";
descrToFuncMap[i].m_pFuncName = "vicin";
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC;
++i;
descrToFuncMap[i].m_pFuncName = "vIcin";
descrToFuncMap[i].m_pFuncName = "vipreout";
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC;
++i;
descrToFuncMap[i].m_pFuncName = "vIpreOut";
descrToFuncMap[i].m_pFuncName = "vrfsh";
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC;
++i;
descrToFuncMap[i].m_pFuncName = "vrfshnpol";
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC;
++i;
@ -3264,9 +3282,9 @@ std::string slsDetectorCommand::cmdDAC(int narg, const char * const args[], int
dac = TRIMBIT_SIZE;
else if (cmd == "vpreamp")
dac = PREAMP;
else if (cmd == "vshaper1")
else if (cmd == "vshaper1" || cmd == "vshaper")
dac = SHAPER1;
else if (cmd == "vshaper2")
else if (cmd == "vshaper2" || cmd == "vshaperneg")
dac = SHAPER2;
else if (cmd == "vhighvoltage")
dac = HIGH_VOLTAGE;
@ -3349,35 +3367,32 @@ std::string slsDetectorCommand::cmdDAC(int narg, const char * const args[], int
mode = 1;
} else if (cmd == "v_limit")
dac = V_LIMIT;
else if (cmd == "vIpre")
else if (cmd == "vipre")
dac = M_vIpre;
else if (cmd == "vIbias")
dac = M_vIbias;
else if (cmd == "vIinSh")
else if (cmd == "viinsh")
dac = M_vIinSh;
else if (cmd == "VcdSh")
else if (cmd == "vdcsh")
dac = M_VdcSh;
else if (cmd == "Vth1")
else if (cmd == "vth1")
dac = THRESHOLD;
else if (cmd == "Vth2")
else if (cmd == "vth2")
dac = M_Vth2;
else if (cmd == "Vth3")
else if (cmd == "vth3")
dac = M_Vth3;
else if (cmd == "VPL")
else if (cmd == "vpl")
dac = M_VPL;
else if (cmd == "Vtrim")
else if (cmd == "vph")
dac = CALIBRATION_PULSE;
else if (cmd == "vtrim")
dac = TRIMBIT_SIZE;
else if (cmd == "casSh")
else if (cmd == "cassh")
dac = M_casSh;
else if (cmd == "cas")
dac = M_cas;
else if (cmd == "vIcin")
else if (cmd == "vicin")
dac = M_vIcin;
else if (cmd == "vIbiasSh")
dac = M_vIbiasSh;
else if (cmd == "vIpreOut")
else if (cmd == "vipreout")
dac = M_vIpreOut;
else
return std::string("cannot decode dac ") + cmd;