eiger setting dac works now and setsettings.. need to work on trimbits

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@621 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d 2013-06-20 09:25:21 +00:00
parent 6d4e5aa1af
commit af22e53a16
4 changed files with 24 additions and 7 deletions

View File

@ -39,6 +39,8 @@ int sChan, sChip, sMod, sDac, sAdc;
int nModBoard; int nModBoard;
extern int dataBytes; extern int dataBytes;
const char* dacNames[16] = {"Svp","Svn","Vtr","Vrf","Vrs","Vtgstv","Vcmp_ll","Vcmp_lr","Cal","Vcmp_rl","Vcmp_rr","Rxb_rb","Rxb_lb","Vcp","Vcn","Vis"};
int dacvalues[NDAC]; int dacvalues[NDAC];
/** temporary /** temporary
@ -222,7 +224,9 @@ int detectorTest( enum digitalTestMode arg){
int setDAC(enum detDacIndex ind, int val, int imod){ int setDAC(enum detDacIndex ind, int val, int imod){
//#ifdef VERBOSE
printf("Setting dac %d: %s to %d mV\n",ind, dacNames[(int)ind],val);
//#endif
if (val >= 0) if (val >= 0)
dacvalues[(int)ind] = val; dacvalues[(int)ind] = val;
@ -242,12 +246,25 @@ int getADC(enum detDacIndex ind, int imod){
int setModule(sls_detector_module myChan){ int setModule(sls_detector_module myMod){
//template initModulebyNumber() from mcb_funcs.c #ifdef VERBOSE
printf("Setting module\n");
#endif
//int nchip = myMod.nchip;
//int nchan = (myMod.nchan)/nchip;
int i;
for(i=0;i<myMod.ndac;i++)
setDAC(i,myMod.dacs[i],myMod.module);
return OK; return OK;
} }
int getModule(sls_detector_module *myChan){ int getModule(sls_detector_module *myMod){
//template getModulebyNumber() from mcb_funcs.c //template getModulebyNumber() from mcb_funcs.c
return FAIL; return FAIL;
} }

View File

@ -64,8 +64,8 @@ int setChip(sls_detector_chip myChip);
int getChip(sls_detector_chip *myChip); int getChip(sls_detector_chip *myChip);
#endif #endif
int setModule(sls_detector_module myChan); int setModule(sls_detector_module myMod);
int getModule(sls_detector_module *myChan); int getModule(sls_detector_module *myMod);
enum detDacIndex setSettings(enum detDacIndex sett, int imod); enum detDacIndex setSettings(enum detDacIndex sett, int imod);

View File

@ -1110,7 +1110,7 @@ int set_dac(int file_des) {
break; break;
} }
#ifdef VERBOSE #ifdef VERBOSE
printf("Setting DAC %d of module %d to %d V\n", idac, imod, val); printf("Setting DAC %d of module %d to %d \n", idac, imod, val);
#endif #endif
#ifdef SLS_DETECTOR_FUNCTION_LIST #ifdef SLS_DETECTOR_FUNCTION_LIST
if (ret==OK) { if (ret==OK) {