diff --git a/eigermono.c b/eigermono.c index 7d3d99a..504f158 100644 --- a/eigermono.c +++ b/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); + } + } /*--------------------------------------------------------------*/ diff --git a/sicslogquery.c b/sicslogquery.c index 35e258f..698f122 100644 --- a/sicslogquery.c +++ b/sicslogquery.c @@ -132,7 +132,7 @@ int sicslogQuery(int argc, char *argv[], ResultCallback_t func, void *userData) case 'h': snprintf( lastError,sizeof(lastError), - "Options: -s subsystem\n-l last(h,d)\n-f fromtime\n-t totime\n-i instrument\n-c severity\n%s", + "Options: \n-s subsystem\n-l last(h,d)\n-f fromtime\n-t totime\n-i instrument\n-c severity\n%s", "-e search-expression"); return 1; break; @@ -166,7 +166,7 @@ int sicslogQuery(int argc, char *argv[], ResultCallback_t func, void *userData) strncat(jsonQuery,subQuery,sizeof(jsonQuery)); } if(exp != NULL){ - snprintf(subQuery,sizeof(subQuery),", \"message\" : {$regexp : \"/%s/\" }", exp); + snprintf(subQuery,sizeof(subQuery),", \"message\" : {\"$regex\": \"%s\" }", exp); strncat(jsonQuery,subQuery,sizeof(jsonQuery)); } strncat(jsonQuery,"}",sizeof(jsonQuery)); diff --git a/tasscan.c b/tasscan.c index c6d8a89..5a5bc1a 100644 --- a/tasscan.c +++ b/tasscan.c @@ -420,8 +420,8 @@ static int TASHeader(pScanData self) /* put the standard counter things */ - strcat(pBueffel, "F8.0,1X,F8.0,1X,F9.2,1X,F8.0,1X,F8.0,1X,"); - strcat(pHeader, " M1 M2 TIME CNTS M3 "); + strcat(pBueffel, "F8.0,1X,F8.0,1X,F9.2,1X,F8.0,1X,F8.0,1X,F9.0,1X,"); + strcat(pHeader, " M1 M2 TIME CNTS M3 M4 "); /* now the additional variables */ @@ -471,7 +471,7 @@ static int TASScanPoint(pScanData self, int iPoint) int i, status, iPtr; float fVal; pMotor pMot = NULL; - long m1, m2, m3, cnts; + long m1, m2, m3, m4, cnts; char pBueffel[1024], pWork[80], pError[132]; /* @@ -527,9 +527,10 @@ static int TASScanPoint(pScanData self, int iPoint) m1 = GetMonitor(self->pCounterData, 1, self->pCon); m2 = GetMonitor(self->pCounterData, 2, self->pCon); m3 = GetMonitor(self->pCounterData, 3, self->pCon); + m4 = GetMonitor(self->pCounterData, 4, self->pCon); // integrated proton charge on target cnts = GetCounts(self->pCounterData, self->pCon); fVal = GetCountTime(self->pCounterData, self->pCon); - sprintf(pWork, "%8ld %8ld %9.2f %8ld %8ld ", m1, m2, fVal, cnts, m3); + sprintf(pWork, "%8ld %8ld %9.2f %8ld %8ld %9ld", m1, m2, fVal, cnts, m3, m4); strcat(pBueffel, pWork); /* diff --git a/utils/deploysics b/utils/deploysics index d494b63..bcf7eb6 100755 --- a/utils/deploysics +++ b/utils/deploysics @@ -6,7 +6,7 @@ #---------------------------------------------------------- set instlist [list amor boa dmc eiger focus hrpt mars \ - morpheus narziss orion poldi rita2 sans sans2 tasp trics] + morpheus narziss orion poldi rita2 sans sans2 tasp zebra] proc execCommand {command} { diff --git a/utils/testtransfer b/utils/testtransfer index 62ac4e6..81824ac 100755 --- a/utils/testtransfer +++ b/utils/testtransfer @@ -7,7 +7,7 @@ #---------------------------------------------------------- set instlist [list amor boa dmc eiger focus hrpt mars \ - morpheus narziss orion poldi rita2 sans sans2 tasp trics] + morpheus narziss orion poldi rita2 sans sans2 tasp zebra] proc execCommand {command} {