Fixed a bug with the eiger monochromator not driving mt when mcv did not drive
Fixed expression searching in sicslogquery Added proton monitot to tasscan output Chnaged SICS scripts to reflect the switch from TRICS to ZEBRA
This commit is contained in:
53
eigermono.c
53
eigermono.c
@ -316,33 +316,36 @@ static void startMono(pSICSOBJ self, SConnection *pCon)
|
||||
|
||||
/*
|
||||
the translation
|
||||
|
||||
There used to be a test here to run the tranlsation only when mcv succeded. This test caused
|
||||
issues when mcv already was at the correct position in that the translation was not driven.
|
||||
Thus the test was removed on request of the IC. The current state of the code can have the consequence
|
||||
that mt is driven even when mcv fails. This then can throw the focus point completely off, resulting
|
||||
in a loss of intensity, resolution and even move peaks.
|
||||
|
||||
*/
|
||||
if(status > 0){
|
||||
/*
|
||||
only run mt when mcv started
|
||||
*/
|
||||
SICSHdbGetPar(self,pCon,"MTA",&mta);
|
||||
SICSHdbGetPar(self,pCon,"MTB",&mtb);
|
||||
mtx = mta.v.doubleValue + mtb.v.doubleValue*pow(curve,.75);
|
||||
MotorGetPar((pMotor)mono->motData[MTX],"softupperlim",&lim);
|
||||
if(mtx > lim){
|
||||
SCPrintf(pCon,eLog,"WARNING: correcting mt target %f to %f within upper limit", mtx, lim-.1);
|
||||
mtx = lim - .1;
|
||||
}
|
||||
MotorGetPar((pMotor)mono->motData[MTX],"softlowerlim",&lim);
|
||||
if(mtx < lim){
|
||||
SCPrintf(pCon,eLog,"WARNING: correcting mt target %f to %f within lower limit", mtx, lim +.1);
|
||||
mtx = lim + .1;
|
||||
}
|
||||
status = startTASMotor((pMotor)mono->motData[MTX], pCon, "mt",
|
||||
mtx, silent,stopFixed);
|
||||
if (status < 0 && status != NOTSTARTED) {
|
||||
SCWrite(pCon,"WARNING: monochromator translation motor failed to start", eLog);
|
||||
SCSetInterrupt(pCon,eContinue);
|
||||
} else {
|
||||
AddTaskToGroup(pServ->pTasker,status, mono->waitID);
|
||||
}
|
||||
SICSHdbGetPar(self,pCon,"MTA",&mta);
|
||||
SICSHdbGetPar(self,pCon,"MTB",&mtb);
|
||||
mtx = mta.v.doubleValue + mtb.v.doubleValue*pow(curve,.75);
|
||||
MotorGetPar((pMotor)mono->motData[MTX],"softupperlim",&lim);
|
||||
if(mtx > lim){
|
||||
SCPrintf(pCon,eLog,"WARNING: correcting mt target %f to %f within upper limit", mtx, lim-.1);
|
||||
mtx = lim - .1;
|
||||
}
|
||||
MotorGetPar((pMotor)mono->motData[MTX],"softlowerlim",&lim);
|
||||
if(mtx < lim){
|
||||
SCPrintf(pCon,eLog,"WARNING: correcting mt target %f to %f within lower limit", mtx, lim +.1);
|
||||
mtx = lim + .1;
|
||||
}
|
||||
status = startTASMotor((pMotor)mono->motData[MTX], pCon, "mt",
|
||||
mtx, silent,stopFixed);
|
||||
if (status < 0 && status != NOTSTARTED) {
|
||||
SCWrite(pCon,"WARNING: monochromator translation motor failed to start", eLog);
|
||||
SCSetInterrupt(pCon,eContinue);
|
||||
} else {
|
||||
AddTaskToGroup(pServ->pTasker,status, mono->waitID);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/*--------------------------------------------------------------*/
|
||||
|
Reference in New Issue
Block a user