- Many fixes to accomodate a nitty picky TRICS wishlist
- Added a log facility to scan which includes a variable which is logged but not driven during a scan. - Fixed normal beam operation
This commit is contained in:
84
stdscan.c
84
stdscan.c
@ -415,27 +415,12 @@ int prepareDataFile(pScanData self){
|
||||
pVar = (pVarEntry)pDings;
|
||||
if(pVar)
|
||||
{
|
||||
/* start value */
|
||||
fVal = ScanVarStart(pVar);
|
||||
iRet = pVar->pInter->CheckLimits(pVar->pObject,
|
||||
fVal,pBueffel,511);
|
||||
iRet = CheckScanVar(pVar,self->pCon,self->iNP - 1);
|
||||
if(!iRet)
|
||||
{
|
||||
sprintf(pMessage,"ERROR: %s, scan aborted",pBueffel);
|
||||
SCWrite(self->pCon,pBueffel,eError);
|
||||
return 0;
|
||||
}
|
||||
/* end value */
|
||||
fVal = pVar->fStart + (self->iNP - 1) * ScanVarStep(pVar);
|
||||
iRet = pVar->pInter->CheckLimits(pVar->pObject,
|
||||
fVal,pBueffel,511);
|
||||
if(!iRet)
|
||||
{
|
||||
sprintf(pMessage,"ERROR: %s, scan aborted",pBueffel);
|
||||
SCWrite(self->pCon,pBueffel,eError);
|
||||
return 0;
|
||||
}
|
||||
InitScanVar(pVar);
|
||||
InitScanVar(pVar);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -478,27 +463,12 @@ int prepareDataFile(pScanData self){
|
||||
pVar = (pVarEntry)pDings;
|
||||
if(pVar)
|
||||
{
|
||||
/* start value */
|
||||
fVal = ScanVarStart(pVar);
|
||||
iRet = pVar->pInter->CheckLimits(pVar->pObject,
|
||||
fVal,pBueffel,511);
|
||||
iRet = CheckScanVar(pVar,self->pCon,self->iNP);
|
||||
if(!iRet)
|
||||
{
|
||||
sprintf(pMessage,"ERROR: %s, scan aborted",pBueffel);
|
||||
SCWrite(self->pCon,pBueffel,eError);
|
||||
return 0;
|
||||
}
|
||||
/* end value */
|
||||
fVal = pVar->fStart + (self->iNP - 1) * ScanVarStep(pVar);
|
||||
iRet = pVar->pInter->CheckLimits(pVar->pObject,
|
||||
fVal,pBueffel,511);
|
||||
if(!iRet)
|
||||
{
|
||||
sprintf(pMessage,"ERROR: %s, scan aborted",pBueffel);
|
||||
SCWrite(self->pCon,pBueffel,eError);
|
||||
return 0;
|
||||
}
|
||||
InitScanVar(pVar);
|
||||
InitScanVar(pVar);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -522,7 +492,6 @@ int prepareDataFile(pScanData self){
|
||||
pVarEntry pVar = NULL;
|
||||
void *pDings;
|
||||
int i, iRet;
|
||||
float fVal;
|
||||
char pBueffel[512];
|
||||
char pMessage[1024];
|
||||
|
||||
@ -537,9 +506,7 @@ int prepareDataFile(pScanData self){
|
||||
pVar = (pVarEntry)pDings;
|
||||
if(pVar)
|
||||
{
|
||||
/* start value */
|
||||
fVal = ScanVarStart(pVar);
|
||||
InitScanVar(pVar);
|
||||
InitScanVar(pVar);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -647,6 +614,45 @@ int prepareDataFile(pScanData self){
|
||||
{
|
||||
return CollectScanDataIntern(self,iPoint,1);
|
||||
}
|
||||
/*------------------------------------------------------------------------*/
|
||||
static int CollectSilent(pScanData self, int iPoint)
|
||||
{
|
||||
pVarEntry pVar = NULL;
|
||||
void *pDings;
|
||||
int i, iRet, status, jochenFlag = 1;
|
||||
float fVal;
|
||||
CountEntry sCount;
|
||||
|
||||
assert(self);
|
||||
assert(self->pCon);
|
||||
InitCountEntry(&sCount);
|
||||
|
||||
/* loop over all scan variables */
|
||||
status = 1;
|
||||
for(i = 0; i < self->iScanVar; i++)
|
||||
{
|
||||
DynarGet(self->pScanVar,i,&pDings);
|
||||
pVar = (pVarEntry)pDings;
|
||||
if(pVar)
|
||||
{
|
||||
if(jochenFlag == 1 &&
|
||||
strcmp(pVar->pObject->pDescriptor->name, "Motor") == 0)
|
||||
{
|
||||
MotorGetSoftPosition((pMotor)pVar->pObject,self->pCon,&fVal);
|
||||
}
|
||||
else
|
||||
{
|
||||
fVal = pVar->pInter->GetValue(pVar->pObject,self->pCon);
|
||||
}
|
||||
AppendScanVar(pVar,fVal);
|
||||
}
|
||||
}
|
||||
|
||||
/* store counter data */
|
||||
sCount = CollectCounterData(self);
|
||||
|
||||
return 1;
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
static int StartToDrive(pScanData self, int iPoint)
|
||||
{
|
||||
@ -927,6 +933,8 @@ int StandardScanWrapper(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||
return ScanCount(self,iPoint);
|
||||
} else if(strcmp(argv[1],"collect") == 0){
|
||||
return CollectScanData(self,iPoint);
|
||||
} else if(strcmp(argv[1],"silentcollect") == 0){
|
||||
return CollectSilent(self,iPoint);
|
||||
} else if(strcmp(argv[1],"writepoint") == 0){
|
||||
return WriteScanPoints(self,iPoint);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user