diff --git a/conman.c b/conman.c index 150bfefb..4775f0c3 100644 --- a/conman.c +++ b/conman.c @@ -776,12 +776,14 @@ extern pServer pServ; return 1; } /*------------------------------------------------------------------------*/ - int SCWriteUUencoded(SConnection *pCon, char *pName, void *pData, int iDataLen) + int SCWriteUUencoded(SConnection *pCon, char *pName, void *pData, + int iDataLen) { void *pPtr = NULL; int iLength = 0; - int iRet; + int iRet = 1; FILE *fd; + char *pTest; iRet = UUencodeBuffer(pData,iDataLen,pName, &pPtr, &iLength); if(iRet != 1) @@ -789,12 +791,12 @@ extern pServer pServ; SCWrite(pCon,"ERROR: no memory for uuencoder",eError); return 0; } - + pTest = (char *)pPtr; + /* the uuencoder ensures proper telnet */ if(pCon->iTelnet) { NETWrite(pCon->pSock,pPtr,iLength); - /* printf("Writing %d uuencoded characters\n",iLength); */ } else { @@ -808,7 +810,7 @@ extern pServer pServ; #endif free(pPtr); - return 1; + return iRet; } /*-------------------------------------------------------------------------*/ int SCSendOK(SConnection *self) diff --git a/danu.dat b/danu.dat index 0140f812..507524c9 100644 --- a/danu.dat +++ b/danu.dat @@ -1,3 +1,3 @@ - 5424 + 5437 NEVER, EVER modify or delete this file You'll risk eternal damnation and a reincarnation as a cockroach!|n \ No newline at end of file diff --git a/difrac/COMDIF b/difrac/COMDIF index e86411b6..038e02a6 100644 --- a/difrac/COMDIF +++ b/difrac/COMDIF @@ -15,7 +15,7 @@ $ BGRD2,NATT,AS,BS,CS,PA,PM,QTIME,TMAX,AFRAC, $ ATTEN(6) COMMON /PROFL/ ACOUNT(10*NSIZE),D12,ILOW,IHIGH,IDEL,IWARN,SUM, - $ FRAC1,IPRFLG,IAUTO,STEPOF,FRAC,PJUNK(9) + $ FRAC1,IPRFLG,IAUTO,STEPOF,FRAC,PJUNK(9),NPK COMMON /CUTOFF/ ISYS,SINABS(6),ILN,DELAY,STEP,IUPDWN,ISTOP, $ CJUNK(8) COMMON /CELL/ SR(3,3),SSG(3,3),GI(3,3),AP(3),APS(3),SANGS(3), diff --git a/difrac/begin.f b/difrac/begin.f index aaa11e0d..a26b7876 100644 --- a/difrac/begin.f +++ b/difrac/begin.f @@ -1,7 +1,7 @@ C----------------------------------------------------------------------- C This subroutine reads the info necessary to start the data collection C at the start of data collection and at each new segment -C Modofied to give output to ITP-->SICS, MK +C Modified to give output to ITP-->SICS, MK C----------------------------------------------------------------------- SUBROUTINE BEGIN INCLUDE 'COMDIF' diff --git a/difrac/centre.f b/difrac/centre.f index facbbb91..7b43362c 100644 --- a/difrac/centre.f +++ b/difrac/centre.f @@ -2,14 +2,23 @@ C----------------------------------------------------------------------- C Routine to align one circle by accumulating a distribution C of intensity values against degrees & then C finding the median of the distribution. +C +C Modifications: Mark Koennecke, April 2000 +C Added code for doing PH optimizations as well. +C Added code for monitoring the centering process as well. +C When a peak is not found, drive back to start and give an FP error +C code instead of an FF. Then the alignement of another circle +C might resolve the issue. C----------------------------------------------------------------------- SUBROUTINE CENTRE (DX,ANG,ISLIT) INCLUDE 'COMDIF' DIMENSION XA(100),YA(100),AN(4),ST(4),ANG(4) - CHARACTER ANGLE(3)*6 - DATA ANGLE/'2theta','Omega','Chi'/ + CHARACTER ANGLE(4)*6 + DATA ANGLE/'2theta','Omega','Chi','PH'/ INTEGER IRUPT NATT = 0 +C------- a debug flag! Set to 0 for no debug output + IDEBUG = 1 C----------------------------------------------------------------------- C If CAD-4 call the scan fitting version of the routine C----------------------------------------------------------------------- @@ -30,6 +39,7 @@ C----------------------------------------------------------------------- IF (KI .EQ. 'ST') N = 1 IF (KI .EQ. 'SO') N = 2 IF (KI .EQ. 'SC') N = 3 + IF (KI .EQ. 'SP') N = 4 ICHI = 0 IF (ST(3) .GE. 350.0 .OR. ST(3) .LE. 10.0) ICHI = 1 IPHI = 0 @@ -67,6 +77,11 @@ C----------------------------------------------------------------------- RETURN ENDIF CALL CCTIME (PRESET,COUNT) + IF(IDEBUG .EQ. 1)THEN + WRITE(COUT,20000),AN(1),AN(2),AN(3),AN(4),COUNT +20000 FORMAT('TH = ',F8.2,' OM = ',F8.2,' CH = ',F8.2,' PH = ' F8.2, + & ' CTS = ', F8.2) + ENDIF CALL KORQ(IRUPT) IF(IRUPT .NE. 1) THEN WRITE (COUT,10000) @@ -154,11 +169,18 @@ C----------------------------------------------------------------------- IF (IMAX .EQ. 100 .AND. AFRAC*MAX .GT. MIN) GO TO 100 C----------------------------------------------------------------------- C Case 2. There is no significant peak. +C +C Modified: Drive back to start positions. So that other circle centering +C will not fail. +C Modified error code to give an FP in order to decide between +C interrupt and bad peak. +C Mark Koennecke, April 2000 C----------------------------------------------------------------------- IF (ILOW .LT. 1 .OR. IHIGH .GT. 100) THEN WRITE (COUT,11000) ANGLE(N),ILOW,IHIGH CALL GWRITE (ITP,' ') - KI = 'FF' + KI = 'FP' + CALL ANGSET(ST(1),ST(2),ST(3),ST(4),IA,IC) RETURN ENDIF C----------------------------------------------------------------------- diff --git a/difrac/difini.f b/difrac/difini.f index 49e7940c..84ea49b8 100644 --- a/difrac/difini.f +++ b/difrac/difini.f @@ -240,7 +240,7 @@ C----------------------------------------------------------------------- $ RTHETA,ROMEGA,RCHI,RPHI/4*0.0/, IH,IK,IL/1,2,3/ DATA IDH/72*0/, IBSECT,ISCAN/2*0/, FRAC/0.1/, IPRFLG/0/, $ ISYS/1/, SINABS/3*0.00503135,3*0.0/, ILN/0/, DELAY/100/ - DATA COUT/20*' '/,IWNCUR/0/,ISREG/1,1,1,7*0/ + DATA COUT/20*' '/,IWNCUR/0/,ISREG/1,1,1,0,0,0,0,0,1,0/ DATA STEP/0.02/,PRESET/15000./DPHI/0./ RETURN END diff --git a/difrac/difint.f b/difrac/difint.f index 949585d3..e40a6932 100644 --- a/difrac/difint.f +++ b/difrac/difint.f @@ -20,7 +20,7 @@ C---------------------------------------------------------------------- C Disabling some unsupported commands for TRICS C---------------------------------------------------------------------- IF(KI .EQ. 'AD' .OR. KI .EQ. 'LT' .OR. KI .EQ. 'SH' .OR. - $ KI .EQ. 'IN' .OR. KI .EQ. 'NR' .OR. KI .EQ. 'SW' .OR. + $ KI .EQ. 'IN' .OR. KI .EQ. 'NR' .OR. $ KI .EQ. 'EK' .OR. KI .EQ. 'FI' .OR. KI .EQ. 'KE' .OR. $ KI .EQ. 'MR' .OR. KI .EQ. 'MS')THEN WRITE(COUT,23000) diff --git a/difrac/indmes.f b/difrac/indmes.f index 5be62352..d33b3335 100644 --- a/difrac/indmes.f +++ b/difrac/indmes.f @@ -387,7 +387,7 @@ C----------------------------------------------------------------------- ATT = ATTEN(NATT+1) IF (IPRFLG .EQ. 0) THEN if(FRAC1 .GT. 0.01) THEN - PEAK = ATT*(SUM - 0.5*(BGRD1 + BGRD2)/FRAC1) + PEAK = ATT*(SUM - (0.5*(BGRD1 + BGRD2)/FRAC1)*NPK) ELSE PEAK = 0. END IF diff --git a/difrac/profil.f b/difrac/profil.f index e813c335..47f9bf1c 100644 --- a/difrac/profil.f +++ b/difrac/profil.f @@ -257,9 +257,6 @@ C----------------------------------------------------------------------- DO 220 I = 1,ILOW-1 B1 = B1 + ACOUNT(I) 220 CONTINUE -C---mk - B1 = B1/ILOW -C--- ENDIF FRAC1 = (FRAC*NP + ILOW - 1)/NPK PEAK = 0.0 @@ -271,12 +268,9 @@ C--- DO 230 I = IHIGH+1,NP B2 = B2 + ACOUNT(I) 230 CONTINUE - IDIV = NP - IHIGH - IF(IDIV .LE. 0)IDIV =1 - B2 = B2/IDIV ENDIF FRAC2 = (FRAC*NP + NP - IHIGH)/NPK - BTOT = 0.5*(B1/FRAC1 + B2/FRAC2)*NP + BTOT = 0.5*(B1/FRAC1 + B2/FRAC2) TOP1 = PEAK - BTOT BOT1 = SQRT(PEAK + 0.25*(B1/(FRAC1*FRAC1) + B2/(FRAC2*FRAC2))) FRAC1 = 0.5*(FRAC1 + FRAC2) @@ -306,7 +300,9 @@ C----------------------------------------------------------------------- CALL GWRITE (ITP,' ') ENDIF 240 CALL RSW(9,JSW) - IF (JSW .NE. 0 .and. istan .ne. 0) CALL PRFWRT (NP) +C------- always write profile at TRICS! +C IF (JSW .NE. 0 .and. istan .ne. 0) CALL PRFWRT (NP) + CALL PRFWRT (NP) C----------------------------------------------------------------------- C Prepare the profile for display on the c.r.t. if wanted C Code below here is not needed for profile analysis diff --git a/difrac/sammes.f b/difrac/sammes.f index 08d71286..1499533f 100644 --- a/difrac/sammes.f +++ b/difrac/sammes.f @@ -113,3 +113,4 @@ C----------------------------------------------------------------------- 210 CONTINUE RETURN END + diff --git a/difrac/trics.f b/difrac/trics.f index 3c1a16e3..2e03d00e 100644 --- a/difrac/trics.f +++ b/difrac/trics.f @@ -145,6 +145,7 @@ C RSW Read the switch register C----------------------------------------------------------------------- SUBROUTINE RSW (N,IVALUE) INCLUDE 'COMDIF' + IVALUE = ISREG(N) RETURN END C----------------------------------------------------------------------- diff --git a/difrac/wxw2t.f b/difrac/wxw2t.f index cf57ac96..d392eb6c 100644 --- a/difrac/wxw2t.f +++ b/difrac/wxw2t.f @@ -8,7 +8,13 @@ C----------------------------------------------------------------------- SUBROUTINE WXW2T (DT,DO,DC,ISLIT) INCLUDE 'COMDIF' DIMENSION ANG(4) - CALL SHUTTR (99) + CALL SHUTTR (99) +C----- a fixed value for PHI alignement, MK + DP = .1 +C----- debug message: MK + WRITE(COUT,22)DT, DO, DC + 22 FORMAT('STEP OM: ',F8.2,' Step TH: ',F8.2,' Step CH: ',F8.2) + CALL GWRITE(ITP,' ') C----------------------------------------------------------------------- C For the CAD-4 centering is as follows :-- C 1. an omega/2theta scan with the 4mm variable slit, @@ -43,17 +49,25 @@ C----------------------------------------------------------------------- CALL CENTRE (DC,ANG,0) IF (KI .EQ. 'FF') GO TO 100 C----------------------------------------------------------------------- +C Align Phi +C---------------------------------------------------------------------- + KI = 'SP' + CALL CENTRE(DP,ANG,0) + IF (KI .EQ. 'FF') GO TO 100 +C----------------------------------------------------------------------- C Omega again C----------------------------------------------------------------------- KI = 'SO' CALL CENTRE (DO,ANG,0) IF (KI .EQ. 'FF') GO TO 100 + IF (KI .EQ. 'FP') GO TO 100 C----------------------------------------------------------------------- C Align 2Theta C---------------------------------------------------------------------- KI = 'ST' CALL CENTRE (DT,ANG,0) IF (KI .EQ. 'FF') GO TO 100 + IF (KI .EQ. 'FP') GO TO 100 ENDIF C----------------------------------------------------------------------- C The answers are passed in BPSI in COMMON diff --git a/evcontroller.c b/evcontroller.c index 2c93dce7..bcbf1b9f 100644 --- a/evcontroller.c +++ b/evcontroller.c @@ -185,6 +185,9 @@ /* get the current position */ iRet = self->pDriv->GetValue(self->pDriv,&fPos); + + printf("Return: %d Value: %f\n",iRet,fPos); + if(iRet == 0) { self->pDriv->GetError(self->pDriv,&iCode, pError,131); diff --git a/hkl.c b/hkl.c index 4dadc1e6..79649cea 100644 --- a/hkl.c +++ b/hkl.c @@ -442,7 +442,8 @@ z[i] = self->fUB[ii]*fHKL[0] + self->fUB[ii+1]*fHKL[1] + self->fUB[ii+2]*fHKL[2]; } - + + /* bissecting calculation! */ if(!self->iNOR) { /* four circle calculation */ @@ -590,7 +591,7 @@ } /* end four circle */ else { - /* start normal beam calculation */ + /* start normal bissecting calculation */ /* ignore psi values */ d2 = 0.; for(i = 0; i < 3; i++) @@ -634,7 +635,8 @@ } } /*-------------------------------------------------------------------------*/ - int CalculateSettings(pHKL self, float fHKL[3], float fPsi, int iHamil, +/* This may become dead code if the looping show does not work */ + int CulculuteSettings(pHKL self, float fHKL[3], float fPsi, int iHamil, float fSet[4], SConnection *pCon) { int iRet, iSuccess = 0, iRes = 1, iRetry = 1; @@ -678,7 +680,8 @@ if(!iTest) { /* this cannot be fixed */ - sprintf(pBueffel,"ERROR: %4.1f, %4.1f, %4.1f, %5.2f violates two theta limits", + sprintf(pBueffel, + "ERROR: %4.1f, %4.1f, %4.1f, %5.2f violates two theta limits", fSet[0], fHKL[0], fHKL[1],fHKL[2]); SCWrite(pCon,pBueffel,eError); return 0; @@ -708,7 +711,8 @@ else { /* this cannot be fixed */ - sprintf(pBueffel,"ERROR: %4.1f, %4.1f, %4.1f, %5.2f violates omega limits", + sprintf(pBueffel, + "ERROR: %4.1f, %4.1f, %4.1f, %5.2f violates omega limits", fSet[1], fHKL[0], fHKL[1],fHKL[2]); SCWrite(pCon,pBueffel,eError); return 0; @@ -774,6 +778,113 @@ } return 1; } +/*------------------------------------------------------------------------- + calculates the four circle settings. If the position can not be reached + because of a limit violation, then psi is rotated in 10 degree steps + until either the loop ends or we finally succed. +*/ + int CalculateSettings(pHKL self, float fHKL[3], float fPsi, int iHamil, + float fSet[4], SConnection *pCon) + { + int iRet,iRetry, i; + int iQuad = 0; + int iTest; + float fDelom = 0.; + char pError[132]; + char pBueffel[512]; + float fHard; + float fVal; + float myPsi = fPsi; + + /* catch shitty input */ + if( (fHKL[0] == 0.) && (fHKL[1] == 0.) && (fHKL[2] == 0.)) + { + SCWrite(pCon,"ERROR: I will not calculate angles for HKL = (0,0,0) ", + eError); + return 0; + } + + /* no retries if normal beam calculation + or specific Hamilton or specific + psi requested */ + if( (self->iNOR) || (iHamil != 0) || (myPsi > 0.1) ) + { + iRetry = 1; + } + else + { + iRetry = 35; + } + + /* loop till success */ + for(i = 0, myPsi = 0.; i < iRetry; i++, myPsi += 10.); + { + /* just try it*/ + iRet = ICAL(self,fHKL, myPsi, iHamil, self->iQuad,fSet,fDelom); + if(iRet < 0 ) /* could not do it */ + { + sprintf(pBueffel,"ERROR: cannot calculate %4.1f %4.1f %4.1f", + fHKL[0], fHKL[1], fHKL[2]); + SCWrite(pCon,pBueffel,eError); + return 0; + } + + /* check two theta */ + iTest = MotorCheckBoundary(self->pTheta,fSet[0], &fHard,pError,131); + if(!iTest) + { + /* this cannot be fixed */ + sprintf(pBueffel, + "ERROR: %4.1f, %4.1f, %4.1f, %5.2f violates two theta limits", + fSet[0], fHKL[0], fHKL[1],fHKL[2]); + SCWrite(pCon,pBueffel,eError); + return 0; + } + + /* check nu and omega if normal beam */ + if(self->iNOR) + { + /* check omega */ + iTest = MotorCheckBoundary(self->pOmega,fSet[1], &fHard,pError,131); + iTest += MotorCheckBoundary(self->pNu,fSet[2], &fHard,pError,131); + if(iTest != 2) + { + sprintf(pBueffel, + "ERROR: %4.1f, %4.1f, %4.1f, %5.2f %5.2f %5.2f violates nu limits", + fHKL[0], fHKL[1],fHKL[2],fSet[0], fSet[1],fSet[2]); + SCWrite(pCon,pBueffel,eError); + return 0; + } + else + { + return 1; + } + } + + + /* check chi and phi and omega, but first put into 0-360 degrees */ + if(fSet[2] < 0.0) + { + fSet[2] = 360.0 + fSet[2]; + } + if(fSet[3] < 0.0) + { + fSet[3] = 360.0 + fSet[3]; + } + iTest = MotorCheckBoundary(self->pOmega,fSet[1], &fHard,pError,131); + iTest += MotorCheckBoundary(self->pChi,fSet[2], &fHard,pError,131); + iTest += MotorCheckBoundary(self->pPhi,fSet[4], &fHard,pError,131); + if(iTest == 3) /* none of them burns */ + { + return 1; + } + } + sprintf(pBueffel, + "ERROR: failed to find a possible setting for %4.1f %4.1f %4.1f %s", + fHKL[0], fHKL[1], fHKL[2], "\n Even tried 36 psi settings"); + SCWrite(pCon,pBueffel,eError); + return 0; + } /*-------------------------------------------------------------------------*/ int RunHKL(pHKL self, float fHKL[3], float fPsi, int iHamil, SConnection *pCon) diff --git a/lin2ang.c b/lin2ang.c index bff556b5..9c27371a 100644 --- a/lin2ang.c +++ b/lin2ang.c @@ -94,12 +94,14 @@ /*-----------------------------------------------------------------------*/ static float L2AGetValue(void *pData, SConnection *pCon) { - float fX; + float fX, zero = 0.; pLin2Ang self = NULL; self = (pLin2Ang)pData; assert(self); fX = self->lin->pDrivInt->GetValue(self->lin,pCon); + MotorGetPar(self->lin,"softzero",&zero); + fX -= zero; return x2ang(self,fX); } /*------------------------------------------------------------------------*/ diff --git a/macro.c b/macro.c index 1b2ca0db..d201ad1a 100644 --- a/macro.c +++ b/macro.c @@ -839,6 +839,7 @@ extern Tcl_Interp *InterpGetTcl(SicsInterp *pSics); Arg2Text(argc-1,&argv[1],pCommand,1023); iRet = InterpExecute(pSics,pCon,pCommand); + SicsWait(1); SCWrite(pCon,"TRANSACTIONFINISHED",eError); return iRet; } diff --git a/network.c b/network.c index 2f0d8c1b..f004ff71 100644 --- a/network.c +++ b/network.c @@ -359,7 +359,7 @@ CreateSocketAdress( iRet = send(self->sockid,buffer,lLen,0); if(iRet != lLen) { - /* puts("Incomplete send "); */ + printf("Incomplete send: %d to %d\n ",iRet,lLen); return 0; } else diff --git a/nserver.c b/nserver.c index 5da87e83..d75e3f48 100644 --- a/nserver.c +++ b/nserver.c @@ -427,7 +427,14 @@ lID = TaskRegister(pTask,WaitTask,WaitSignal,NULL,&sWait,1); TaskWait(pTask,lID); SetStatus(eOld); - return i; + if(SCGetInterrupt(pCon) != eContinue) + { + return 0; + } + else + { + return 1; + } } /*------------------------------------------------------------------------*/ int SicsWait(long lTime) diff --git a/sicsstatus.tcl b/sicsstatus.tcl index e2c80ff4..ef57d68a 100644 --- a/sicsstatus.tcl +++ b/sicsstatus.tcl @@ -129,7 +129,7 @@ phone setAccess 2 adress UNKNOWN adress setAccess 2 # Counter counter -counter SetPreset 120.000000 +counter SetPreset 1.000000 counter SetMode Timer # Motor som som SoftZero 0.000000 @@ -365,7 +365,7 @@ a1 InterruptMode 0.000000 a1 AccessCode 2.000000 user Joseph Stalin user setAccess 2 -sample Fischdosen +sample Wuergehals = doof, bloed und dumm sample setAccess 2 title Nasse Fische in Dosen title setAccess 2 diff --git a/tcl/scancom.tcl b/tcl/scancom.tcl index 6b3a9bf9..2d899358 100644 --- a/tcl/scancom.tcl +++ b/tcl/scancom.tcl @@ -352,8 +352,15 @@ proc sftime {} { proc scaninfo {} { set result [scan info] set r1 [sample] - set l1 [split $r1 "="] - append result "," [lindex $l1 1] + set inf [string first = $r1] + if {$inf > 0} { + incr inf + set sa [string range $r1 $inf end] + } else { + set sa Unknown + } + regsub -all , $sa " " sam + append result "," $sam append result "," [sicstime] set r1 [lastscancommand] set l1 [split $r1 "="] diff --git a/tecs/Makefile b/tecs/Makefile index ef971653..bd7b5ebe 100644 --- a/tecs/Makefile +++ b/tecs/Makefile @@ -5,11 +5,11 @@ #-------------------------------------------------------------------------- OBJ= tecs_cli.o coc_client.o coc_util.o err_handling.o \ str_util.o str_buf.o coc_server.o tecs_lsc.o tecs_serial.o \ - coc_logfile.o tecs_dlog.o + coc_logfile.o tecs_dlog.o #------------ for DigitalUnix CC=cc -CFLAGS= -std1 -g -c -warnprotos -I. -I../hardsup +CFLAGS= -std1 -g -c -warnprotos -I../ -I. -I../hardsup .c.o: $(CC) $(CFLAGS) $*.c @@ -19,7 +19,7 @@ tecs: $(OBJ) ar cr libtecsl.a $(OBJ) ranlib libtecsl.a - rm TecsServer - cc -o TecsServer -g tecs.c -lm -L. -ltecsl -L../hardsup -lhlib + cc -o TecsServer -g -I../ tecs.c -lm -L. -ltecsl -L../hardsup -lhlib clean: rm *.o diff --git a/tecs/coc_client.c b/tecs/coc_client.c index a52b0c68..545a6db4 100644 --- a/tecs/coc_client.c +++ b/tecs/coc_client.c @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/tecs/coc_logfile.c b/tecs/coc_logfile.c index 0df4fb74..cfe24ca0 100644 --- a/tecs/coc_logfile.c +++ b/tecs/coc_logfile.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "coc_logfile.h" #include "err_handling.h" #include "str_util.h" diff --git a/tecs/coc_server.c b/tecs/coc_server.c index a77713fd..b5e31078 100644 --- a/tecs/coc_server.c +++ b/tecs/coc_server.c @@ -19,6 +19,7 @@ #include "coc_logfile.h" #include "coc_server.h" #include "str_util.h" +#include static Str_Buf *buf, *bufo; diff --git a/tecs/coc_util.c b/tecs/coc_util.c index 73253bbd..216ba72c 100644 --- a/tecs/coc_util.c +++ b/tecs/coc_util.c @@ -7,6 +7,7 @@ #include #include #include +#include #include "err_handling.h" #include "str_util.h" #include "coc_util.h" diff --git a/tecs/err_handling.c b/tecs/err_handling.c index 06bec9c9..eafb75e2 100644 --- a/tecs/err_handling.c +++ b/tecs/err_handling.c @@ -2,7 +2,7 @@ #include #include #include - +#include #include "err_handling.h" #define SLEN 64 diff --git a/tecs/str_buf.c b/tecs/str_buf.c index aa135d9b..5c6ae052 100644 --- a/tecs/str_buf.c +++ b/tecs/str_buf.c @@ -4,6 +4,7 @@ #include #include #include +#include #include "err_handling.h" #include "str_util.h" #include "str_buf.h" diff --git a/tecs/str_util.c b/tecs/str_util.c index 9d4346ce..c8f8614a 100644 --- a/tecs/str_util.c +++ b/tecs/str_util.c @@ -7,6 +7,7 @@ #include #include #include +#include #include "err_handling.h" #include "str_util.h" diff --git a/tecs/tecs.c b/tecs/tecs.c index 117d65a7..07af6d2d 100644 --- a/tecs/tecs.c +++ b/tecs/tecs.c @@ -5,6 +5,7 @@ #include #include #include +#include #include "err_handling.h" #include "coc_server.h" #include "coc_logfile.h" diff --git a/tecs/tecs_cli.c b/tecs/tecs_cli.c index 22f87b70..e9feb642 100644 --- a/tecs/tecs_cli.c +++ b/tecs/tecs_cli.c @@ -1,5 +1,6 @@ #include #include +#include #include "err_handling.h" #include "str_util.h" #include "tecs_cli.h" diff --git a/tecs/tecs_dlog.c b/tecs/tecs_dlog.c index ddca50cf..df72ec09 100644 --- a/tecs/tecs_dlog.c +++ b/tecs/tecs_dlog.c @@ -7,6 +7,7 @@ #include #include #include +#include #include "err_handling.h" #include "str_util.h" #include "tecs_dlog.h" diff --git a/tecs/tecs_lsc.c b/tecs/tecs_lsc.c index adb1bd35..f2ce8d95 100644 --- a/tecs/tecs_lsc.c +++ b/tecs/tecs_lsc.c @@ -3,6 +3,7 @@ #include #include #include +#include #include "err_handling.h" #include "coc_logfile.h" #include "coc_util.h" diff --git a/tecs/tecs_serial.c b/tecs/tecs_serial.c index 6b0049b6..9ed02006 100644 --- a/tecs/tecs_serial.c +++ b/tecs/tecs_serial.c @@ -1,6 +1,7 @@ #include #include +#include #include "rs232c_def.h" #include "asynsrv_def.h" #include "sinq_prototypes.h" diff --git a/test.tcl b/test.tcl index d0e29f2e..856803a2 100644 --- a/test.tcl +++ b/test.tcl @@ -34,10 +34,10 @@ ServerOption LogFileBaseName $shome/sics/tmp/server # the path and base name of the internal server logfile to which all # activity will be logged. -ServerOption TecsStartCmd "/data/zolliker/cvs/sics/tecs/TecsServer -h lnsp26:4000/0" +ServerOption TecsStartCmd "tecs/TecsServer -h lnsp21:4000/7" # -h host:port/channel is for serial server -ServerOption TecsBinDir /data/zolliker/cvs/sics/tecs/bin/ -ServerOption TecsLogDir /data/zolliker/cvs/sics/tecs/log/ +ServerOption TecsBinDir tecs/bin/ +ServerOption TecsLogDir /data/koenneck/tmp/ ServerOption TecsPort 9753 ServerOption statusfile sicsstatus.tcl @@ -295,8 +295,8 @@ MakeDifrac twotheta omega chi phi counter ClientPut "Installed 4-circle stuff" -source transact.tcl -Publish transact Spy +#source transact.tcl +#Publish transact Spy #MakeSPS suff lnsp26.psi.ch 4000 7 #source beamdt.tcl @@ -378,3 +378,5 @@ MakeXYTable omth Publish info user MakeLin2Ang a5l a5 + +source tmp/beam.tcl diff --git a/uubuffer.c b/uubuffer.c index 5005f268..0fbd804e 100644 --- a/uubuffer.c +++ b/uubuffer.c @@ -135,7 +135,7 @@ /* do the header */ ReadWrite(&sWrite,"begin 622 "); ReadWrite(&sWrite,pName); - ReadWrite(&sWrite,"\r\n"); + ReadWrite(&sWrite," \r\n"); /* well, do it */ for( ; ;) @@ -158,9 +158,9 @@ } /* finish the game */ - ReadWrite(&sWrite,"end\r\n"); + ReadWrite(&sWrite,"end \r\n"); *pEncoded = sWrite.pPtr; *iLength = sWrite.iBufPtr; return 1; } - \ No newline at end of file +