From b90ca7b8640f9d5dcd56ea4d7e76cb153badd739 Mon Sep 17 00:00:00 2001 From: Anna Bergamaschi Date: Tue, 16 Aug 2016 15:15:24 +0200 Subject: [PATCH] Added DACs for ne chiptestboard; fixed problem on dac14/highvoltage for moench --- .../commonFiles/sls_detector_defs.h | 8 ++++- .../slsDetector/slsDetector.cpp | 4 +-- .../slsDetector/slsDetectorCommand.cpp | 36 +++++++++++++++++-- 3 files changed, 43 insertions(+), 5 deletions(-) diff --git a/slsDetectorSoftware/commonFiles/sls_detector_defs.h b/slsDetectorSoftware/commonFiles/sls_detector_defs.h index 3435d5ed7..d4fce83e8 100755 --- a/slsDetectorSoftware/commonFiles/sls_detector_defs.h +++ b/slsDetectorSoftware/commonFiles/sls_detector_defs.h @@ -361,7 +361,13 @@ enum dacIndex { TEMPERATURE_10GE, /**< temperature sensor (close to 10GE) */ TEMPERATURE_DCDC, /**< temperature sensor (close to DCDC) */ TEMPERATURE_SODL, /**< temperature sensor (close to SODL) */ - TEMPERATURE_SODR /**< temperature sensor (close to SODR) */ + TEMPERATURE_SODR, /**< temperature sensor (close to SODR) */ + V_POWER_A = 100, /**new chiptest board */ + V_POWER_B = 101, /**new chiptest board */ + V_POWER_C = 102, /**new chiptest board */ + V_POWER_D = 103, /**new chiptest board */ + V_POWER_IO =104, /**new chiptest board */ + V_POWER_CHIP=105 /**new chiptest board */ }; /** diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index d0f6ef07c..7565aeaf8 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -2277,8 +2277,8 @@ dacs_t slsDetector::setDAC(dacs_t val, dacIndex index, int mV, int imod){ int arg[3]; - if ( (thisDetector->myDetectorType != GOTTHARD) && (thisDetector->myDetectorType != PROPIX) && index==HV_POT) - index=HV_NEW; + if ( (thisDetector->myDetectorType == GOTTHARD) || (thisDetector->myDetectorType == PROPIX) && index==HV_NEW) + index=HV_POT; arg[0]=index; arg[1]=imod; diff --git a/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp b/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp index a0aec440e..497aa2a1c 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp @@ -737,6 +737,26 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { i++; + descrToFuncMap[i].m_pFuncName="v_b"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; + i++; + + descrToFuncMap[i].m_pFuncName="v_c"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; + i++; + + descrToFuncMap[i].m_pFuncName="v_d"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; + i++; + + descrToFuncMap[i].m_pFuncName="v_io"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; + i++; + + descrToFuncMap[i].m_pFuncName="v_chip"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; + i++; + /* r/w timers */ descrToFuncMap[i].m_pFuncName="temp_adc"; // @@ -3562,7 +3582,7 @@ string slsDetectorCommand::cmdDAC(int narg, char *args[], int action) { else if (cmd=="vshaper2") dac=SHAPER2; else if (cmd=="vhighvoltage") - dac=HV_POT; + dac=HV_NEW; else if (cmd=="vapower") dac=VA_POT; else if (cmd=="vddpower") @@ -3641,7 +3661,19 @@ string slsDetectorCommand::cmdDAC(int narg, char *args[], int action) { else if (cmd== "vis") dac=E_Vis; else if (cmd== "iodelay") - dac=IO_DELAY; + dac=IO_DELAY; + else if (cmd== "v_a") + dac=V_POWER_A; + else if (cmd== "v_b") + dac=V_POWER_B; + else if (cmd== "v_c") + dac=V_POWER_C; + else if (cmd== "v_d") + dac=V_POWER_D; + else if (cmd== "v_io") + dac=V_POWER_IO; + else if (cmd== "v_chip") + dac=V_POWER_CHIP; else return string("cannot decode dac ")+cmd;