mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-28 01:00:02 +02:00
high voltage reflects the master only, if 2 masters reflects -1
This commit is contained in:
parent
558e5e2e9a
commit
389f356a3a
Binary file not shown.
@ -1,9 +1,9 @@
|
||||
Path: slsDetectorsPackage/slsDetectorSoftware/eigerDetectorServer
|
||||
URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
||||
Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
||||
Repsitory UUID: d3b24894af8a588e6945240c3b80c2b7024608c4
|
||||
Revision: 295
|
||||
Repsitory UUID: 2dfbd9016b501eca6ee2c00a08e49a3f7e7990d8
|
||||
Revision: 296
|
||||
Branch: 3.0-rc
|
||||
Last Changed Author: Dhanya_Maliakal
|
||||
Last Changed Rev: 1448
|
||||
Last Changed Date: 2017-07-25 13:53:46.000000002 +0200 ./Beb.c
|
||||
Last Changed Rev: 1457
|
||||
Last Changed Date: 2017-08-08 15:23:10.000000002 +0200 ./Makefile
|
||||
|
@ -1,11 +1,11 @@
|
||||
//#define SVNPATH ""
|
||||
#define SVNURL "git@git.psi.ch:sls_detectors_software/sls_detector_software.git"
|
||||
//#define SVNREPPATH ""
|
||||
#define SVNREPUUID "d3b24894af8a588e6945240c3b80c2b7024608c4"
|
||||
//#define SVNREV 0x1448
|
||||
#define SVNREPUUID "2dfbd9016b501eca6ee2c00a08e49a3f7e7990d8"
|
||||
//#define SVNREV 0x1457
|
||||
//#define SVNKIND ""
|
||||
//#define SVNSCHED ""
|
||||
#define SVNAUTH "Dhanya_Maliakal"
|
||||
#define SVNREV 0x1448
|
||||
#define SVNDATE 0x20170725
|
||||
#define SVNREV 0x1457
|
||||
#define SVNDATE 0x20170808
|
||||
//
|
||||
|
@ -30,6 +30,7 @@ dacs_t *detectorDacs=NULL;
|
||||
dacs_t *detectorAdcs=NULL;
|
||||
|
||||
int eiger_highvoltage = 0;
|
||||
int eiger_theo_highvoltage = 0;
|
||||
int eiger_iodelay = 0;
|
||||
int eiger_photonenergy = 0;
|
||||
int eiger_dynamicrange = 0;
|
||||
@ -745,22 +746,33 @@ int getADC(enum ADCINDEX ind, int imod){
|
||||
|
||||
|
||||
int setHighVoltage(int val){
|
||||
if(val!=-1){
|
||||
eiger_highvoltage = val;
|
||||
if(master){
|
||||
if (master) {
|
||||
|
||||
// set
|
||||
if(val!=-1){
|
||||
eiger_theo_highvoltage = val;
|
||||
int ret = Feb_Control_SetHighVoltage(val);
|
||||
if(!ret) //could not set
|
||||
return -2;
|
||||
else if (ret == -1) //outside range
|
||||
return -1;
|
||||
}
|
||||
|
||||
// get
|
||||
if (!Feb_Control_GetHighVoltage(&eiger_highvoltage)) {
|
||||
cprintf(RED,"Warning: Could not read high voltage\n");
|
||||
return -3;
|
||||
}
|
||||
|
||||
// tolerance of 5
|
||||
if (abs(eiger_theo_highvoltage-eiger_highvoltage) > HIGH_VOLTAGE_TOLERANCE) {
|
||||
cprintf(BLUE, "High voltage still ramping: %d\n", eiger_highvoltage);
|
||||
return eiger_highvoltage;
|
||||
}
|
||||
return eiger_theo_highvoltage;
|
||||
}
|
||||
|
||||
if(master && !Feb_Control_GetHighVoltage(&eiger_highvoltage)){
|
||||
cprintf(RED,"Warning: Could not read high voltage\n");
|
||||
return -3;
|
||||
}
|
||||
return eiger_highvoltage;
|
||||
return SLAVE_HIGH_VOLTAGE_READ_VAL;
|
||||
}
|
||||
|
||||
|
||||
|
@ -84,6 +84,8 @@ enum NETWORKINDEX {TXN_LEFT, TXN_RIGHT, TXN_FRAME,FLOWCTRL_10G};
|
||||
|
||||
#define MAX_SUBFRAME_EXPOSURE_VAL_IN_10NS (0x1FFFFFFF) /** 29 bit register for max subframe exposure value */
|
||||
|
||||
#define SLAVE_HIGH_VOLTAGE_READ_VAL (-999)
|
||||
#define HIGH_VOLTAGE_TOLERANCE (5)
|
||||
|
||||
|
||||
#endif /* SLSDETECTORSERVER_DEFS_H_ */
|
||||
|
@ -1,9 +1,9 @@
|
||||
Path: slsDetectorsPackage/slsDetectorSoftware
|
||||
URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
||||
Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
||||
Repsitory UUID: ef36cb7a54e1ae34ad1e85a46da6c121902108e6
|
||||
Revision: 1451
|
||||
Repsitory UUID: 2dfbd9016b501eca6ee2c00a08e49a3f7e7990d8
|
||||
Revision: 1452
|
||||
Branch: 3.0-rc
|
||||
Last Changed Author: Dhanya_Maliakal
|
||||
Last Changed Rev: 1456
|
||||
Last Changed Date: 2017-08-08 18:21:02.000000002 +0200 ./multiSlsDetector/multiSlsDetector.cpp
|
||||
Last Changed Rev: 1457
|
||||
Last Changed Date: 2017-08-09 11:36:51.000000002 +0200 ./multiSlsDetector/multiSlsDetector.cpp
|
||||
|
@ -3009,16 +3009,24 @@ dacs_t multiSlsDetector::setDAC(dacs_t val, dacIndex idac, int mV, int imod) {
|
||||
for(int idet=posmin; idet<posmax; idet++){
|
||||
if(detectors[idet]){
|
||||
if(iret[idet] != NULL){
|
||||
if (ret==-100)
|
||||
ret=*iret[idet];
|
||||
else if (ret!=*iret[idet])
|
||||
ret=-1;
|
||||
|
||||
// highvoltage of slave, ignore value
|
||||
if ((idac == HV_NEW) && (*iret[idet] == -999))
|
||||
;
|
||||
else {
|
||||
if (ret==-100)
|
||||
ret=*iret[idet];
|
||||
else if (ret!=*iret[idet])
|
||||
ret=-1;
|
||||
}
|
||||
delete iret[idet];
|
||||
}else ret=-1;
|
||||
if(detectors[idet]->getErrorMask())
|
||||
setErrorMask(getErrorMask()|(1<<idet));
|
||||
}
|
||||
}
|
||||
if (ret==-100)
|
||||
ret = -1;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
//#define SVNPATH ""
|
||||
#define SVNURLLIB "git@git.psi.ch:sls_detectors_software/sls_detector_software.git"
|
||||
//#define SVNREPPATH ""
|
||||
#define SVNREPUUIDLIB "ef36cb7a54e1ae34ad1e85a46da6c121902108e6"
|
||||
//#define SVNREV 0x1456
|
||||
#define SVNREPUUIDLIB "2dfbd9016b501eca6ee2c00a08e49a3f7e7990d8"
|
||||
//#define SVNREV 0x1457
|
||||
//#define SVNKIND ""
|
||||
//#define SVNSCHED ""
|
||||
#define SVNAUTHLIB "Dhanya_Maliakal"
|
||||
#define SVNREVLIB 0x1456
|
||||
#define SVNDATELIB 0x20170808
|
||||
#define SVNREVLIB 0x1457
|
||||
#define SVNDATELIB 0x20170809
|
||||
//
|
||||
|
@ -1059,7 +1059,7 @@ int set_dac(int file_des) {
|
||||
if((ind == HV_POT) || (ind == HV_NEW)) {
|
||||
retval[0] = setHighVoltage(val);
|
||||
#ifdef EIGERD
|
||||
if(retval[0] < 0){
|
||||
if ((retval[0] != SLAVE_HIGH_VOLTAGE_READ_VAL) && (retval[0] < 0)) {
|
||||
ret = FAIL;
|
||||
if(retval[0] == -1)
|
||||
sprintf(mess, "Setting high voltage failed.Bad value %d. The range is from 0 to 200 V.\n",val);
|
||||
|
Loading…
x
Reference in New Issue
Block a user