diff --git a/doc/manager/command.htm b/doc/manager/command.htm index b944dc36..55204ec2 100644 --- a/doc/manager/command.htm +++ b/doc/manager/command.htm @@ -72,7 +72,7 @@ in the system. M1 and M2 are the names of the Theta and two Theta motors respectively. M3 is an optional parameter defining a motor for driving the horizontal curvature. M4 is an optional parameter defining a motor for driving the vertical curvature of the monochromator. -
InitToken tokenpassword +
TokenInit tokenpassword
This command initialises the token control management system with the token command. The single parameter tokenpassword specifies the password for the token force command. diff --git a/doc/manager/nxscript.htm b/doc/manager/nxscript.htm index 91a99e7e..6e11f5cd 100644 --- a/doc/manager/nxscript.htm +++ b/doc/manager/nxscript.htm @@ -99,9 +99,10 @@ experiment.
nxscript puthm hmAlias hmName ?start? ?length?
Writes data from the histogram memory hmName to a NeXus file using -the alias hmAlias. The definition string for the alias should not -contain neither -rank nor -dim information as this will be appended by -nxscript. If the optional parameters start and end are given, a +the alias hmAlias. Nxscript automatically updates the dim0, dim1, ..., timedim +dictionary variables. Thus these can be used to define the dimensions in the +dictionary file. +If the optional parameters start and end are given, a subset of the data is written. It is the users responsability that the values requested make sense to the histogram memory. In the case of subset writing, the dimensions have to be specified in the definition diff --git a/doc/user/commandlog.htm b/doc/user/commandlog.htm index 3ed7774c..2dcd7216 100644 --- a/doc/user/commandlog.htm +++ b/doc/user/commandlog.htm @@ -27,6 +27,8 @@ Log files are written to the log directory of the instrument account. There are time stamps any hour in that file and there is a new file any 24 hours.
commandlog tail [n]
prints the last n entries made into the command log. n is optional and defaults to 20. Up to 1000 lines are held in an internal buffer for this command. +
commandlog intervall +
Queries and configures the intervall in minutes at which time stamps are written to the commandlog. It is now possible to have a script executed whenever a new log file is started. In order to make this work a ServerOption with the name logstartfile diff --git a/doc/user/histogram.htm b/doc/user/histogram.htm index 20fa6232..fad48c19 100644 --- a/doc/user/histogram.htm +++ b/doc/user/histogram.htm @@ -74,7 +74,7 @@ for its number type.
  • Count. As Ceil, but a list of overflowed bins will be maintained.
    Rank -
    Rank defines the number of histograms in memory. +
    Rank defines the number of dimensions the detector has, minus the time channle when applicable. 1 is a linear detector, 2 a area detector etc.
    BinWidth
    determines the size of a single bin in histogram memory in bytes.
    dim0, dim1, dim2, ... dimn diff --git a/event.tex b/event.tex index 6cfab932..11e36a07 100644 --- a/event.tex +++ b/event.tex @@ -1,3 +1,13 @@ +\newcommand{\NWtarget}[2]{#2} +\newcommand{\NWlink}[2]{#2} +\newcommand{\NWtxtMacroDefBy}{Macro defined by} +\newcommand{\NWtxtMacroRefIn}{Macro referenced in} +\newcommand{\NWtxtMacroNoRef}{Macro never referenced} +\newcommand{\NWtxtDefBy}{Defined by} +\newcommand{\NWtxtRefIn}{Referenced in} +\newcommand{\NWtxtNoRef}{Not referenced} +\newcommand{\NWtxtFileDefBy}{File defined by} +\newcommand{\NWsep}{${\diamond}$} \subsection{SICS Events} This section lists the callback events known to Sics, their purpose, and their associated event datastructures when applicable. See the @@ -12,17 +22,17 @@ This module defines several event related functions as well. \begin{flushleft} \small \begin{minipage}{\linewidth} \label{scrap1} -$\langle$eFunc {\footnotesize ?}$\rangle\equiv$ +$\langle\,$eFunc\nobreak\ {\footnotesize \NWtarget{nuweb?}{?}}$\,\rangle\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@@\\ \mbox{}\verb@ int Text2Event(char *pText);@\\ -\mbox{}\verb@@$\diamond$ +\mbox{}\verb@@{\NWsep} \end{list} \vspace{-1ex} \footnotesize\addtolength{\baselineskip}{-1ex} \begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} -\item Macro referenced in scrap ?. +\item \NWtxtMacroRefIn\ \NWlink{nuweb?}{?}. \end{list} \end{minipage}\\[4ex] \end{flushleft} @@ -31,7 +41,7 @@ if the event code is not known, else the apropriate event code. \begin{flushleft} \small \begin{minipage}{\linewidth} \label{scrap2} -$\langle$VE {\footnotesize ?}$\rangle\equiv$ +$\langle\,$VE\nobreak\ {\footnotesize \NWtarget{nuweb?}{?}}$\,\rangle\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@@\\ @@ -49,12 +59,12 @@ $\langle$VE {\footnotesize ?}$\rangle\equiv$ \mbox{}\verb@#define COUNTEND 11@\\ \mbox{}\verb@#define FILELOADED 12@\\ \mbox{}\verb@#define MOTEND 13@\\ -\mbox{}\verb@@$\diamond$ +\mbox{}\verb@@{\NWsep} \end{list} \vspace{-1ex} \footnotesize\addtolength{\baselineskip}{-1ex} \begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} -\item Macro referenced in scrap ?. +\item \NWtxtMacroRefIn\ \NWlink{nuweb?}{?}. \end{list} \end{minipage}\\[4ex] \end{flushleft} @@ -88,7 +98,7 @@ possible codes are defined. \begin{flushleft} \small \begin{minipage}{\linewidth} \label{scrap3} -$\langle$VSIG {\footnotesize ?}$\rangle\equiv$ +$\langle\,$VSIG\nobreak\ {\footnotesize \NWtarget{nuweb?}{?}}$\,\rangle\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@@\\ @@ -96,12 +106,12 @@ $\langle$VSIG {\footnotesize ?}$\rangle\equiv$ \mbox{}\verb@#define SICSBROADCAST 301@\\ \mbox{}\verb@#define TOKENGRAB 302@\\ \mbox{}\verb@#define TOKENRELEASE 303@\\ -\mbox{}\verb@@$\diamond$ +\mbox{}\verb@@{\NWsep} \end{list} \vspace{-1ex} \footnotesize\addtolength{\baselineskip}{-1ex} \begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} -\item Macro referenced in scrap ?. +\item \NWtxtMacroRefIn\ \NWlink{nuweb?}{?}. \end{list} \end{minipage}\\[4ex] \end{flushleft} @@ -116,7 +126,7 @@ data is the string to send. \end{description} \begin{flushleft} \small \begin{minipage}{\linewidth} \label{scrap4} -\verb@"event.h"@ {\footnotesize ? }$\equiv$ +\verb@"event.h"@\nobreak\ {\footnotesize \NWtarget{nuweb?}{?} }$\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@@\\ @@ -132,14 +142,14 @@ data is the string to send. \mbox{}\verb@----------------------------------------------------------------------------*/@\\ \mbox{}\verb@#ifndef SICSEVENT@\\ \mbox{}\verb@#define SICSEVENT@\\ -\mbox{}\verb@@$\langle$eFunc {\footnotesize ?}$\rangle$\verb@@\\ +\mbox{}\verb@@\hbox{$\langle\,$eFunc\nobreak\ {\footnotesize \NWlink{nuweb?}{?}}$\,\rangle$}\verb@@\\ \mbox{}\verb@@\\ -\mbox{}\verb@@$\langle$VE {\footnotesize ?}$\rangle$\verb@@\\ +\mbox{}\verb@@\hbox{$\langle\,$VE\nobreak\ {\footnotesize \NWlink{nuweb?}{?}}$\,\rangle$}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@/*--------------- Signals for the Signalfunction of each task ------------*/@\\ -\mbox{}\verb@@$\langle$VSIG {\footnotesize ?}$\rangle$\verb@ @\\ +\mbox{}\verb@@\hbox{$\langle\,$VSIG\nobreak\ {\footnotesize \NWlink{nuweb?}{?}}$\,\rangle$}\verb@ @\\ \mbox{}\verb@#endif@\\ -\mbox{}\verb@@$\diamond$ +\mbox{}\verb@@{\NWsep} \end{list} \vspace{-2ex} \end{minipage}\\[4ex] diff --git a/linux_def b/linux_def index 289d5b41..aec0e737 100644 --- a/linux_def +++ b/linux_def @@ -9,4 +9,4 @@ MFLAGS=-f $(SRC)makefile_linux$(DUMMY) SRC=$(SRC) -HDFROOT=/afs/.psi.ch/project/sinq/linux +HDFROOT=$(HOME) diff --git a/makefile_linux b/makefile_linux index 3e22c92b..10ab0ce9 100644 --- a/makefile_linux +++ b/makefile_linux @@ -6,9 +6,9 @@ # Markus Zolliker, March 2003 #========================================================================== # assign if the National Instrument GPIB driver is available -NI= -DHAVENI -NIOBJ= nigpib.o -NILIB=$(SINQDIR)/linux/lib/cib.o +#NI= -DHAVENI +#NIOBJ= nigpib.o +#NILIB=$(SINQDIR)/linux/lib/cib.o # The variable SRC is needed for the case, where source and objects are # separated. In the case where objects are mixed up with sources, SRC @@ -27,9 +27,9 @@ EXTRA=nintf.o SUBLIBS = psi/libpsi.a psi/hardsup/libhlib.a matrix/libmatrix.a \ psi/tecs/libtecsl.a LIBS = -static -L$(HDFROOT)/lib $(SUBLIBS) $(NILIB)\ - -ltcl8.3 $(HDFROOT)/lib/libhdf5.a \ + -ltcl8.4 $(HDFROOT)/lib/libhdf5.a \ $(HDFROOT)/lib/libmfhdf.a $(HDFROOT)/lib/libdf.a \ - $(HDFROOT)/lib/libjpeg.a -ldl -lz -lm -ll -lc + $(HDFROOT)/lib/libjpeg.a -ldl -lz -lm -lc include $(SRC)make_gen diff --git a/motor.c b/motor.c index dd153064..6eb25e61 100644 --- a/motor.c +++ b/motor.c @@ -230,6 +230,10 @@ static int checkPosition(pMotor self, SConnection *pCon) self->fPosition = fHard; if(absf(fHard - self->fTarget) > ObVal(self->ParArray,PREC)) { + if(SCGetInterrupt(pCon) != eContinue) + { + return HWFault; + } snprintf(pBueffel,131,"WARNING: %s off position by %f", self->name, absf(fHard - self->fTarget)); SCWrite(pCon,pBueffel, eWarning); diff --git a/rs232controller.c b/rs232controller.c index 6e94c5cc..924fc928 100644 --- a/rs232controller.c +++ b/rs232controller.c @@ -520,6 +520,7 @@ int RS232Action(SConnection *pCon, SicsInterp *pSics, prs232 self = NULL; char pError[256]; char pBuffer[8192], pReply[8192]; + char pTerm[10]; char *pPtr = NULL; int iRet, iRead = 8191, count, i; @@ -576,11 +577,15 @@ int RS232Action(SConnection *pCon, SicsInterp *pSics, else if(strcmp(argv[1],"replyterminator") == 0) { if(checkSet(pCon,argc,usMugger)) - { - pPtr = decodeTerminator(argv[2]); - setRS232ReplyTerminator(self,pPtr); - if(pPtr) - free(pPtr); + { + memset(pTerm,0,10); + for(i = 2; i < argc;i++){ + pPtr = decodeTerminator(argv[i]); + pTerm[i-2] = pPtr[0]; + if(pPtr) + free(pPtr); + } + setRS232ReplyTerminator(self,pTerm); SCSendOK(pCon); return 1; } diff --git a/ttest.tcl b/ttest.tcl index 1a7daf58..6f4b0dfb 100644 --- a/ttest.tcl +++ b/ttest.tcl @@ -7,8 +7,7 @@ # O P T I O N S # --------------- Initialize Tcl internals -------------------------------- -set auto_path "/data/koenneck/src/sics/tcl" -source $auto_path/topsicom.tcl +set root /home/koenneck/psi/sics # first all the server options are set @@ -25,7 +24,7 @@ ServerOption ReadUserPasswdTimeout 500000 # time to wiat for a user/passwd to be sent from a client. Increase this # if there is a problem connecting to a server due to network overload\ -ServerOption ServerLogBaseName /data/koenneck/src/sics/server +ServerOption ServerLogBaseName $root/server # the path and base name of the internal server logfile to which all # activity will be logged. @@ -37,7 +36,7 @@ ServerOption InterruptPort 2913 # The UDP port where the server will wait for Interrupts from clients. # Obviously, clients wishing to interrupt need to know this number. -ServerOption DefaultTclDirectory /data/koenneck/src/sics/tcl +ServerOption DefaultTclDirectory $root/tcl ServerOption DefaultCommandFile topsicom.tcl #--------------------------------------------------------------------------- @@ -77,16 +76,12 @@ User "Daniel_the_Clementine" #MakeCounter counter EL737 lnsp22.psi.ch 4000 4 -MakeDrive -Publish scan User -Publish otUnknown User -MakeRuenBuffer - #MakeRS232Controller marcel psxtemp 3004 MakeRS232Controller pfiff psts227 3009 pfiff sendterminator 0x0 -pfiff replyterminator 0x10 +pfiff replyterminator 0x72 0x77 + Publish pfiffread Spy source pfiff.tcl