PSI sics-cvs-psi-complete-tree-post-site-support
This commit is contained in:
52
selector.c
52
selector.c
@@ -474,7 +474,8 @@ end:
|
||||
sprintf(pBueffel,"%s.%s = %f",argv[0],pName,pPar->fVal);
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
iRet = 1;
|
||||
goto end;
|
||||
DeleteTokenList(pList);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
end:
|
||||
@@ -555,7 +556,8 @@ end:
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
pDrivInt = self->pTwoTheta->pDescriptor->GetInterface(self->pTwoTheta,DRIVEID);
|
||||
pDrivInt = self->pTwoTheta->pDescriptor->GetInterface(self->pTwoTheta,
|
||||
DRIVEID);
|
||||
if(!pDrivInt->CheckLimits(self->pTwoTheta,sNeu.fTwoTheta,
|
||||
error,iErrLen))
|
||||
{
|
||||
@@ -594,7 +596,8 @@ end:
|
||||
pDrivInt->Halt(self->pTheta);
|
||||
}
|
||||
|
||||
pDrivInt = self->pTwoTheta->pDescriptor->GetInterface(self->pTwoTheta,DRIVEID);
|
||||
pDrivInt = self->pTwoTheta->pDescriptor->GetInterface(self->pTwoTheta,
|
||||
DRIVEID);
|
||||
if(pDrivInt)
|
||||
{
|
||||
pDrivInt->Halt(self->pTwoTheta);
|
||||
@@ -602,7 +605,8 @@ end:
|
||||
|
||||
if(self->pBend1)
|
||||
{
|
||||
pDrivInt = self->pBend1->pDescriptor->GetInterface(self->pBend1,DRIVEID);
|
||||
pDrivInt = self->pBend1->pDescriptor->GetInterface(self->pBend1,
|
||||
DRIVEID);
|
||||
if(pDrivInt)
|
||||
{
|
||||
pDrivInt->Halt(self->pBend1);
|
||||
@@ -610,7 +614,8 @@ end:
|
||||
}
|
||||
if(self->pBend2)
|
||||
{
|
||||
pDrivInt = self->pBend2->pDescriptor->GetInterface(self->pBend2,DRIVEID);
|
||||
pDrivInt = self->pBend2->pDescriptor->GetInterface(self->pBend2,
|
||||
DRIVEID);
|
||||
if(pDrivInt)
|
||||
{
|
||||
pDrivInt->Halt(self->pBend2);
|
||||
@@ -646,14 +651,16 @@ end:
|
||||
}
|
||||
|
||||
/* start each motor in turn */
|
||||
iRet = StartDevice(GetExecutor(),self->pTheta->name, self->pTheta->pDescriptor,
|
||||
iRet = StartDevice(GetExecutor(),self->pTheta->name,
|
||||
self->pTheta->pDescriptor,
|
||||
self->pTheta,
|
||||
pCon,sNeu.fTheta);
|
||||
if(!iRet)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
iRet = StartDevice(GetExecutor(),self->pTwoTheta->name, self->pTwoTheta->pDescriptor,
|
||||
iRet = StartDevice(GetExecutor(),self->pTwoTheta->name,
|
||||
self->pTwoTheta->pDescriptor,
|
||||
self->pTwoTheta,
|
||||
pCon,sNeu.fTwoTheta);
|
||||
if(!iRet)
|
||||
@@ -665,7 +672,8 @@ end:
|
||||
/* bending motors */
|
||||
if(self->pBend1)
|
||||
{
|
||||
iRet = StartDevice(GetExecutor(),self->pBend1->name, self->pBend1->pDescriptor,
|
||||
iRet = StartDevice(GetExecutor(),self->pBend1->name,
|
||||
self->pBend1->pDescriptor,
|
||||
self->pBend1,
|
||||
pCon,sNeu.fVert);
|
||||
if(!iRet)
|
||||
@@ -676,7 +684,8 @@ end:
|
||||
}
|
||||
if(self->pBend2)
|
||||
{
|
||||
iRet = StartDevice(GetExecutor(),self->pBend2->name, self->pBend2->pDescriptor,
|
||||
iRet = StartDevice(GetExecutor(),self->pBend2->name,
|
||||
self->pBend2->pDescriptor,
|
||||
self->pBend2,
|
||||
pCon,sNeu.fHor);
|
||||
if(!iRet)
|
||||
@@ -684,7 +693,7 @@ end:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return OKOK;
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
int MonoCheck(pSicsSelector self, SConnection *pCon)
|
||||
@@ -703,7 +712,8 @@ end:
|
||||
}
|
||||
}
|
||||
|
||||
pDrivInt = self->pTwoTheta->pDescriptor->GetInterface(self->pTwoTheta,DRIVEID);
|
||||
pDrivInt = self->pTwoTheta->pDescriptor->GetInterface(self->pTwoTheta,
|
||||
DRIVEID);
|
||||
if(pDrivInt)
|
||||
{
|
||||
iRet = pDrivInt->CheckStatus(self->pTwoTheta,pCon);
|
||||
@@ -715,7 +725,8 @@ end:
|
||||
|
||||
if(self->pBend1)
|
||||
{
|
||||
pDrivInt = self->pBend1->pDescriptor->GetInterface(self->pBend1,DRIVEID);
|
||||
pDrivInt = self->pBend1->pDescriptor->GetInterface(self->pBend1,
|
||||
DRIVEID);
|
||||
if(pDrivInt)
|
||||
{
|
||||
iRet = pDrivInt->CheckStatus(self->pBend1,pCon);
|
||||
@@ -728,7 +739,8 @@ end:
|
||||
|
||||
if(self->pBend2)
|
||||
{
|
||||
pDrivInt = self->pBend2->pDescriptor->GetInterface(self->pBend2,DRIVEID);
|
||||
pDrivInt = self->pBend2->pDescriptor->GetInterface(self->pBend2,
|
||||
DRIVEID);
|
||||
if(pDrivInt)
|
||||
{
|
||||
iRet = pDrivInt->CheckStatus(self->pBend2,pCon);
|
||||
@@ -764,7 +776,8 @@ end:
|
||||
iRet = MotorGetSoftPosition(self->pTwoTheta,pCon,&fTwoTheta);
|
||||
if(!iRet)
|
||||
{
|
||||
sprintf(pBueffel,"ERROR: cannot read TwoTheta motor for monochromator %s\n",
|
||||
sprintf(pBueffel,
|
||||
"ERROR: cannot read TwoTheta motor for monochromator %s\n",
|
||||
self->name);
|
||||
SCWrite(pCon,pBueffel,eError);
|
||||
return 0.;
|
||||
@@ -784,7 +797,7 @@ end:
|
||||
dTheta =(double)fTheta;
|
||||
dTheta = dTheta *(1.0/RD);
|
||||
fVal = 2.0 * (double)ObVal(self->pParams,LATD);
|
||||
fVal = fVal * sin(dTheta);
|
||||
fVal = fVal * sin(dTheta) * ObVal(self->pParams,SS);
|
||||
return fVal;
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
@@ -805,7 +818,8 @@ end:
|
||||
iRet = MotorGetSoftPosition(self->pTwoTheta,pCon,f2TH);
|
||||
if(!iRet)
|
||||
{
|
||||
sprintf(pBueffel,"ERROR: cannot read TwoTheta motor for monochromator %s\n",
|
||||
sprintf(pBueffel,
|
||||
"ERROR: cannot read TwoTheta motor for monochromator %s\n",
|
||||
self->name);
|
||||
SCWrite(pCon,pBueffel,eError);
|
||||
return 0.;
|
||||
@@ -816,7 +830,8 @@ end:
|
||||
iRet = MotorGetSoftPosition(self->pBend1,pCon,fB1);
|
||||
if(!iRet)
|
||||
{
|
||||
sprintf(pBueffel,"ERROR: cannot read vertical bender motor for monochromator %s\n",
|
||||
sprintf(pBueffel,
|
||||
"ERROR: cannot read vertical bender motor for monochromator %s\n",
|
||||
self->name);
|
||||
SCWrite(pCon,pBueffel,eError);
|
||||
return 0.;
|
||||
@@ -827,7 +842,8 @@ end:
|
||||
iRet = MotorGetSoftPosition(self->pBend2,pCon,fB2);
|
||||
if(!iRet)
|
||||
{
|
||||
sprintf(pBueffel,"ERROR: cannot read horizontal bender motor for monochromator %s\n",
|
||||
sprintf(pBueffel,
|
||||
"ERROR: cannot read horizontal bender motor for monochromator %s\n",
|
||||
self->name);
|
||||
SCWrite(pCon,pBueffel,eError);
|
||||
return 0.;
|
||||
|
||||
Reference in New Issue
Block a user