- Fixed sign problems with om in tasub

- Mended tasdrive to drive energy even if Q is askew
- Fixed QM values
- Fixed problems in mesure: om2th, wrong theta selection
- Fixed core dump when driving h,kl, failed
This commit is contained in:
koennecke
2005-06-09 12:04:38 +00:00
parent f33ca7b0d7
commit 3a0b4f293c
16 changed files with 1899 additions and 116 deletions

33
hkl.c
View File

@ -887,6 +887,30 @@ static int calculateNormalBeamOmega(MATRIX z1, pHKL self,
return 0;
}
/*------------------------------------------------------------------------*/
static void stopHKLMotors(pHKL self)
{
if(self->pTheta != NULL)
{
self->pTheta->pDrivInt->Halt(self->pTheta);
}
if(self->pOmega != NULL)
{
self->pOmega->pDrivInt->Halt(self->pOmega);
}
if(self->pChi != NULL)
{
self->pChi->pDrivInt->Halt(self->pChi);
}
if(self->pPhi != NULL)
{
self->pPhi->pDrivInt->Halt(self->pPhi);
}
if(self->pNu != NULL)
{
self->pNu->pDrivInt->Halt(self->pNu);
}
}
/*-------------------------------------------------------------------------*/
int RunHKL(pHKL self, float fHKL[3],
float fPsi, int iHamil, SConnection *pCon)
@ -911,7 +935,7 @@ static int calculateNormalBeamOmega(MATRIX z1, pHKL self,
if(!iRet)
{
SCWrite(pCon,"ERROR: cannot start two theta motor",eError);
StopExe(pServ->pExecutor,"all");
stopHKLMotors(self);
return 0;
}
@ -921,7 +945,7 @@ static int calculateNormalBeamOmega(MATRIX z1, pHKL self,
if(!iRet)
{
SCWrite(pCon,"ERROR: cannot start omega motor",eError);
StopExe(pServ->pExecutor,"all");
stopHKLMotors(self);
return 0;
}
@ -933,7 +957,6 @@ static int calculateNormalBeamOmega(MATRIX z1, pHKL self,
pDum->pDescriptor, pDum, pCon,fSet[2]);
if(!iRet)
{
StopExe(pServ->pExecutor,"all");
SCWrite(pCon,"ERROR: cannot start nu motor",eError);
return 0;
}
@ -953,7 +976,7 @@ static int calculateNormalBeamOmega(MATRIX z1, pHKL self,
if(!iRet)
{
SCWrite(pCon,"ERROR: cannot start chi motor",eError);
StopExe(pServ->pExecutor,"all");
stopHKLMotors(self);
return 0;
}
pDum = (pDummy)self->pPhi;
@ -962,7 +985,7 @@ static int calculateNormalBeamOmega(MATRIX z1, pHKL self,
if(!iRet)
{
SCWrite(pCon,"ERROR: cannot start phi",eError);
StopExe(pServ->pExecutor,"all");
stopHKLMotors(self);
return 0;
}
for(i = 0; i < 3; i++)