- Fix to AMOR s2t, wrong reading corrected

- Some problems at TASP with polarisation resolved
This commit is contained in:
cvs
2002-08-23 11:35:56 +00:00
parent 85f7fc212e
commit dfc8c8e28c
19 changed files with 237 additions and 921 deletions

View File

@ -49,7 +49,8 @@ SOBJ = network.o ifile.o conman.o SCinter.o splitter.o passwd.o \
tasinit.o tasutil.o t_rlp.o t_conv.o d_sign.o d_mod.o \ tasinit.o tasutil.o t_rlp.o t_conv.o d_sign.o d_mod.o \
tasdrive.o tasscan.o synchronize.o definealias.o swmotor.o t_update.o \ tasdrive.o tasscan.o synchronize.o definealias.o swmotor.o t_update.o \
hmcontrol.o userscan.o slsmagnet.o rs232controller.o lomax.o \ hmcontrol.o userscan.o slsmagnet.o rs232controller.o lomax.o \
polterwrite.o fourlib.o motreg.o motreglist.o anticollider.o polterwrite.o fourlib.o motreg.o motreglist.o anticollider.o \
s_rnge.o sig_die.o
MOTOROBJ = motor.o el734driv.o simdriv.o el734dc.o pipiezo.o pimotor.o MOTOROBJ = motor.o el734driv.o simdriv.o el734dc.o pipiezo.o pimotor.o
COUNTEROBJ = countdriv.o simcter.o counter.o COUNTEROBJ = countdriv.o simcter.o counter.o

View File

@ -475,32 +475,21 @@
{ {
float fVal, fMOM, fResult; float fVal, fMOM, fResult;
int iRet; int iRet;
pIDrivable pDriv = NULL;
pAmor2T self = (pAmor2T) pData; pAmor2T self = (pAmor2T) pData;
assert(self); assert(self);
/* get COM */ /* get COM */
pDriv = self->aEngine[MOTCOM]->pDescriptor->GetInterface( iRet = MotorGetSoftPosition(self->aEngine[MOTCOM], pCon, &fVal);
self->aEngine[MOTCOM],DRIVEID); if(!iRet)
if(pDriv)
{ {
fVal = pDriv->GetValue(self->aEngine[MOTCOM],pCon); return -9999.99;
if(fVal < -9000)
{
return fVal;
}
} }
/* get MOM */ /* get MOM */
pDriv = self->aEngine[MOTCOM]->pDescriptor->GetInterface( iRet = MotorGetSoftPosition(self->aEngine[MOTMOM], pCon, &fMOM);
self->aEngine[MOTMOM],DRIVEID); if(!iRet)
if(pDriv)
{ {
fMOM = pDriv->GetValue(self->aEngine[MOTMOM],pCon); return -9999.99;
if(fMOM < -9000)
{
return fMOM;
}
} }
/* retrocalculate 2 theta */ /* retrocalculate 2 theta */
@ -512,21 +501,15 @@
{ {
float fVal, fMOM, fResult; float fVal, fMOM, fResult;
int iRet; int iRet;
pIDrivable pDriv = NULL;
pAmor2T self = (pAmor2T) pData; pAmor2T self = (pAmor2T) pData;
assert(self); assert(self);
/* get AOM */ /* get AOM */
pDriv = self->aEngine[MOTAOM]->pDescriptor->GetInterface( iRet = MotorGetSoftPosition(self->aEngine[MOTAOM], pCon, &fVal);
self->aEngine[MOTAOM],DRIVEID); if(!iRet)
if(pDriv)
{ {
fVal = pDriv->GetValue(self->aEngine[MOTAOM],pCon); return -9999.99;
if(fVal < -9000)
{
return fVal;
}
} }
return 2. * fVal; return 2. * fVal;

View File

@ -1,3 +1,3 @@
231 233
NEVER, EVER modify or delete this file NEVER, EVER modify or delete this file
You'll risk eternal damnation and a reincarnation as a cockroach!|n You'll risk eternal damnation and a reincarnation as a cockroach!|n

View File

@ -227,8 +227,7 @@
iRet = ServerSetupInterrupt(iPort,pReader,self->pTasker); iRet = ServerSetupInterrupt(iPort,pReader,self->pTasker);
if(!iRet) if(!iRet)
{ {
StopServer(self); SCWrite(pCon,"WARNING: UDP interrupt port not initialized",eWarning);
return 0;
} }
/* install a secret fully priviledged entry point for ME */ /* install a secret fully priviledged entry point for ME */
AddUser("Achterbahn","Kiel",usInternal); AddUser("Achterbahn","Kiel",usInternal);

View File

@ -691,6 +691,15 @@
return 0; return 0;
} }
iStat = SNputdata1(Nfil,"Monitor",NX_INT32,1, &iVal); iStat = SNputdata1(Nfil,"Monitor",NX_INT32,1, &iVal);
/*
count time
*/
fVal = GetHistCountTime(pHist,pCon);
SNputdata1att(Nfil,"time",NX_FLOAT32,1,&fVal,"Units","seconds");
/*
more monitors
*/
iVal = GetHistMonitor(pHist, 0, pCon); iVal = GetHistMonitor(pHist, 0, pCon);
SNputdata1(Nfil,"beam_monitor",NX_INT32,1, &iVal); SNputdata1(Nfil,"beam_monitor",NX_INT32,1, &iVal);
iVal = GetHistMonitor(pHist, 4, pCon); iVal = GetHistMonitor(pHist, 4, pCon);

32
s_rnge.c Normal file
View File

@ -0,0 +1,32 @@
#include "stdio.h"
#include "f2c.h"
#ifdef __cplusplus
extern "C" {
#endif
/* called when a subscript is out of range */
#ifdef KR_headers
extern VOID sig_die();
integer s_rnge(varn, offset, procn, line) char *varn, *procn; ftnint offset, line;
#else
extern VOID sig_die(char*,int);
integer s_rnge(char *varn, ftnint offset, char *procn, ftnint line)
#endif
{
register int i;
fprintf(stderr, "Subscript out of range on file line %ld, procedure ",
(long)line);
while((i = *procn) && i != '_' && i != ' ')
putc(*procn++, stderr);
fprintf(stderr, ".\nAttempt to access the %ld-th element of variable ",
(long)offset+1);
while((i = *varn) && i != ' ')
putc(*varn++, stderr);
sig_die(".", 1);
return 0; /* not reached */
}
#ifdef __cplusplus
}
#endif

View File

@ -1,75 +1,48 @@
yfactor 1.420000 a5l.length 80.000000
yfactor setAccess 1 flightpathlength 0.000000
xfactor 0.715000 flightpathlength setAccess 1
xfactor setAccess 1 flightpath 0.000000
ps.listfile peaksearch.dat flightpath setAccess 1
ps.listfile setAccess 2 delay 2500.000000
ps.scansteps 24 delay setAccess 1
ps.scansteps setAccess 2 hm CountMode timer
ps.scanpreset 1000000.000000 hm preset 100.000000
ps.scanpreset setAccess 2 hm genbin 120.000000 35.000000 512
ps.preset 1000.000000 hm init
ps.preset setAccess 2 datafile focus-1001848.hdf
ps.countmode monitor datafile setAccess 3
ps.countmode setAccess 2
ps.cogcontour 0.200000
ps.cogcontour setAccess 2
ps.cogwindow 60
ps.cogwindow setAccess 2
ps.window 7
ps.window setAccess 2
ps.steepness 3
ps.steepness setAccess 2
ps.threshold 30
ps.threshold setAccess 2
ps.sttstep 3.000000
ps.sttstep setAccess 2
ps.sttend 70.000000
ps.sttend setAccess 2
ps.sttstart 5.000000
ps.sttstart setAccess 2
ps.omstep 3.000000
ps.omstep setAccess 2
ps.omend 30.000000
ps.omend setAccess 2
ps.omstart 0.000000
ps.omstart setAccess 2
ps.chistep 12.000000
ps.chistep setAccess 2
ps.chiend 180.000000
ps.chiend setAccess 2
ps.chistart 0.000000
ps.chistart setAccess 2
ps.phistep 3.000000
ps.phistep setAccess 2
ps.phiend 180.000000
ps.phiend setAccess 2
ps.phistart 0.000000
ps.phistart setAccess 2
hm3 CountMode timer
hm3 preset 10.000000
hm2 CountMode timer hm2 CountMode timer
hm2 preset 10.000000 hm2 preset 10.000000
hm1 CountMode timer hm1 CountMode timer
hm1 preset 10.000000 hm1 preset 10.000000
dbfile UNKNOWN
dbfile setAccess 2
# Motor th
th sign 1.000000
th SoftZero 0.000000
th SoftLowerLim 4.000000
th SoftUpperLim 113.000000
th Fixed -1.000000
th InterruptMode 0.000000
th AccessCode 2.000000
#Crystallographic Settings #Crystallographic Settings
hkl lambda 1.179000 hkl lambda 1.179000
hkl setub -0.017880 -0.074923 0.028280 -0.007008 -0.036800 -0.057747 0.160912 -0.009928 0.000627 hkl setub -0.017880 -0.074923 0.028280 -0.007008 -0.036800 -0.057747 0.160912 -0.009928 0.000627
hkl hm 0 hkl hm 0
detdist3 0.000000 det3dist 300.000000
detdist3 setAccess 1 det3dist setAccess 1
det3zeroy 128.000000 det3zeroy 128.000000
det3zeroy setAccess 1 det3zeroy setAccess 1
det3zerox 128.000000 det3zerox 128.000000
det3zerox setAccess 1 det3zerox setAccess 1
detdist2 0.000000 det2dist 300.000000
detdist2 setAccess 1 det2dist setAccess 1
det2zeroy 128.000000 det2zeroy 128.000000
det2zeroy setAccess 1 det2zeroy setAccess 1
det2zerox 128.000000 det2zerox 128.000000
det2zerox setAccess 1 det2zerox setAccess 1
detdist1 0.000000 det1dist 300.000000
detdist1 setAccess 1 det1dist setAccess 1
det1zeroy 128.000000 det1zeroy 128.000000
det1zeroy setAccess 1 det1zeroy setAccess 1
det1zerox 128.000000 det1zerox 128.000000
@ -176,6 +149,8 @@ twotheta InterruptMode 0.000000
twotheta AccessCode 2.000000 twotheta AccessCode 2.000000
lastscancommand cscan a4 10. .1 10 5 lastscancommand cscan a4 10. .1 10 5
lastscancommand setAccess 2 lastscancommand setAccess 2
banana CountMode timer
banana preset 20.000000
sample_mur 0.000000 sample_mur 0.000000
sample_mur setAccess 2 sample_mur setAccess 2
email UNKNOWN email UNKNOWN
@ -187,7 +162,7 @@ phone setAccess 2
adress UNKNOWN adress UNKNOWN
adress setAccess 2 adress setAccess 2
# Counter counter # Counter counter
counter SetPreset 1.000000 counter SetPreset 20.000000
counter SetMode Timer counter SetMode Timer
# Motor som # Motor som
som sign 1.000000 som sign 1.000000
@ -453,6 +428,8 @@ a1 SoftUpperLim 120.000000
a1 Fixed -1.000000 a1 Fixed -1.000000
a1 InterruptMode 0.000000 a1 InterruptMode 0.000000
a1 AccessCode 2.000000 a1 AccessCode 2.000000
batchroot /data/koenneck/src/sics
batchroot setAccess 2
user Uwe Filges user Uwe Filges
user setAccess 2 user setAccess 2
sample D20 30K SNP Okt 2001 GS sample D20 30K SNP Okt 2001 GS

53
sig_die.c Normal file
View File

@ -0,0 +1,53 @@
#include "stdio.h"
#include "signal.h"
#ifndef SIGIOT
#ifdef SIGABRT
#define SIGIOT SIGABRT
#endif
#endif
#ifdef KR_headers
void sig_die(s, kill) register char *s; int kill;
#else
#include "stdlib.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
extern "C" {
#endif
void f_exit(void){
exit(0);
}
void sig_die(register char *s, int kill)
#endif
{
/* print error message, then clear buffers */
fprintf(stderr, "%s\n", s);
if(kill)
{
fflush(stderr);
f_exit();
fflush(stderr);
/* now get a core */
#ifdef SIGIOT
signal(SIGIOT, SIG_DFL);
#endif
abort();
}
else {
#ifdef NO_ONEXIT
f_exit();
#endif
exit(1);
}
}
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
}
#endif

802
t_conv.c

File diff suppressed because it is too large Load Diff

View File

@ -290,7 +290,7 @@ C
C----------------------------------------------------------------------- C-----------------------------------------------------------------------
C DEAL WITH FLIPPERS AND HELMOTZ COILS IF LPA C DEAL WITH FLIPPERS AND HELMOTZ COILS IF LPA
C C
IF (LPA .AND. (LMOAN(1) .OR. LMOAN(2))) THEN IF (LPA) THEN
IF (LDF) CALL FLIP_CASE(IF1,IF2,P_IH,F1V,F1H,F2V,F2H, IF (LDF) CALL FLIP_CASE(IF1,IF2,P_IH,F1V,F1H,F2V,F2H,
+ AKI,AKF,IER) + AKI,AKF,IER)
IF (LDH) CALL HELM_CASE(HX,HY,HZ,P_IH,C_IH,AKI,AKF, IF (LDH) CALL HELM_CASE(HX,HY,HZ,P_IH,C_IH,AKI,AKF,

View File

@ -5,30 +5,31 @@
#include "f2c.h" #include "f2c.h"
/* Subroutine */ int t_update__(real *p_a__, real *p_ih__, real *c_ih__, /* Subroutine */ int t_update__(p_a__, p_ih__, c_ih__, lpa, dm, da, isa, helm,
logical *lpa, real *dm, real *da, integer *isa, real *helm, real *f1h, f1h, f1v, f2h, f2v, f, ei, aki, ef, akf, qhkl, en, hx, hy, hz, if1,
real *f1v, real *f2h, real *f2v, real *f, real *ei, real *aki, real * if2, qm, ier)
ef, real *akf, real *qhkl, real *en, real *hx, real *hy, real *hz, real *p_a__, *p_ih__, *c_ih__;
integer *if1, integer *if2, real *qm, integer *ier) logical *lpa;
real *dm, *da;
integer *isa;
real *helm, *f1h, *f1v, *f2h, *f2v, *f, *ei, *aki, *ef, *akf, *qhkl, *en, *hx,
*hy, *hz;
integer *if1, *if2;
real *qm;
integer *ier;
{ {
static doublereal dakf, daki, dphi; static doublereal dakf, daki, dphi;
static integer ieri, imod, ieru; static integer ieri, imod, ieru;
extern /* Subroutine */ int ex_up__(doublereal *, doublereal *, extern /* Subroutine */ int ex_up__();
doublereal *, doublereal *, doublereal *, integer *);
static doublereal df; static doublereal df;
static integer id; static integer id;
static real qs; static real qs;
static doublereal dbqhkl[3]; static doublereal dbqhkl[3];
extern /* Subroutine */ int sam_up__(doublereal *, doublereal *, extern /* Subroutine */ int sam_up__();
doublereal *, doublereal *, doublereal *, doublereal *,
doublereal *, doublereal *, integer *);
static doublereal da2, da3, da4, da6; static doublereal da2, da3, da4, da6;
extern /* Subroutine */ int erreso_(integer *, integer *); extern /* Subroutine */ int erreso_();
static doublereal dda, def, dei, ddm, dqm, dhx, dhy, dhz, dqs; static doublereal dda, def, dei, ddm, dqm, dhx, dhy, dhz, dqs;
extern /* Subroutine */ int helm_up__(doublereal *, real *, real *, real * extern /* Subroutine */ int helm_up__(), flip_up__();
, doublereal *, doublereal *, doublereal *, integer *), flip_up__(
integer *, integer *, real *, real *, real *, real *, real *,
real *, real *, integer *);
/* =================== */ /* =================== */
@ -193,14 +194,15 @@
} /* t_update__ */ } /* t_update__ */
/* Subroutine */ int ex_up__(doublereal *dx, doublereal *ex, doublereal *akx, /* Subroutine */ int ex_up__(dx, ex, akx, ax2, f, ier)
doublereal *ax2, doublereal *f, integer *ier) doublereal *dx, *ex, *akx, *ax2, *f;
integer *ier;
{ {
/* System generated locals */ /* System generated locals */
doublereal d__1; doublereal d__1;
/* Builtin functions */ /* Builtin functions */
double sin(doublereal); double sin();
/* Local variables */ /* Local variables */
static doublereal arg; static doublereal arg;
@ -227,10 +229,7 @@
/* !!!!!!!!!! This has to be fixed manually after conversion by f2c. */ /* !!!!!!!!!! This has to be fixed manually after conversion by f2c. */
/* !!!!!!!!!! The reason is a different definition of the abs function. */ /* !!!!!!!!!! The reason is a different definition of the abs function. */
/* !!!!!!!!!! MK, May 2001 */ /* !!!!!!!!!! MK, May 2001 */
arg = *dx * sin(*ax2 / 114.59155902616465); arg = (d__1 = *dx * sin(*ax2 / 114.59155902616465), abs(d__1));
if(arg < .0)
arg = -arg;
if (arg <= 1e-4) { if (arg <= 1e-4) {
*ier = 1; *ier = 1;
} else { } else {
@ -245,17 +244,16 @@
} /* ex_up__ */ } /* ex_up__ */
/* Subroutine */ int sam_up__(doublereal *qhkl, doublereal *qm, doublereal * /* Subroutine */ int sam_up__(qhkl, qm, qs, phi, aki, akf, a3, a4, ier)
qs, doublereal *phi, doublereal *aki, doublereal *akf, doublereal *a3, doublereal *qhkl, *qm, *qs, *phi, *aki, *akf, *a3, *a4;
doublereal *a4, integer *ier) integer *ier;
{ {
/* Builtin functions */ /* Builtin functions */
double cos(doublereal), sin(doublereal), atan2(doublereal, doublereal); double cos(), sin(), atan2();
/* Local variables */ /* Local variables */
static doublereal qpar, qperp; static doublereal qpar, qperp;
extern /* Subroutine */ int sp2rlv_(doublereal *, doublereal *, extern /* Subroutine */ int sp2rlv_();
doublereal *, doublereal *, integer *);
static doublereal qt[3]; static doublereal qt[3];
/* ================= */ /* ================= */
@ -302,7 +300,7 @@
if (abs(qperp) > .001 && abs(qpar) > .001) { if (abs(qperp) > .001 && abs(qpar) > .001) {
*phi = atan2(qperp, qpar); *phi = atan2(qperp, qpar);
} else if (abs(qpar) < .001) { } else if (abs(qpar) < .001) {
if (*a4 > 0.f) { if (*a4 > (float)0.) {
*phi = -1.5707963267948966; *phi = -1.5707963267948966;
} else { } else {
*phi = 1.5707963267948966; *phi = 1.5707963267948966;
@ -313,17 +311,18 @@
} /* sam_up__ */ } /* sam_up__ */
/* Subroutine */ int helm_up__(doublereal *phi, real *helm, real *p_ih__, /* Subroutine */ int helm_up__(phi, helm, p_ih__, c_ih__, dhx, dhy, dhz, ier)
real *c_ih__, doublereal *dhx, doublereal *dhy, doublereal *dhz, doublereal *phi;
integer *ier) real *helm, *p_ih__, *c_ih__;
doublereal *dhx, *dhy, *dhz;
integer *ier;
{ {
/* System generated locals */ /* System generated locals */
real r__1; real r__1;
doublereal d__1, d__2; doublereal d__1, d__2;
/* Builtin functions */ /* Builtin functions */
double sqrt(doublereal), atan2(doublereal, doublereal), cos(doublereal), double sqrt(), atan2(), cos(), sin();
sin(doublereal);
/* Local variables */ /* Local variables */
static doublereal hdir, hmod, hpar, hdir2, h__[4], hperp; static doublereal hdir, hmod, hpar, hdir2, h__[4], hperp;
@ -421,21 +420,21 @@
hdir2 += -3.1415926535897932384626433832795; hdir2 += -3.1415926535897932384626433832795;
} }
} else if (abs(hpar) > .001) { } else if (abs(hpar) > .001) {
if (hpar >= 0.f) { if (hpar >= (float)0.) {
hdir2 = 0.f; hdir2 = (float)0.;
} }
if (hpar < 0.f) { if (hpar < (float)0.) {
hdir2 = 3.1415926535897932384626433832795; hdir2 = 3.1415926535897932384626433832795;
} }
} else if (abs(hperp) > .001) { } else if (abs(hperp) > .001) {
if (hperp >= 0.f) { if (hperp >= (float)0.) {
hdir2 = 1.5707963267948966; hdir2 = 1.5707963267948966;
} }
if (hperp < 0.f) { if (hperp < (float)0.) {
hdir2 = -1.5707963267948966; hdir2 = -1.5707963267948966;
} }
} else { } else {
hdir2 = 0.f; hdir2 = (float)0.;
} }
hdir = hdir2 + *helm / 57.29577951308232087679815481410517 - *phi; hdir = hdir2 + *helm / 57.29577951308232087679815481410517 - *phi;
*dhx = hmod * cos(hdir); *dhx = hmod * cos(hdir);
@ -445,9 +444,11 @@
} /* helm_up__ */ } /* helm_up__ */
/* Subroutine */ int flip_up__(integer *if1, integer *if2, real *p_ih__, real /* Subroutine */ int flip_up__(if1, if2, p_ih__, f1v, f1h, f2v, f2h, aki, akf,
*f1v, real *f1h, real *f2v, real *f2h, real *aki, real *akf, integer * ier)
ier) integer *if1, *if2;
real *p_ih__, *f1v, *f1h, *f2v, *f2h, *aki, *akf;
integer *ier;
{ {
/* System generated locals */ /* System generated locals */
real r__1, r__2; real r__1, r__2;
@ -480,12 +481,12 @@
*ier = 0; *ier = 0;
*if1 = 0; *if1 = 0;
*if2 = 0; *if2 = 0;
if ((r__1 = p_ih__[1] - *f1v, dabs(r__1)) < .05f && (r__2 = p_ih__[2] - * if ((r__1 = p_ih__[1] - *f1v, dabs(r__1)) < (float).05 && (r__2 = p_ih__[
aki * *f1h, dabs(r__2)) < .05f) { 2] - *aki * *f1h, dabs(r__2)) < (float).05) {
*if1 = 1; *if1 = 1;
} }
if ((r__1 = p_ih__[3] - *f2v, dabs(r__1)) < .05f && (r__2 = p_ih__[4] - * if ((r__1 = p_ih__[3] - *f2v, dabs(r__1)) < (float).05 && (r__2 = p_ih__[
akf * *f2h, dabs(r__2)) < .05f) { 4] - *akf * *f2h, dabs(r__2)) < (float).05) {
*if2 = 1; *if2 = 1;
} }
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */

2
tas.h
View File

@ -148,7 +148,7 @@
#define MAXPAR 130 #define MAXPAR 130
#define MAXADD 20 #define MAXADD 20
#define MAXEVAR 10 #define MAXEVAR 12
/* --------------------- data structure -------------------------------*/ /* --------------------- data structure -------------------------------*/

View File

@ -61,7 +61,11 @@ set tasmap(ss) "scatSense ss "
set tasmap(sa) "scatSense sa " set tasmap(sa) "scatSense sa "
set tasmap(sm) "scatSense sm " set tasmap(sm) "scatSense sm "
set tasmap(fx) "fxi " set tasmap(fx) "fxi "
for {set i 0} { $i < 8} { incr i} {
set cur [format "i%1.1d" $i]
set tasmap(l$cur) [format "%s lowerlimit " $cur]
set tasmap(u$cur) [format "%s upperlimit " $cur]
}
#---------------------------------------------------------------------- #----------------------------------------------------------------------
# mapping array output for debugging # mapping array output for debugging
#set l [array names tasmap] #set l [array names tasmap]
@ -195,11 +199,11 @@ proc scatSense {par {val -1000} } {
set newupper [expr $oldupper - 90.] set newupper [expr $oldupper - 90.]
} elseif { $val == 1 && $oldsa == -1} { } elseif { $val == 1 && $oldsa == -1} {
set newzero [expr $oldzero + 180. ] set newzero [expr $oldzero + 180. ]
set newlower [expr $oldlower + 180. ] set newlower [expr -($oldlower - 180.) ]
set newupper [expr $oldupper + 180. ] set newupper [expr $oldupper + 180. ]
} elseif {$val == -1 && $oldsa == 1} { } elseif {$val == -1 && $oldsa == 1} {
set newzero [expr $oldzero - 180. ] set newzero [expr $oldzero - 180. ]
set newlower [expr $oldlower - 180. ] set newlower [expr -($oldlower - 180.) ]
set newupper [expr $oldupper - 180. ] set newupper [expr $oldupper - 180. ]
} else { } else {
error "Unknown SA setting combination" error "Unknown SA setting combination"

View File

@ -53,6 +53,9 @@ extern char *tasMotorOrder[] = { "a1",
"i2", "i2",
"i3", "i3",
"i4", "i4",
"hxx",
"hyy",
"hzz",
"i5", "i5",
"i6", "i6",
"i7", "i7",

View File

@ -566,7 +566,7 @@ static int TASScanDrive(pScanData self, int iPoint)
int i, status, iPtr; int i, status, iPtr;
int iTAS = 0; int iTAS = 0;
pMotor pMot; pMotor pMot;
unsigned char tasTargetMask[20], tasMask[10]; unsigned char tasTargetMask[20], tasMask[MAXEVAR];
float tasTargets[20]; float tasTargets[20];
/* /*

View File

@ -313,7 +313,7 @@ MakeTAS iscan
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# I N S T A L L T A S S C R I P T E D C O M M A N D S # I N S T A L L T A S S C R I P T E D C O M M A N D S
MakeDrive
source $root/tascom.tcl source $root/tascom.tcl

4
tasu.h
View File

@ -15,9 +15,9 @@ extern char *tasMotorOrder[];
extern char *tasVariableOrder[]; extern char *tasVariableOrder[];
/* maximum number of motors in the list */ /* maximum number of motors in the list */
#define MAXMOT 27 #define MAXMOT 31
/* offset to the currents, if available */ /* offset to the currents, if available */
#define CURMOT (MAXMOT - 8) #define CURMOT (MAXMOT - 11)
/* /*

View File

@ -250,7 +250,7 @@ extern int inicurve_(integer *midx, real *mrx1, real *mrx2, integer
/*-------------------------------------------------------------------*/ /*-------------------------------------------------------------------*/
int TASCalc(pTASdata self, SConnection *pCon, int TASCalc(pTASdata self, SConnection *pCon,
unsigned char tasMask[10], unsigned char tasMask[MAXEVAR],
float motorTargets[20], float motorTargets[20],
unsigned char motorMask[20]) unsigned char motorMask[20])
{ {
@ -453,7 +453,7 @@ int TASCalc(pTASdata self, SConnection *pCon,
} }
if(ldh){ if(ldh){
/* currents must be driven */ /* currents must be driven */
for( i = 0; i < 4; i++){ for( i = 0; i < 3; i++){
motorMask[13+i] = 1; motorMask[13+i] = 1;
} }
} }

View File

@ -219,8 +219,8 @@ VarMake email Text User
VarMake sample_mur Float User VarMake sample_mur Float User
MakeDataNumber SicsDataNumber "$shome/sics/danu.dat" MakeDataNumber SicsDataNumber "$shome/sics/danu.dat"
InitSANS $shome/sics/sansdict.dic #InitSANS $shome/sics/sansdict.dic
#InitDMC InitDMC
MakeScanCommand xxxscan counter topsi.hdd recover.bin MakeScanCommand xxxscan counter topsi.hdd recover.bin
MakePeakCenter xxxscan MakePeakCenter xxxscan