- A few fixes to the hsitogram memory codes

- Many fixes for the triple axis code
This commit is contained in:
cvs
2003-04-10 11:41:22 +00:00
parent bfb09e4593
commit cb4bbbc93c
35 changed files with 482 additions and 171 deletions

View File

@@ -252,37 +252,22 @@ static int TASHeader(pScanData self)
}
/*
write motors
write motors and currents
*/
fprintf(self->fd,"VARIA: ");
iCount = 0;
for(i = 0; i < MAXMOT-8;i++)
{
pMot = FindMotor(self->pSics, tasMotorOrder[i]);
if(pMot)
{
status = MotorGetSoftPosition(pMot,self->pCon,&fVal);
if(!status)
{
fVal = -9999.77;
}
if(iCount == 3)
{
iCount = 0;
fprintf(self->fd,"\nVARIA: ");
}
strcpy(pWork2,tasMotorOrder[i]);
strtoupper(pWork2);
fprintf(self->fd,"%-8s=%8.4f, ",pWork2,fVal);
iCount++;
}
else
{
sprintf(pBueffel,"WARNING: motor %s NOT found, %s",
tasMotorOrder[i],
" possible data file corruption");
SCWrite(self->pCon,pBueffel,eWarning);
}
fVal = readDrivable(tasMotorOrder[i],self->pCon);
if(iCount == 3)
{
iCount = 0;
fprintf(self->fd,"\nVARIA: ");
}
strcpy(pWork2,tasMotorOrder[i]);
strtoupper(pWork2);
fprintf(self->fd,"%-8s=%8.4f, ",pWork2,fVal);
iCount++;
}
fprintf(self->fd,"\n");
@@ -291,7 +276,7 @@ static int TASHeader(pScanData self)
*/
fprintf(self->fd,"ZEROS: ");
iCount = 0;
for(i = 0; i < MAXMOT-8;i++)
for(i = 0; i < CURMOT -1;i++)
{
pMot = FindMotor(self->pSics, tasMotorOrder[i]);
if(pMot)
@@ -580,7 +565,13 @@ static int TASScanDrive(pScanData self, int iPoint)
tasTargets[i] = .0;
tasTargets[i+10] = .0;
}
tasMask[10] = 0;
tasMask[11] = 0;
/*
store SRO motor value
*/
getSRO(self->pCon,&pTAS->oldSRO);
/*
loop through all the scan variables
@@ -609,7 +600,7 @@ static int TASScanDrive(pScanData self, int iPoint)
StartMotor(pServ->pExecutor,self->pSics, self->pCon, pVar->Name,
pVar->fStart + iPoint * pVar->fStep);
/*
Ignore errors. TAS scans continue when a motor runs into
Ignore errors. TAS scans continues when a motor runs into
a limit.
*/
}