- Implemented defpos for multiple motors
- Implemented automatic backup on parameter change - Implemented silent restore - Cleaned a couple of unused flags from connection object
This commit is contained in:
48
Makefile
48
Makefile
@ -16,12 +16,12 @@ FORTIFYOBJ = fortify.o strdup.o
|
||||
|
||||
#==========================================================================
|
||||
# assign if the National Instrument GPIB driver is available
|
||||
NI= -DHAVENI
|
||||
NIOBJ= nigpib.o
|
||||
NILIB=-lgpibenet
|
||||
#NI=
|
||||
#NIOBJ=
|
||||
#NILIB=
|
||||
#NI= -DHAVENI
|
||||
#NIOBJ= nigpib.o
|
||||
#NILIB=-lgpibenet
|
||||
NI=
|
||||
NIOBJ=
|
||||
NILIB=
|
||||
|
||||
#----- comment or uncomment if a difrac version is required
|
||||
# Do not forget to remove or add comments to ofac.c as well if changes
|
||||
@ -72,18 +72,18 @@ VELOOBJ = velo.o velosim.o velodorn.o velodornier.o
|
||||
#----- comment or uncomment the following according to operating system
|
||||
|
||||
#------------- for Digital Unix
|
||||
#BINTARGET = bin
|
||||
#HDFROOT=/data/lnslib
|
||||
#CC=cc
|
||||
#EXTRA=
|
||||
BINTARGET = bin
|
||||
HDFROOT=/data/lnslib
|
||||
CC=cc
|
||||
EXTRA=
|
||||
#CFLAGS = -I$(HDFROOT)/include -Ihardsup -DHDF4 -DHDF5 -I. -std1 \
|
||||
# -g -warnprotos -c
|
||||
#CFLAGS = -I$(HDFROOT)/include -DFORTIFY -DHDF4 -DHDF5 -Ihardsup -g \
|
||||
# -std1 -warnprotos -c
|
||||
#LIBS = -L$(HDFROOT)/lib -Lhardsup -lhlib -Lmatrix -lmatrix -Ltecs \
|
||||
# -ltecsl -ltcl8.0 -lfor $(HDFROOT)/lib/libhdf5.a \
|
||||
# $(HDFROOT)/lib/libmfhdf.a $(HDFROOT)/lib/libdf.a \
|
||||
# $(HDFROOT)/lib/libjpeg.a -lz -lm -ll -lc
|
||||
CFLAGS = -I$(HDFROOT)/include -DFORTIFY -DHDF4 -DHDF5 -Ihardsup -g \
|
||||
-std1 -warnprotos -c
|
||||
LIBS = -L$(HDFROOT)/lib -Lhardsup -lhlib -Lmatrix -lmatrix -Ltecs \
|
||||
-ltecsl -ltcl8.0 -lfor $(HDFROOT)/lib/libhdf5.a \
|
||||
$(HDFROOT)/lib/libmfhdf.a $(HDFROOT)/lib/libdf.a \
|
||||
$(HDFROOT)/lib/libjpeg.a -lz -lm -ll -lc
|
||||
|
||||
#------- for cygnus
|
||||
#HDFROOT=../HDF411
|
||||
@ -94,16 +94,16 @@ VELOOBJ = velo.o velosim.o velodorn.o velodornier.o
|
||||
# -lmfhdf -ldf -ljpeg -lz -lm
|
||||
|
||||
#---------- for linux
|
||||
BINTARGET=../../bin
|
||||
HDFROOT=$(SINQDIR)/linux
|
||||
CC=gcc
|
||||
#BINTARGET=../../bin
|
||||
#HDFROOT=$(SINQDIR)/linux
|
||||
#CC=gcc
|
||||
#CFLAGS = -I$(HDFROOT)/include -DHDF4 -DHDF5 $(NI) -Ihardsup \
|
||||
# -fwritable-strings -DCYGNUS -DNONINTF -g -c
|
||||
CFLAGS = -I$(HDFROOT)/include -DFORTIFY -DHDF4 -DHDF5 $(NI) -Ihardsup \
|
||||
-fwritable-strings -DCYGNUS -DNONINTF -g -c
|
||||
LIBS= -L$(HDFROOT)/lib -Lhardsup -Ltecs -ltecsl -Lmatrix -lmatrix -lhlib \
|
||||
$(NILIB) -ltcl -lhdf5 -lmfhdf -ldf -ljpeg -lz -lm -lg2c -ldl
|
||||
EXTRA=nintf.o
|
||||
#CFLAGS = -I$(HDFROOT)/include -DFORTIFY -DHDF4 -DHDF5 $(NI) -Ihardsup \
|
||||
# -fwritable-strings -DCYGNUS -DNONINTF -g -c
|
||||
#LIBS= -L$(HDFROOT)/lib -Lhardsup -Ltecs -ltecsl -Lmatrix -lmatrix -lhlib \
|
||||
# $(NILIB) -ltcl -lhdf5 -lmfhdf -ldf -ljpeg -lz -lm -lg2c -ldl
|
||||
#EXTRA=nintf.o
|
||||
#---------------------------------
|
||||
|
||||
.c.o:
|
||||
|
@ -221,17 +221,10 @@ extern char *SkipSpace(char *pPtr);
|
||||
SICSLogWrite(pBueffel,eCommand);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!pCon->iDummy)
|
||||
{
|
||||
printf("Executing -> %s <- from dummy socket\n", pText);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(pBueffel,"Executing -> %s <- from sicscron",pText);
|
||||
SICSLogWrite(pBueffel,eCommand);
|
||||
}
|
||||
}
|
||||
|
||||
/* convert to argc, argv */
|
||||
argc = 0;
|
||||
|
154
conman.c
154
conman.c
@ -130,7 +130,6 @@ extern pServer pServ;
|
||||
pRes->pSics = pSics;
|
||||
pRes->eInterrupt = eContinue;
|
||||
pRes->lMagic = CONMAGIC;
|
||||
pRes->iDummy = 0;
|
||||
pRes->iLogin = 0;
|
||||
pRes->conStart = time(NULL);
|
||||
pRes->write = SCNormalWrite;
|
||||
@ -216,7 +215,6 @@ extern pServer pServ;
|
||||
pRes->pSics = pSics;
|
||||
pRes->lMagic = CONMAGIC;
|
||||
pRes->eInterrupt = eContinue;
|
||||
pRes->iDummy = 0;
|
||||
pRes->iLogin = 0;
|
||||
pRes->conStart = time(NULL);
|
||||
pRes->write = SCNormalWrite;
|
||||
@ -546,6 +544,24 @@ extern pServer pServ;
|
||||
}
|
||||
return self->write(self,pBuffer,iOut);
|
||||
}
|
||||
/*-------------------------------------------------------------------------*/
|
||||
writeFunc SCGetWriteFunc(SConnection *self)
|
||||
{
|
||||
if(!VerifyConnection(self))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return self->write;
|
||||
}
|
||||
/*-------------------------------------------------------------------------*/
|
||||
void SCSetWriteFunc(SConnection *self, writeFunc x)
|
||||
{
|
||||
if(!VerifyConnection(self))
|
||||
{
|
||||
return;
|
||||
}
|
||||
self->write = x;
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
static int SCNormalWrite(SConnection *self, char *buffer, int iOut)
|
||||
{
|
||||
@ -658,6 +674,95 @@ extern pServer pServ;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
int SCOnlySockWrite(SConnection *self, char *buffer, int iOut)
|
||||
{
|
||||
int i, iPtr, iRet;
|
||||
char pBueffel[80];
|
||||
|
||||
if(!VerifyConnection(self))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* log it for any case */
|
||||
if(self->pSock)
|
||||
{
|
||||
iRet = self->pSock->sockid;
|
||||
}
|
||||
else
|
||||
{
|
||||
iRet = 0;
|
||||
}
|
||||
sprintf(pBueffel,"Next line intended for socket: %d",iRet);
|
||||
SICSLogWrite(pBueffel,eInternal);
|
||||
SICSLogWrite(buffer,iOut);
|
||||
|
||||
/* put it into the interpreter if present */
|
||||
if(SCinMacro(self))
|
||||
{
|
||||
InterpWrite(self->pSics,buffer);
|
||||
}
|
||||
else /* not in interpreter, normal logic */
|
||||
{
|
||||
/* is this really to be printed ? */
|
||||
if(iOut < self->iOutput)
|
||||
return 0;
|
||||
|
||||
/* the socket */
|
||||
if(self->pSock)
|
||||
{
|
||||
if(self->iTelnet)
|
||||
{
|
||||
iRet = TelnetWrite(self->pSock,buffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
iRet = NETWrite(self->pSock,buffer,strlen(buffer));
|
||||
if(!HasNL(buffer))
|
||||
{
|
||||
iRet = NETWrite(self->pSock,"\n",sizeof("\n"));
|
||||
}
|
||||
}
|
||||
if(!iRet)
|
||||
{
|
||||
SCnoSock(self);
|
||||
WriteToCommandLog("SYS> ","Send broken to connection");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("%s \n",buffer);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
int SCNotWrite(SConnection *self, char *buffer, int iOut)
|
||||
{
|
||||
int i, iPtr, iRet;
|
||||
char pBueffel[80];
|
||||
|
||||
if(!VerifyConnection(self))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* log it for any case */
|
||||
if(self->pSock)
|
||||
{
|
||||
iRet = self->pSock->sockid;
|
||||
}
|
||||
else
|
||||
{
|
||||
iRet = 0;
|
||||
}
|
||||
sprintf(pBueffel,"Next line intended for socket: %d",iRet);
|
||||
SICSLogWrite(pBueffel,eInternal);
|
||||
SICSLogWrite(buffer,iOut);
|
||||
|
||||
return 1;
|
||||
}
|
||||
/*--------------------------------------------------------------------------
|
||||
This version writes only to configured log files but not to sockets.
|
||||
Used for automatic file execution for the WWW interface
|
||||
@ -1176,33 +1281,13 @@ extern pServer pServ;
|
||||
|
||||
return self->eInterrupt;
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
void SCSetError(SConnection *self, int eCode)
|
||||
{
|
||||
if(!VerifyConnection(self))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
self->iErrCode = eCode;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
int SCGetError(SConnection *self)
|
||||
{
|
||||
if(!VerifyConnection(self))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return self->iErrCode;
|
||||
}
|
||||
/* --------------------------------------------------------------------------*/
|
||||
int SCInvoke(SConnection *self, SicsInterp *pInter, char *pCommand)
|
||||
{
|
||||
int iRet;
|
||||
long lLen;
|
||||
const char *pResult = NULL;
|
||||
char *pBuffer = NULL;
|
||||
char *pBuffer = NULL, *pFile = NULL;
|
||||
char pBueffel[80];
|
||||
int i, iSpace;
|
||||
|
||||
@ -1238,8 +1323,20 @@ extern pServer pServ;
|
||||
/* invoke */
|
||||
self->inUse++;
|
||||
self->eInterrupt = eContinue;
|
||||
self->iErrCode = OKOK;
|
||||
self->parameterChange = 0;
|
||||
iRet = InterpExecute(pInter,self,pCommand);
|
||||
if(self->parameterChange == 1)
|
||||
{
|
||||
/*
|
||||
automatically save changed parameters
|
||||
*/
|
||||
pFile = IFindOption(pSICSOptions,"statusfile");
|
||||
if(pFile != NULL)
|
||||
{
|
||||
WriteSicsStatus(pInter,pFile,0);
|
||||
self->parameterChange = 0;
|
||||
}
|
||||
}
|
||||
self->inUse--;
|
||||
return iRet;
|
||||
}
|
||||
@ -1701,3 +1798,12 @@ extern pServer pServ;
|
||||
self->iGrab = 1;
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------------------*/
|
||||
void SCparChange(SConnection *self)
|
||||
{
|
||||
if(!VerifyConnection(self))
|
||||
{
|
||||
return;
|
||||
}
|
||||
self->parameterChange = 1;
|
||||
}
|
||||
|
22
conman.h
22
conman.h
@ -22,6 +22,9 @@
|
||||
|
||||
#define MAXLOGFILES 10
|
||||
|
||||
typedef int (*writeFunc)(struct __SConnection *pCon,
|
||||
char *pMessage, int iCode);
|
||||
|
||||
typedef struct __SConnection {
|
||||
/* object basics */
|
||||
pObjectDescriptor pDes;
|
||||
@ -35,8 +38,7 @@
|
||||
int iTelnet;
|
||||
int iOutput;
|
||||
int iFiles;
|
||||
int (*write)(struct __SConnection *pCon,
|
||||
char *pMessage, int iCode);
|
||||
writeFunc write;
|
||||
mkChannel *pDataSock;
|
||||
char *pDataComp;
|
||||
int iDataPort;
|
||||
@ -45,11 +47,12 @@
|
||||
int eInterrupt;
|
||||
int iUserRights;
|
||||
int inUse;
|
||||
int iDummy;
|
||||
int iGrab;
|
||||
int iErrCode;
|
||||
SicsInterp *pSics;
|
||||
|
||||
/* flag for parameter change */
|
||||
int parameterChange;
|
||||
|
||||
/* a FIFO */
|
||||
pCosta pStack;
|
||||
|
||||
@ -88,19 +91,22 @@
|
||||
int SCnoSock(SConnection *pCon);
|
||||
int SCWriteUUencoded(SConnection *pCon, char *pName, void *iData, int iLen);
|
||||
int SCWriteZipped(SConnection *pCon, char *pName, void *pData, int iDataLen);
|
||||
writeFunc SCGetWriteFunc(SConnection *pCon);
|
||||
void SCSetWriteFunc(SConnection *pCon, writeFunc x);
|
||||
int SCOnlySockWrite(SConnection *self, char *buffer, int iOut);
|
||||
int SCNotWrite(SConnection *self, char *buffer, int iOut);
|
||||
/************************* CallBack *********************************** */
|
||||
int SCRegister(SConnection *pCon, SicsInterp *pSics,
|
||||
void *pInter, long lID);
|
||||
int SCUnregister(SConnection *pCon, void *pInter);
|
||||
/******************************* Error **************************************/
|
||||
/******************************* Interrupt *********************************/
|
||||
void SCSetInterrupt(SConnection *self, int eCode);
|
||||
int SCGetInterrupt(SConnection *self);
|
||||
void SCSetError(SConnection *pCon, int iCode);
|
||||
int SCGetError(SConnection *pCon);
|
||||
/****************************** Macro ***************************************/
|
||||
int SCinMacro(SConnection *pCon);
|
||||
int SCsetMacro(SConnection *pCon, int iMode);
|
||||
|
||||
/************************** parameters changed ? **************************/
|
||||
void SCparChange(SConnection *pCon);
|
||||
/* *************************** Info *************************************** */
|
||||
int SCGetRights(SConnection *self);
|
||||
int SCSetRights(SConnection *pCon, int iNew);
|
||||
|
10
counter.c
10
counter.c
@ -230,7 +230,6 @@
|
||||
{
|
||||
SCWrite(pCon,"ERROR: Cannot fix counter problem, aborting",eError);
|
||||
SCSetInterrupt(pCon,eAbortBatch);
|
||||
SCSetError(pCon,eCt);
|
||||
return eCt;
|
||||
}
|
||||
else
|
||||
@ -795,6 +794,7 @@
|
||||
if(isAuthorised(pCon,usUser))
|
||||
{
|
||||
iRet2 = SetCounterPreset(self,PaRes.Arg[0].fVal);
|
||||
SCparChange(pCon);
|
||||
if(iRet2)
|
||||
SCSendOK(pCon);
|
||||
return iRet2;
|
||||
@ -823,12 +823,14 @@
|
||||
if(strcmp(PaRes.Arg[0].text,"timer") == 0)
|
||||
{
|
||||
SetCounterMode(self,eTimer);
|
||||
SCparChange(pCon);
|
||||
SCSendOK(pCon);
|
||||
return 1;
|
||||
}
|
||||
else if(strcmp(PaRes.Arg[0].text,"monitor") == 0)
|
||||
{
|
||||
SetCounterMode(self,ePreset);
|
||||
SCparChange(pCon);
|
||||
SCSendOK(pCon);
|
||||
return 1;
|
||||
}
|
||||
@ -869,6 +871,7 @@
|
||||
return 0;
|
||||
}
|
||||
self->iExponent = PaRes.Arg[0].iVal;
|
||||
SCparChange(pCon);
|
||||
SCSendOK(pCon);
|
||||
return 1;
|
||||
case 8: /* GetExponent */
|
||||
@ -960,6 +963,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
SCparChange(pCon);
|
||||
SCSendOK(pCon);
|
||||
return 1;
|
||||
}
|
||||
@ -982,12 +986,14 @@
|
||||
if(strcmp(PaRes.Arg[0].text,"timer") == 0)
|
||||
{
|
||||
SetCounterMode(self,eTimer);
|
||||
SCparChange(pCon);
|
||||
SCSendOK(pCon);
|
||||
return 1;
|
||||
}
|
||||
else if(strcmp(PaRes.Arg[0].text,"monitor") == 0)
|
||||
{
|
||||
SetCounterMode(self,ePreset);
|
||||
SCparChange(pCon);
|
||||
SCSendOK(pCon);
|
||||
return 1;
|
||||
}
|
||||
@ -1025,6 +1031,7 @@
|
||||
iRet2 = SetCounterPreset(self,PaRes.Arg[0].fVal);
|
||||
if(iRet2)
|
||||
SCSendOK(pCon);
|
||||
SCparChange(pCon);
|
||||
return iRet2;
|
||||
}
|
||||
else
|
||||
@ -1069,6 +1076,7 @@
|
||||
PaRes.Arg[1].iVal, PaRes.Arg[2].fVal);
|
||||
if(iRet == 1)
|
||||
{
|
||||
SCparChange(pCon);
|
||||
SCSendOK(pCon);
|
||||
return 1;
|
||||
}
|
||||
|
@ -196,7 +196,6 @@
|
||||
if(!pNew)
|
||||
{
|
||||
SCWrite(pCon,"ERROR: memory exhausted in Device Executor ",eError);
|
||||
SCSetError(pCon,NOMEMORY);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -240,7 +239,6 @@
|
||||
{
|
||||
sprintf(pBueffel,"ERROR: cannot start device %s",name);
|
||||
SCWrite(pCon,pBueffel,eError);
|
||||
SCSetError(self->pOwner,iRet);
|
||||
DeleteDevEntry(pNew);
|
||||
if(LLDcheck(self->iList) >= LIST_EMPTY)
|
||||
{
|
||||
@ -398,7 +396,6 @@
|
||||
self->iStatus = DEVDONE;
|
||||
break;
|
||||
case HWFault: /* real HW error: burning, no net etc.. */
|
||||
SCSetError(self->pOwner,iRet);
|
||||
DeleteDevEntry(pDev);
|
||||
LLDnodeDelete(self->iList);
|
||||
self->iStatus = DEVERROR;
|
||||
@ -442,7 +439,6 @@
|
||||
self->iStatus = DEVBUSY;
|
||||
break;
|
||||
case HWPosFault: /* cannot get somewhere... */
|
||||
SCSetError(self->pOwner,eCode);
|
||||
DeleteDevEntry(pDev);
|
||||
LLDnodeDelete(self->iList);
|
||||
self->iStatus = DEVERROR;
|
||||
|
@ -63,6 +63,77 @@ number of the motor in the EL734DC motor controller.
|
||||
<dd>Creates a piezo electric positioning device. Again the controller is a
|
||||
Physik Instrumente controller. pararray has the same meaning as for the
|
||||
C804 controller given above.
|
||||
<dt>Motor name ecb ecbcontroller ecb-number lowerlimit upperlimit
|
||||
<dd>This creates a motor which is controlled through the Risoe ECB
|
||||
electronic. The parameters:
|
||||
<dl>
|
||||
<dt>ecbcontroller
|
||||
<dd>The ECB controller to which this motor is connected to. See below
|
||||
for more on ECB controllers.
|
||||
<dt>ecb-number
|
||||
<dd>Number of the motor in the ECB system.
|
||||
<dt>lowerlimit
|
||||
<dd>The lower hardware limit for this motors operation
|
||||
<dt>upperlimit
|
||||
<dd>The upper hardware limit for this motors operation
|
||||
</dl>
|
||||
In contrast to normal motors, the ECB motors have quite a number of
|
||||
hardware parameters which must be configured. The general syntax to
|
||||
configure them is: motorname parametername value. The following
|
||||
parameters are available:
|
||||
<dl>
|
||||
<dt>encoder
|
||||
<dd>0 if there is no encoder for this motor, 1-3 for the encoder used
|
||||
for this motor.
|
||||
<dt>control
|
||||
<dd>The control bit flag. This falg determines if the motor sets a
|
||||
control bit in the ECB controller. This control bit can be used to
|
||||
drive air cushions and the like. If required set to 1, else leave at
|
||||
0.
|
||||
<dt>delay
|
||||
<dd>Delay time to wait after setting a control bit.
|
||||
<dt>range
|
||||
<dd>The speed range for the motor: 0 for slow, 1 for fast
|
||||
<dt>multi
|
||||
<dd>The ECB controller supports up to 24 motors. In some instances
|
||||
this is not enough. Then one ECB channel can be multiplexed into
|
||||
several motors. This flag (),1) determines if this is the case.
|
||||
<dt>multchan
|
||||
<dd>The multiplexer channel for a multiplexed motor.
|
||||
<dt>port
|
||||
<dd>The ECB port a multiplexed motor is using.
|
||||
<dt>acceleration
|
||||
<dd>The speed with which the motor accelerates to its final speed.
|
||||
<dt>rotation_dir
|
||||
<dd>Rotation direction of the motor.
|
||||
<dt>startspeed
|
||||
<dd>Starting speed of the motor.
|
||||
<dt>maxspeed
|
||||
<dd>The maximum speed for this motor.
|
||||
<dt>auto
|
||||
<dd>Speed in automatic mode
|
||||
<dt>manuell
|
||||
<dd>Speed used when driving the motor through the manual control box.
|
||||
<dt>offset
|
||||
<dd>When using an encoder: the offset between the motor zero and the
|
||||
encoder zero.
|
||||
<dt>dtolerance
|
||||
<dd>hardware tolerance of the motor.
|
||||
<dt>step2dig
|
||||
<dd>conversion factor from encoder steps to physical values.
|
||||
<dt>step2deg
|
||||
<dd>Conversion factor from motor pseudo encoder steps to physical
|
||||
values.
|
||||
<dt>backlash
|
||||
<dd>In order to correct for backlash, Risoe motors always approach a
|
||||
target position from the same direction. In order to do this the motor
|
||||
has to overshoot and drive back when driving in the wrong
|
||||
direction. The parameter backlash determines how much to overshoot.
|
||||
</dl>
|
||||
ECB motors have another quirck: 8 motors in a rack share a power
|
||||
supply! This has the consequence that only one of the 8 motors can run
|
||||
at any given time. In SICS this is directed through the anticollider
|
||||
module described elsewhere.
|
||||
</DL>
|
||||
</p>
|
||||
|
||||
@ -79,6 +150,9 @@ failures. This can be used in a instrument simulation server.
|
||||
<DD>This command creates a single
|
||||
counter name, using an EL737 driver. The counter is at host host, listening
|
||||
at port port and sits at serial port chan.
|
||||
<dt> MakeCounter name ecb ecb-controller
|
||||
<dd>Installs a counetr on top of the Risoe ECB hardware. The only
|
||||
parameter is the name of the ECB controller to use.
|
||||
<DT>MakeHMControl name counter hm1 hm2 hm3
|
||||
<dd>At some instruments (for instance TRICS) multiple counters or
|
||||
histogram memories are controlled by a master counter which watches
|
||||
@ -109,8 +183,9 @@ HM. Histogram memory objects can be created using the command:
|
||||
<DT> MakeHM name type
|
||||
<DD> The parameter name specifies the name under which the HM will be
|
||||
avialable in the system. type specifies which type of driver to use.
|
||||
Currently two types of drivers are supported: SIM for a simulated HM and
|
||||
SINQHM for the SINQ histogram memory. Please care to note, that the SINQHM
|
||||
Currently three types of drivers are supported: SIM for a simulated HM
|
||||
, SINQHM for the SINQ histogram memory and tdc for the Risoe histogram memory.
|
||||
Please care to note, that the SINQHM
|
||||
requires a EL737 counter box for count control. This counter must have been
|
||||
defined before creating the HM object.
|
||||
</DL>
|
||||
@ -121,7 +196,7 @@ MakeHM banana SINQHM
|
||||
banana configure HistMode Normal
|
||||
banana configure OverFlowMode Ceil
|
||||
banana configure Rank 1
|
||||
banana configure Length 400
|
||||
banana configure dim0 400
|
||||
banana configure BinWidth 4
|
||||
banana preset 100.
|
||||
banana CountMode Timer
|
||||
@ -237,6 +312,122 @@ which the device is connected. This is usally the port number plus 3000.
|
||||
To be expanded. Please note, that environment devices such as temperature
|
||||
controllers are dynamically configured into the system at run time.
|
||||
Therefore the necessary commands are described in the user documentation.
|
||||
</p>
|
||||
<h3>GPIB Controller Access</h3>
|
||||
<p>
|
||||
GPIB is yet another bus system. Up to 30 devices can share the bus and
|
||||
transfer data on it. SICS likest to speak to GPIB devices through the
|
||||
National Instrument ENET-100 TCP/IP bridge. In order for this to work
|
||||
the National Instruments driver software must have been installed on
|
||||
the computer running SICS. SICS has to be compiled with the define
|
||||
HAVENI defined and the proper paths to the header file and library
|
||||
configured. The an GPIB controller can be installed into SICS with the
|
||||
command:
|
||||
<pre>
|
||||
MakeGPIB name drivertype
|
||||
</pre>
|
||||
Name is the name under which the GPIB controller is addressable within
|
||||
SICS afterwards. drivertype is the driver to use for the GPIB
|
||||
device. Supported values are:
|
||||
<dl>
|
||||
<dt>sim
|
||||
<dd>Simulation
|
||||
<dd>ni
|
||||
<>National instruments driver, see above.
|
||||
</dl>
|
||||
The GPIB controller supports a couple of commands for communicating
|
||||
with devices on the GPIB bus directly. Use with extra care because it
|
||||
is very easy to lock things up on the GPIB bus. In the following
|
||||
documantation of the command set it is assumed that a GPIB controller
|
||||
has been configured into the system under the name <b>gpib</>. Please
|
||||
note, that managers privilege is required in order to be allowed to
|
||||
wrestle with this controller.
|
||||
<dL>
|
||||
<dt>
|
||||
</dl>gpib attach controller-no gpib-address gpib-secondary timeout
|
||||
eos eot
|
||||
<dd>This attaches the GPIB controller to a certain device at a certain
|
||||
address for later communication. The return value is an integer
|
||||
handle which will be used later on a s a handle devID when referring
|
||||
to the conenction. The parameters are:
|
||||
<dl>
|
||||
<dt>controller-no
|
||||
<dd>The number of the GPIB controller on the computer. There may be
|
||||
more then one GPIB controllerinstalled on a given system. Usually this
|
||||
is 0.
|
||||
<dt>gpib-address
|
||||
<dd>The GPIB address of the device on the bus.
|
||||
<dt>gpib-secondary
|
||||
<DD>GPIB devices may have a seconadry address. This can be specified
|
||||
with this parameter. Usually this is 0.
|
||||
<dt>timeout
|
||||
<dd>The time to wait for answers on the GPIB bus. 13 is 10 seconds and
|
||||
ussually a good value.
|
||||
<dt>eot
|
||||
<dd>A parameter determining the termination mode on this
|
||||
connection. Consult NI documentation for this or leave at 0.
|
||||
<dt>eoi
|
||||
<dd> A terminator. Set to 1 or understand NI documentation for this
|
||||
parameter.
|
||||
</dt>
|
||||
<dt>gpib detach devID
|
||||
<dd>Breaks the connection described through devID. devID is the return
|
||||
value from attach.
|
||||
<dt>gpib clear devID
|
||||
<dd>Tries to clear the GPIB buffers for the conenction described
|
||||
through devID. Usually in vain.
|
||||
<dt>gpib send devID bal bla bla
|
||||
<dd>sends data to the device at devID.
|
||||
<dt>gpib sendwithterm devID string terminator
|
||||
<dd>Sends string to the device at devID. The terminator character
|
||||
identified through the integer terminator is automatically
|
||||
appended. Use this to send things which require a
|
||||
terminator. Terminators included in strings sent by send get messed up
|
||||
through Tcl!
|
||||
<dt>gpib read devID
|
||||
<dd>Reads data from the device at devID and returns it as a string.
|
||||
<dt>gpib readtillterm devID terminator
|
||||
<dd>Read from teh device devID unti the terminator character described
|
||||
through the interger terminator is read. Then return the data read as
|
||||
a string.
|
||||
</dl>
|
||||
</p>
|
||||
<h3>ECB Controllers</h3>
|
||||
<p>
|
||||
ECB controllers are at the heart of the Risoe data aquisition
|
||||
system. These are essentially Z80 processors wired to the GPIB
|
||||
bus. Functions can be invoked in this processor by sending a function
|
||||
code followed by the contents of 4 8 bit registers. As a result the
|
||||
contents of the registers after the function call are returned. A ECB
|
||||
can be made knwon to SICS through the initialisation command:
|
||||
<pre>
|
||||
MakeECB name gpib-controller gbib-controller-number gpib-address
|
||||
</pre>
|
||||
The parameters:
|
||||
<dl>
|
||||
<dt>name
|
||||
<dd>The name used as a token for this controller later on.
|
||||
<dt>gpib-controller
|
||||
<dd>the name of the GPIB interface to use. See above.
|
||||
<dt>gbib-controller-no
|
||||
<dd>The number of the GPIB board in the system
|
||||
<dt>gpib-address
|
||||
<dd>The GPIB address of the ECB on the GPIB bus.
|
||||
</dl>
|
||||
Once installed, the ECB controller understands a few commands:
|
||||
<dl>
|
||||
<dt>ecb1 func funcode d e bc
|
||||
<dd>Invoke ECB function funcode with the registers d e b c.Returns the
|
||||
contents of the registers d e b c. Function codes and register
|
||||
contents are documented, if at all, in the ECB documentation.
|
||||
<dt>ecb1 clear
|
||||
<dd>Tries, usually in vain, to clear the communications interface to
|
||||
the ECB.
|
||||
<dt>ecb1 toint char
|
||||
<dd>A helper function which converts the character char to an
|
||||
integer. Tcl does not seem to be able to do that.
|
||||
</dl>
|
||||
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -38,9 +38,7 @@ will not do a trick.
|
||||
position name. Afterwards this position can be reached by typing: COP name.
|
||||
<DT> COP defpos name mot val mot val ....
|
||||
<DD> this command defines a named position named name. This must be followed
|
||||
by a list of motor names to run and their values. The motor names must be
|
||||
those listed as <a href = sanslist.htm>SANS motors </a>. (Not yet
|
||||
implemented).
|
||||
by a list of motor alias names to run and their values.
|
||||
<DT> COP drop name
|
||||
<DD> deletes the named position specified as second parameter.
|
||||
<DT> COP axis = val axis = val ........
|
||||
|
1
drive.c
1
drive.c
@ -131,7 +131,6 @@
|
||||
if(SCGetInterrupt(pCon) == eAbortOperation)
|
||||
{
|
||||
SCSetInterrupt(pCon,eContinue);
|
||||
SCSetError(pCon,OKOK);
|
||||
sprintf(pBueffel,"Driving %s aborted at %9.3f",name, fPos);
|
||||
SCWrite(pCon,pBueffel,eStatus);
|
||||
}
|
||||
|
3
ecb.c
3
ecb.c
@ -14,6 +14,7 @@
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <tcl.h>
|
||||
#include <unistd.h>
|
||||
#include "fortify.h"
|
||||
#include "sics.h"
|
||||
#include "ecb.h"
|
||||
@ -291,9 +292,11 @@ int ECBAction(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||
Only managers will be allowed to wrestle directly with ECB
|
||||
controllers.
|
||||
*/
|
||||
if(!SCinMacro(pCon)){
|
||||
if(!SCMatchRights(pCon,usMugger)){
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if(argc < 2){
|
||||
SCWrite(pCon,"ERROR: keyword required for ECB",eError);
|
||||
|
@ -337,7 +337,6 @@
|
||||
if(SCGetInterrupt(pCon) == eAbortOperation)
|
||||
{
|
||||
SCSetInterrupt(pCon,eContinue);
|
||||
SCSetError(pCon,OKOK);
|
||||
SCWrite(pCon,"Driving Aborted",eStatus);
|
||||
}
|
||||
return 0;
|
||||
|
@ -33,7 +33,7 @@ int GPIBread(pGPIB self, int devID, void *buffer, int bytesToRead){
|
||||
}
|
||||
/*--------------------------------------------------------------------*/
|
||||
char *GPIBreadTillTerm(pGPIB self, int devID, int terminator){
|
||||
unsigned char buchstabe[2];
|
||||
char buchstabe[2];
|
||||
Tcl_DString buffer;
|
||||
char *result = NULL;
|
||||
int status;
|
||||
@ -59,7 +59,7 @@ void GPIBclear(pGPIB self, int devID){
|
||||
}
|
||||
/*--------------------------------------------------------------------*/
|
||||
void GPIBerrorDescription(pGPIB self, int code, char *buffer, int maxBuf){
|
||||
return self->getErrorDescription(code, buffer,maxBuf);
|
||||
self->getErrorDescription(code, buffer,maxBuf);
|
||||
}
|
||||
/*-------------------------------------------------------------------
|
||||
These are void implementations of the functions for simulation
|
||||
@ -83,7 +83,7 @@ static int SIMread(int devID, void *buffer, int bytesToRead){
|
||||
}
|
||||
/*--------------------------------------------------------------------*/
|
||||
static int SIMclear(int devID){
|
||||
return;
|
||||
return 1;
|
||||
}
|
||||
/*---------------------------------------------------------------------*/
|
||||
static void SIMerror(int code, char *buffer, int maxBuf){
|
||||
@ -115,9 +115,12 @@ int GPIBAction(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||
Only managers will be allowed to wrestle directly with GPIB
|
||||
controllers.
|
||||
*/
|
||||
if(!SCinMacro(pCon)){
|
||||
if(!SCMatchRights(pCon,usMugger)){
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(argc > 1){
|
||||
strtolower(argv[1]);
|
||||
|
@ -310,7 +310,6 @@
|
||||
{
|
||||
SCWrite(pCon,"ERROR: failed to fix histogram memory problem",eError);
|
||||
SCSetInterrupt(pCon,eAbortBatch);
|
||||
SCSetError(pCon,eCt);
|
||||
return eCt;
|
||||
}
|
||||
else
|
||||
@ -1068,6 +1067,7 @@ static int checkHMEnd(pHistMem self, char *text){
|
||||
return 0;
|
||||
}
|
||||
iRet = SetHistPreset(self,fVal);
|
||||
SCparChange(pCon);
|
||||
SCSendOK(pCon);
|
||||
return 1;
|
||||
}
|
||||
@ -1087,6 +1087,7 @@ static int checkHMEnd(pHistMem self, char *text){
|
||||
return 0;
|
||||
}
|
||||
self->iExponent = atoi(argv[2]);
|
||||
SCparChange(pCon);
|
||||
SCSendOK(pCon);
|
||||
return 1;
|
||||
}
|
||||
@ -1122,6 +1123,7 @@ static int checkHMEnd(pHistMem self, char *text){
|
||||
return 0;
|
||||
}
|
||||
iRet = SetHistCountMode(self,eCount);
|
||||
SCparChange(pCon);
|
||||
SCSendOK(pCon);
|
||||
return 1;
|
||||
}
|
||||
@ -1497,6 +1499,7 @@ static int checkHMEnd(pHistMem self, char *text){
|
||||
}
|
||||
genTimeBinning(self->pDriv->data,
|
||||
(float)dStart,(float)dStep,iNum);
|
||||
SCparChange(pCon);
|
||||
SCSendOK(pCon);
|
||||
return 1;
|
||||
}
|
||||
|
2
hkl.c
2
hkl.c
@ -985,7 +985,6 @@ ente:
|
||||
if(SCGetInterrupt(pCon) == eAbortOperation)
|
||||
{
|
||||
SCSetInterrupt(pCon,eContinue);
|
||||
SCSetError(pCon,OKOK);
|
||||
SCWrite(pCon,"Driving to HKL Aborted",eStatus);
|
||||
}
|
||||
return 0;
|
||||
@ -1031,7 +1030,6 @@ ente:
|
||||
if(SCGetInterrupt(pCon) == eAbortOperation)
|
||||
{
|
||||
SCSetInterrupt(pCon,eContinue);
|
||||
SCSetError(pCon,OKOK);
|
||||
SCWrite(pCon,"Driving to HKL Aborted",eStatus);
|
||||
}
|
||||
return 0;
|
||||
|
5
hmdata.c
5
hmdata.c
@ -25,6 +25,7 @@ pHMdata makeHMData(void) {
|
||||
}
|
||||
memset(self,0,sizeof(HMdata));
|
||||
self->nTimeChan = 1;
|
||||
self->updateFlag = 1;
|
||||
|
||||
return self;
|
||||
}
|
||||
@ -324,6 +325,10 @@ long sumHMDataRectangle(pHistMem hist, SConnection *pCon,
|
||||
}
|
||||
}
|
||||
|
||||
if(self->localBuffer == NULL){
|
||||
resizeBuffer(self);
|
||||
}
|
||||
|
||||
/*
|
||||
get an update of the HM if necessary
|
||||
*/
|
||||
|
1
macro.c
1
macro.c
@ -458,7 +458,6 @@
|
||||
else
|
||||
{
|
||||
SCSetInterrupt(pCon,eContinue);
|
||||
SCSetError(pCon,OKOK);
|
||||
}
|
||||
Tcl_DStringFree(&command);
|
||||
}
|
||||
|
4
motor.c
4
motor.c
@ -149,7 +149,6 @@
|
||||
if(iRet != OKOK)
|
||||
{
|
||||
fVal = -9999999.99;
|
||||
SCSetError(pCon,iRet);
|
||||
}
|
||||
return fVal;
|
||||
}
|
||||
@ -546,6 +545,7 @@ extern void KillPiPiezo(void *pData);
|
||||
iRet = self->pDriver->SetDriverPar(self->pDriver,pCon,name,fVal);
|
||||
if(iRet == 1)
|
||||
{
|
||||
SCparChange(pCon);
|
||||
return iRet;
|
||||
}
|
||||
}
|
||||
@ -570,6 +570,7 @@ extern void KillPiPiezo(void *pData);
|
||||
fLimit = ObVal(self->ParArray,SLOW);
|
||||
fLimit -= fChange;
|
||||
ObParSet(self->ParArray,self->name,"softlowerlim",fLimit,pCon);
|
||||
SCparChange(pCon);
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -591,6 +592,7 @@ extern void KillPiPiezo(void *pData);
|
||||
ObParInit(self->ParArray,SZERO,"softzero",ZEROINACTIVE,usUser);
|
||||
}
|
||||
}
|
||||
SCparChange(pCon);
|
||||
|
||||
return iRet;
|
||||
}
|
||||
|
59
mumo.c
59
mumo.c
@ -161,6 +161,7 @@
|
||||
#define POSFIND 11
|
||||
#define NAMALL 12
|
||||
#define LIST 13
|
||||
#define DEFPOS 14
|
||||
/*-------------------------------------------------------------------------*/
|
||||
static int GetNextToken(psParser self, pMulMot pDings)
|
||||
{
|
||||
@ -283,6 +284,11 @@
|
||||
self->iCurrentToken = LIST;
|
||||
return LIST;
|
||||
}
|
||||
else if(strcmp(self->Token,"defpos") ==0)
|
||||
{
|
||||
self->iCurrentToken = DEFPOS;
|
||||
return DEFPOS;
|
||||
}
|
||||
else
|
||||
{
|
||||
self->iCurrentToken = SYMBOL;
|
||||
@ -602,7 +608,7 @@
|
||||
char pCommand[1064];
|
||||
char *pPtr;
|
||||
|
||||
/* is the user allowe dto do ANYTHING ? */
|
||||
/* is the user allowed to do ANYTHING ? */
|
||||
iRet = CheckPermission(pCon,self);
|
||||
if(!iRet)
|
||||
{
|
||||
@ -625,8 +631,56 @@
|
||||
}
|
||||
return 0; /* not reached */
|
||||
}
|
||||
/*-------------------------------------------------------------------------*/
|
||||
static int ParseDefPos(SicsInterp *pSics,psParser pPP,
|
||||
pMulMot self, SConnection *pCon)
|
||||
{
|
||||
pMotor pMot = NULL;
|
||||
char pError[132], motorName[80], command[1024], namPos[80];
|
||||
int iToken, status;
|
||||
float fVal;
|
||||
|
||||
|
||||
iToken = GetNextToken(pPP,self);
|
||||
if(iToken != SYMBOL) /* we want a name here */
|
||||
{
|
||||
sprintf(pError,"ERROR: Invalid Token %s in ParsePos",pPP->Token);
|
||||
SCWrite(pCon,pError,eError);
|
||||
return 0;
|
||||
}
|
||||
|
||||
strncpy(namPos,pPP->Token,79);
|
||||
iToken = GetNextToken(pPP,self);
|
||||
command[0] = '\0';
|
||||
while(iToken != END)
|
||||
{
|
||||
if(iToken != ALIAS)
|
||||
{
|
||||
sprintf(command,"ERROR: expected motor alias, got: %s", pPP->Token);
|
||||
SCWrite(pCon,command,eError);
|
||||
return 0;
|
||||
}
|
||||
StringDictGet(self->pAlias,pPP->Token,motorName,79);
|
||||
strcat(command, motorName);
|
||||
strcat(command," ");
|
||||
iToken = GetNextToken(pPP,self);
|
||||
if(iToken != NUMBER)
|
||||
{
|
||||
sprintf(command,"ERROR: expected number, got: %s", pPP->Token);
|
||||
SCWrite(pCon,command,eError);
|
||||
return 0;
|
||||
}
|
||||
strcat(command,pPP->Token);
|
||||
strcat(command," ");
|
||||
iToken = GetNextToken(pPP,self);
|
||||
}
|
||||
|
||||
/* The rest of the stuff should be the motors to drive until
|
||||
we are there
|
||||
*/
|
||||
StringDictAddPair(self->pNamPos,namPos,command);
|
||||
return 1;
|
||||
}
|
||||
/*---------------------------------------------------------------------------
|
||||
MultiWrapper is the user interface to a multi motor unit. It supports the
|
||||
following syntax, where DingsBums is the name of the unit:
|
||||
@ -727,6 +781,9 @@
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
case DEFPOS:
|
||||
return ParseDefPos(pSics,&MyParser,self,pCon);
|
||||
break;
|
||||
case LIST:
|
||||
pPtr = NULL;
|
||||
Tcl_DStringInit(&tString);
|
||||
|
@ -578,7 +578,7 @@ static int handlePut(SConnection *pCon, SicsInterp *pSics, pNXScript self,
|
||||
defString,buffer);
|
||||
if(status != NX_OK){
|
||||
sprintf(buffer,"ERROR: failed to write alias %s",
|
||||
fVal, argv[2]);
|
||||
argv[2]);
|
||||
SCWrite(pCon,buffer,eError);
|
||||
}
|
||||
return 1;
|
||||
|
@ -84,7 +84,7 @@ proc collimator args {
|
||||
}
|
||||
#----------------------------------------------------------------------
|
||||
proc coll args {
|
||||
return coliimator $args
|
||||
return collimator $args
|
||||
}
|
||||
#======================== Beamstop stuff ==============================
|
||||
proc beamstop args {
|
||||
|
5
scan.c
5
scan.c
@ -1869,6 +1869,7 @@ int StoreScanCounts(pScanData self, char *data)
|
||||
char *pPtr = NULL, pItem[20];
|
||||
long *lData = NULL;
|
||||
int i;
|
||||
writeFunc oldWrite;
|
||||
|
||||
self = (pScanData)pEventData;
|
||||
pCon = (SConnection *)pUser;
|
||||
@ -1905,13 +1906,17 @@ int StoreScanCounts(pScanData self, char *data)
|
||||
/* get counts */
|
||||
GetScanCounts(self,lData,self->iNP);
|
||||
/* format a message */
|
||||
|
||||
strcpy(pPtr,"scan.Counts= ");
|
||||
for(i = 0; i < self->iNP; i++)
|
||||
{
|
||||
sprintf(pItem,"{%d} ",lData[i]);
|
||||
strcat(pPtr,pItem);
|
||||
}
|
||||
oldWrite = SCGetWriteFunc(pCon);
|
||||
SCSetWriteFunc(pCon,SCOnlySockWrite);
|
||||
SCWrite(pCon,pPtr,eWarning);
|
||||
SCSetWriteFunc(pCon,oldWrite);
|
||||
free(lData);
|
||||
free(pPtr);
|
||||
return 1;
|
||||
|
@ -123,7 +123,6 @@
|
||||
SCWrite(pCon,"ERROR: out of memory in sicscron",eError);
|
||||
return 0;
|
||||
}
|
||||
pNew->pCon->iDummy = 1;
|
||||
pNew->iIntervall = iVal;
|
||||
pNew->pCommand = strdup(pBueffel);
|
||||
pNew->tNext = 0;
|
||||
|
1
sicvar.c
1
sicvar.c
@ -630,6 +630,7 @@
|
||||
return 0;
|
||||
}
|
||||
SCSendOK(pCon);
|
||||
SCparChange(pCon);
|
||||
DeleteTokenList(pList);
|
||||
return 1;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
#define MAX_CLIENTS 8 /* The maximum number of active clients */
|
||||
#define MAX_TOF_CNTR 32768 /* The maximum number of individual counters ..
|
||||
** which can be handled in TOF mode */
|
||||
#define MAX_PSD_CNTR 1048576 /* maximum number of PSD elements */
|
||||
#define MAX_PSD_CNTR 16777217 /* maximum number of PSD elements */
|
||||
#define MAX_PSD_ED 3 /* maximum number of additional
|
||||
single detectors at AMOR
|
||||
*/
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include <time.h>
|
||||
#include <math.h>
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
#include "fortify.h"
|
||||
#include "conman.h"
|
||||
#include "servlog.h"
|
||||
|
11
status.c
11
status.c
@ -354,6 +354,7 @@ static int motorSave = 0;
|
||||
int iRights;
|
||||
int iRet;
|
||||
char *pFile = NULL;
|
||||
writeFunc oldWrite;
|
||||
|
||||
assert(pSics);
|
||||
assert(pCon);
|
||||
@ -379,8 +380,18 @@ static int motorSave = 0;
|
||||
|
||||
iRights = SCGetRights(pCon);
|
||||
pCon->iUserRights = usInternal;
|
||||
oldWrite = SCGetWriteFunc(pCon);
|
||||
SCSetWriteFunc(pCon,SCNotWrite);
|
||||
iRet = InterpExecute(pSics,pCon,pBueffel);
|
||||
SCSetWriteFunc(pCon,oldWrite);
|
||||
pCon->iUserRights = iRights;
|
||||
/*
|
||||
if we do not override parameterChange here, the backup file
|
||||
would be overwritten after each restore... Not the right thing
|
||||
to do!
|
||||
*/
|
||||
pCon->parameterChange = 0;
|
||||
SCSendOK(pCon);
|
||||
return iRet;
|
||||
}
|
||||
|
||||
|
@ -296,7 +296,6 @@ int TASDrive(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||
if(SCGetInterrupt(pCon) == eAbortOperation)
|
||||
{
|
||||
SCSetInterrupt(pCon,eContinue);
|
||||
SCSetError(pCon,OKOK);
|
||||
sprintf(pBueffel,"Driving aborted");
|
||||
SCWrite(pCon,pBueffel,eStatus);
|
||||
}
|
||||
|
@ -963,15 +963,18 @@ static int ParseVar(pTASdata pTAS, char *pBueffel, SConnection *pCon)
|
||||
{
|
||||
VarSetFloat(pTAS->tasPar[lastVar],atof(pToken),
|
||||
usInternal);
|
||||
SCparChange(pCon);
|
||||
}
|
||||
else if(vt == veInt)
|
||||
{
|
||||
VarSetInt(pTAS->tasPar[lastVar],
|
||||
(int)atof(pToken), usInternal);
|
||||
SCparChange(pCon);
|
||||
}
|
||||
else
|
||||
{
|
||||
pTAS->tasPar[lastVar]->text = strdup(pToken);
|
||||
SCparChange(pCon);
|
||||
}
|
||||
lastVar++;
|
||||
}
|
||||
@ -1000,11 +1003,13 @@ static int ParseVar(pTASdata pTAS, char *pBueffel, SConnection *pCon)
|
||||
{
|
||||
VarSetFloat(pTAS->tasPar[lastVar],atof(pToken),
|
||||
usInternal);
|
||||
SCparChange(pCon);
|
||||
}
|
||||
else if(vt == veInt)
|
||||
{
|
||||
VarSetInt(pTAS->tasPar[lastVar],
|
||||
(int)atof(pToken),usInternal);
|
||||
SCparChange(pCon);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
1
tdchm.c
1
tdchm.c
@ -419,6 +419,7 @@ static int TDCContinue(pHistDriver self, SConnection *pCon){
|
||||
/*=======================================================================*/
|
||||
static int TDCFree(pHistDriver self){
|
||||
free(self->pPriv);
|
||||
return 1;
|
||||
}
|
||||
/*======================================================================*/
|
||||
static int TDCSetHistogram(pHistDriver self, SConnection *pCon,
|
||||
|
Reference in New Issue
Block a user