- Introduced a state filed into first generation objects
- Fixed some issues with error returns not being properly handled in devexec - Fixed a bug in motorlist which caused limit checks to fail - Fixed an issue with the TDCHM not properly updating the counter values on finish - Readded getHipadabaPar in ChainCallback as this caused a problem in ei - Made tasdrive ignore sgu, sgl when out of plane not allowed
This commit is contained in:
15
eigermono.c
15
eigermono.c
@ -20,6 +20,10 @@
|
||||
* fixed in the old module.
|
||||
*
|
||||
* Mark Koennecke, February 2013
|
||||
*
|
||||
* Go to maximum or minimum value for mt when limit problem do not abort
|
||||
*
|
||||
* Mark Koennecke, April 2013
|
||||
*/
|
||||
#include <math.h>
|
||||
#include <sics.h>
|
||||
@ -223,6 +227,7 @@ static void startMono(pSICSOBJ self, SConnection *pCon)
|
||||
float d2r, d2l, mtx;
|
||||
peigerMono mono = (peigerMono)self->pPrivate;
|
||||
hdbValue mta, mtb;
|
||||
float lim;
|
||||
|
||||
assert(mono != NULL);
|
||||
|
||||
@ -314,6 +319,16 @@ static void startMono(pSICSOBJ self, SConnection *pCon)
|
||||
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) {
|
||||
|
Reference in New Issue
Block a user