- New batch file management module
- New oscillator module - Bug fixes SKIPPED: psi/buffer.c psi/el734hp.c psi/el737hpdriv.c psi/make_gen psi/nextrics.c psi/nxamor.c psi/pimotor.c psi/polterwrite.c psi/psi.c psi/swmotor2.c psi/tasscan.c psi/tricssupport.c psi/tricssupport.h psi/tecs/make_gen psi/utils/ecb_load_new/ecb_load.c psi/utils/ecb_load_new/ecb_load.h psi/utils/ecb_load_new/ecbdriv_els.c psi/utils/ecb_load_new/gpib_els.c psi/utils/ecb_load_new/makefile psi/utils/ecb_load_new/makefile_EGPIB psi/utils/ecb_load_new/makefile_GPIB
This commit is contained in:
21
motor.c
21
motor.c
@ -271,6 +271,8 @@ static int reportAndFixError(pMotor self, SConnection *pCon)
|
||||
newStatus = statusRunTo(self,pCon);
|
||||
break;
|
||||
case MOTOK:
|
||||
snprintf(pBueffel,255,"WARNING: %s on %s",pError,self->name);
|
||||
SCWrite(pCon,pBueffel,eWarning);
|
||||
newStatus = HWIdle;
|
||||
break;
|
||||
default:
|
||||
@ -954,6 +956,21 @@ extern void KillPiPiezo(void *pData);
|
||||
*fHard = fVal*ObVal(self->ParArray,SIGN);
|
||||
return 0;
|
||||
}
|
||||
/*------------------------------------------------------------------------*/
|
||||
float MotorHardToSoftPosition(pMotor self, float fValue)
|
||||
{
|
||||
/* apply zeropoint */
|
||||
if(ObVal(self->ParArray,SIGN) < 0.)
|
||||
{
|
||||
fValue += ObVal(self->ParArray,SZERO);
|
||||
}
|
||||
else
|
||||
{
|
||||
fValue -= ObVal(self->ParArray,SZERO);
|
||||
}
|
||||
/* apply sign */
|
||||
return fValue*ObVal(self->ParArray,SIGN);
|
||||
}
|
||||
/* ------------------------------------------------------------------------*/
|
||||
int MotorGetSoftPosition(pMotor self, SConnection *pCon, float *fVal)
|
||||
{
|
||||
@ -970,7 +987,6 @@ extern void KillPiPiezo(void *pData);
|
||||
*fVal = fValue;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* apply zeropoint */
|
||||
if(ObVal(self->ParArray,SIGN) < 0.)
|
||||
{
|
||||
@ -983,7 +999,10 @@ extern void KillPiPiezo(void *pData);
|
||||
*fVal = fValue;
|
||||
|
||||
/* apply sign */
|
||||
/* *fVal = MotorHardToSoftPosition(self,fValue); */
|
||||
|
||||
*fVal = fValue*ObVal(self->ParArray,SIGN);
|
||||
|
||||
return 1;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
Reference in New Issue
Block a user