- Fixed bug with ECB not stopping when no beam
- Fixed synchronisation issues - Fixed hsitogram memory writing from nxscript - Started module for writing SICS interfaces in Tcl - Fixed a bug in scan, which allowed to corrupt files - Fixed memory problems in napi5
This commit is contained in:
49
scan.c
49
scan.c
@ -573,7 +573,8 @@ extern void SNXFormatTime(char *pBuffer, int iLen);
|
||||
|
||||
if(self->iActive)
|
||||
{
|
||||
SCWrite(pCon,"ERROR: cannot change parameters while scan is running",eError);
|
||||
SCWrite(pCon,"ERROR: cannot change parameters while scan is running",
|
||||
eError);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1000,8 +1001,8 @@ int StoreScanCounts(pScanData self, char *data)
|
||||
}
|
||||
return status;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int CollectScanData(pScanData self, int iPoint)
|
||||
/*------------------------------------------------------------------------*/
|
||||
static int CollectScanDataIntern(pScanData self, int iPoint, int jochenFlag)
|
||||
{
|
||||
pVarEntry pVar = NULL;
|
||||
void *pDings;
|
||||
@ -1028,7 +1029,15 @@ int StoreScanCounts(pScanData self, char *data)
|
||||
pVar = (pVarEntry)pDings;
|
||||
if(pVar)
|
||||
{
|
||||
fVal = pVar->pInter->GetValue(pVar->pObject,self->pCon);
|
||||
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);
|
||||
}
|
||||
pVar->fData[iPoint] = fVal;
|
||||
sprintf(pItem,"%-10.10s",pVar->Name);
|
||||
strcat(pHead,pItem);
|
||||
@ -1136,6 +1145,16 @@ int StoreScanCounts(pScanData self, char *data)
|
||||
self->iCounts++;
|
||||
return 1;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int CollectScanData(pScanData self, int iPoint)
|
||||
{
|
||||
return CollectScanDataIntern(self,iPoint,0);
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
static int CollectScanDataJochen(pScanData self, int iPoint)
|
||||
{
|
||||
return CollectScanDataIntern(self,iPoint,1);
|
||||
}
|
||||
/*------------------------------------------------------------------------*/
|
||||
static int ScanDrive(pScanData self, int iPoint)
|
||||
{
|
||||
@ -1309,6 +1328,14 @@ int StoreScanCounts(pScanData self, char *data)
|
||||
self->pSics = NULL;
|
||||
return 0;
|
||||
}
|
||||
if(self->iActive != 0)
|
||||
{
|
||||
SCWrite(pCon,"ERROR: another scan is still running",eError);
|
||||
self->pCon = NULL;
|
||||
self->pSics = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
self->iNP = iNP;
|
||||
self->iMode = iMode;
|
||||
self->fPreset = fPreset;
|
||||
@ -1396,6 +1423,13 @@ int StoreScanCounts(pScanData self, char *data)
|
||||
SCWrite(self->pCon,"ERROR: Invalid counter mode given",eError);
|
||||
return 0;
|
||||
}
|
||||
if(self->iActive != 0)
|
||||
{
|
||||
SCWrite(pCon,"ERROR: another scan is still running",eError);
|
||||
self->pCon = NULL;
|
||||
self->pSics = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
HeaderFunc = self->WriteHeader;
|
||||
self->WriteHeader = DummyWrite;
|
||||
@ -2281,6 +2315,13 @@ int StoreScanCounts(pScanData self, char *data)
|
||||
SCSendOK(pCon);
|
||||
return 1;
|
||||
}
|
||||
else if(strcmp(argv[2],"soft") == 0)
|
||||
{
|
||||
ResetScanFunctions(self);
|
||||
self->CollectScanData = CollectScanDataJochen;
|
||||
SCSendOK(pCon);
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(pBueffel,"ERROR: option %s not recognized by configure",
|
||||
|
Reference in New Issue
Block a user