- Improvements to the chooper driver for the SANS2 chopper
- Fixes to the new counter and motor drivers - Updated Linux makefiles to linux_def SKIPPED: psi/dornier2.c psi/el734hp.c psi/el737hpdriv.c psi/makefile_linux psi/psi.c psi/hardsup/makefile_linux psi/tecs/makefile_linux
This commit is contained in:
22
fitcenter.c
22
fitcenter.c
@ -102,17 +102,21 @@
|
||||
GetScanVarName(self->pScan,0,self->pName,131);
|
||||
|
||||
/* correct fAxis for softzero points and sign
|
||||
when the scan variable is a motor */
|
||||
pMot = FindMotor(pServ->pSics,self->pName);
|
||||
if(pMot)
|
||||
when the scan variable is a motor
|
||||
*/
|
||||
if(!isScanVarSoft(self->pScan))
|
||||
{
|
||||
i = MotorGetPar(pMot,"softzero",&fZero);
|
||||
i = MotorGetPar(pMot,"sign",&fSign);
|
||||
assert(i);
|
||||
for(i = 0; i < self->iNP; i++)
|
||||
pMot = FindMotor(pServ->pSics,self->pName);
|
||||
if(pMot)
|
||||
{
|
||||
self->fAxis[i] -= fZero;
|
||||
self->fAxis[i] *= fSign;
|
||||
i = MotorGetPar(pMot,"softzero",&fZero);
|
||||
i = MotorGetPar(pMot,"sign",&fSign);
|
||||
assert(i);
|
||||
for(i = 0; i < self->iNP; i++)
|
||||
{
|
||||
self->fAxis[i] -= fZero;
|
||||
self->fAxis[i] *= fSign;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,23 +5,18 @@
|
||||
# Mark Koennecke 1996-2001
|
||||
# Markus Zolliker, March 2003
|
||||
#==========================================================================
|
||||
# the following lines only for fortified version
|
||||
#DFORTIFY=-DFORTIFY
|
||||
#FORTIFYOBJ=strdup.o fortify.o
|
||||
#==========================================================================
|
||||
# assign if the National Instrument GPIB driver is available
|
||||
#NI= -DHAVENI
|
||||
#NIOBJ= nigpib.o
|
||||
#NILIB=-lgpibenet
|
||||
#----------------select proper Makefile
|
||||
MFLAGS= -f makefile_linux
|
||||
|
||||
include linux_def
|
||||
|
||||
CC = gcc
|
||||
CFLAGS = -I$(HDFROOT)/include -DHDF4 -DHDF5 $(NI) -Ipsi/hardsup -I. \
|
||||
-fwritable-strings -DCYGNUS -DNONINTF -g $(DFORTIFY)
|
||||
|
||||
BINTARGET = bin
|
||||
HDFROOT=/afs/psi.ch/project/sinq/linux
|
||||
EXTRA=nintf.o
|
||||
SUBLIBS = psi/libpsi.a psi/hardsup/libhlib.a matrix/libmatrix.a \
|
||||
psi/tecs/libtecsl.a
|
||||
|
@ -5,9 +5,8 @@
|
||||
# Mark Koennecke, November 1996
|
||||
# Markus Zolliker, March 2003
|
||||
#--------------------------------------------------------------------------
|
||||
# the following line only for fortified version
|
||||
DFORTIFY=-DFORTIFY
|
||||
#==========================================================================
|
||||
|
||||
include ../linux_def
|
||||
|
||||
CC = gcc
|
||||
CFLAGS = -g $(DFORTIFY)
|
||||
|
1
motor.c
1
motor.c
@ -213,6 +213,7 @@ static int evaluateStatus(pMotor self, SConnection *pCon)
|
||||
MotorGetSoftPosition(self,pCon,&sCall.fVal);
|
||||
sCall.pName = self->name;
|
||||
InvokeCallBack(self->pCall, MOTEND, &sCall);
|
||||
|
||||
MotorGetHardPosition(self,pCon,&fHard);
|
||||
self->fPosition = fHard;
|
||||
if(absf(fHard - self->fTarget) > ObVal(self->ParArray,PREC))
|
||||
|
6
scan.c
6
scan.c
@ -557,6 +557,7 @@ extern void SNXFormatTime(char *pBuffer, int iLen);
|
||||
self->ScanDrive = ScanDrive;
|
||||
self->ScanCount = ScanCount;
|
||||
self->CollectScanData = CollectScanData;
|
||||
self->posSoft = 0;
|
||||
strcpy(self->ext,".dat");
|
||||
|
||||
return 1;
|
||||
@ -1715,6 +1716,10 @@ int StoreScanCounts(pScanData self, char *data)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
/*---------------------------------------------------------------------*/
|
||||
int isScanVarSoft(pScanData self){
|
||||
return self->posSoft;
|
||||
}
|
||||
/*-------------------------------------------------------------------------*/
|
||||
int GetScanVarStep(pScanData self, int iWhich, float *fStep)
|
||||
{
|
||||
@ -2330,6 +2335,7 @@ int StoreScanCounts(pScanData self, char *data)
|
||||
{
|
||||
ResetScanFunctions(self);
|
||||
self->CollectScanData = CollectScanDataJochen;
|
||||
self->posSoft = 1;
|
||||
SCSendOK(pCon);
|
||||
return 1;
|
||||
}
|
||||
|
5
scan.h
5
scan.h
@ -37,6 +37,7 @@
|
||||
char *pName, int iLength);
|
||||
int GetScanVarStep(pScanData self, int iWhich,
|
||||
float *fStep);
|
||||
int isScanVarSoft(pScanData self);
|
||||
int GetScanMonitor(pScanData self, int iWhich,
|
||||
long *lData, int iDataLen);
|
||||
int GetScanNP(pScanData self);
|
||||
@ -78,7 +79,3 @@
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
3
scan.i
3
scan.i
@ -51,6 +51,7 @@
|
||||
(pScanData self,
|
||||
int iP);
|
||||
long lPos;
|
||||
int posSoft;
|
||||
void *pCounterData;
|
||||
char pCounterName[512];
|
||||
int iChannel;
|
||||
@ -62,5 +63,3 @@
|
||||
void *pSpecial;
|
||||
} ScanData;
|
||||
|
||||
|
||||
|
||||
|
4
scan.tex
4
scan.tex
@ -79,6 +79,7 @@ $\langle$scandata {\footnotesize ?}$\rangle\equiv$
|
||||
\mbox{}\verb@ (pScanData self,@\\
|
||||
\mbox{}\verb@ int iP);@\\
|
||||
\mbox{}\verb@ long lPos;@\\
|
||||
\mbox{}\verb@ int posSoft;@\\
|
||||
\mbox{}\verb@ void *pCounterData;@\\
|
||||
\mbox{}\verb@ char pCounterName[512];@\\
|
||||
\mbox{}\verb@ int iChannel;@\\
|
||||
@ -158,6 +159,8 @@ This function together with ScanDrive and the data writing functions allow for
|
||||
\item[CollectScanData] reads all the scan data into the scan's data
|
||||
structures after any scan point. Overload this if a different storage
|
||||
scheme is required especiallay for polarising scans.
|
||||
\item[posSoft] is a flag which is true if scan variable are stored with
|
||||
soft position, i.e. with zeropoints applied.
|
||||
\item[pCounterData] is a pointer to a counter structure. This defines the
|
||||
counter to use and is initialized at creation of the scan data structure.
|
||||
\item[pCountername] is the name of the counter used.
|
||||
@ -210,6 +213,7 @@ $\langle$scaninter {\footnotesize ?}$\rangle\equiv$
|
||||
\mbox{}\verb@ char *pName, int iLength);@\\
|
||||
\mbox{}\verb@ int GetScanVarStep(pScanData self, int iWhich, @\\
|
||||
\mbox{}\verb@ float *fStep);@\\
|
||||
\mbox{}\verb@ int isScanVarSoft(pScanData self);@\\
|
||||
\mbox{}\verb@ int GetScanMonitor(pScanData self, int iWhich, @\\
|
||||
\mbox{}\verb@ long *lData, int iDataLen);@\\
|
||||
\mbox{}\verb@ int GetScanNP(pScanData self);@\\
|
||||
|
4
scan.w
4
scan.w
@ -74,6 +74,7 @@ steps in scan processing which is already partly implemented.
|
||||
(pScanData self,
|
||||
int iP);
|
||||
long lPos;
|
||||
int posSoft;
|
||||
void *pCounterData;
|
||||
char pCounterName[512];
|
||||
int iChannel;
|
||||
@ -146,6 +147,8 @@ This function together with ScanDrive and the data writing functions allow for
|
||||
\item[CollectScanData] reads all the scan data into the scan's data
|
||||
structures after any scan point. Overload this if a different storage
|
||||
scheme is required especiallay for polarising scans.
|
||||
\item[posSoft] is a flag which is true if scan variable are stored with
|
||||
soft position, i.e. with zeropoints applied.
|
||||
\item[pCounterData] is a pointer to a counter structure. This defines the
|
||||
counter to use and is initialized at creation of the scan data structure.
|
||||
\item[pCountername] is the name of the counter used.
|
||||
@ -193,6 +196,7 @@ functions:
|
||||
char *pName, int iLength);
|
||||
int GetScanVarStep(pScanData self, int iWhich,
|
||||
float *fStep);
|
||||
int isScanVarSoft(pScanData self);
|
||||
int GetScanMonitor(pScanData self, int iWhich,
|
||||
long *lData, int iDataLen);
|
||||
int GetScanNP(pScanData self);
|
||||
|
4
test.tcl
4
test.tcl
@ -18,12 +18,12 @@ set shome /data/koenneck/src
|
||||
|
||||
#ServerOption RedirectFile $shome/sics/stdout
|
||||
|
||||
ServerOption ReadTimeOut 100
|
||||
ServerOption ReadTimeOut 10
|
||||
# timeout when checking for commands. In the main loop SICS checks for
|
||||
# pending commands on each connection with the above timeout, has
|
||||
# PERFORMANCE impact!
|
||||
|
||||
ServerOption AcceptTimeOut 100
|
||||
ServerOption AcceptTimeOut 10
|
||||
# timeout when checking for connection req.
|
||||
# Similar to above, but for connections
|
||||
|
||||
|
@ -48,7 +48,7 @@ static int UserCount(pScanData self, int iPoint)
|
||||
}
|
||||
|
||||
/* invoke command */
|
||||
sprintf(pBueffel,"%s %d",self->pCommand, iPoint);
|
||||
snprintf(pBueffel,511,"%s %d",self->pCommand, iPoint);
|
||||
status = Tcl_GlobalEval(self->pSics->pTcl,pBueffel);
|
||||
if(status != TCL_OK)
|
||||
{
|
||||
|
Reference in New Issue
Block a user