- Fix to various drivers due to changes in rs232controller

- hkl now searches psi in .5 steps
- first point of fastscan is driven normally


SKIPPED:
	psi/amor2t.c
	psi/amor2t.h
	psi/amor2t.i
	psi/amor2t.tex
	psi/amor2t.w
	psi/dornier2.c
	psi/el734hp.c
	psi/nxamor.c
	psi/slsmagnet.c
	psi/sps.c
This commit is contained in:
koennecke
2005-09-07 13:51:11 +00:00
parent 621c529e96
commit 93c349314c
26 changed files with 489 additions and 253 deletions

View File

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

View File

@ -47,24 +47,18 @@ OUTPUT PARAMETERS (Nsum, psum, p2sum,currentCount)
STATE PARAMETERS (x,y,z,vx,vy,vz,t,s1,s2,p)
SHARE
%{
#include <fcntl.h>
void dumpTotal(char *ffilename, long totalCounts){
FILE *fd = NULL;
struct flock fl;
fl.l_type = F_WRLCK;
fl.l_whence = 0;
fl.l_start = 0;
fl.l_len = 0;
fl.l_pid = getpid();
fd = fopen(ffilename,"w");
char tmp[1024];
strncpy(tmp,ffilename, 1000);
strcat(tmp,"tmp");
fd = fopen(tmp,"w");
if(fd != NULL){
fcntl(fileno(fd),F_SETLKW,&fl);
fprintf(fd,"%ld\n",totalCounts);
fl.l_type = F_UNLCK;
fcntl(fileno(fd),F_SETLK,&fl);
fclose(fd);
rename(tmp,ffilename);
unlink(tmp);
}
}
%}

View File

@ -156,14 +156,14 @@ proc rundmcoptsim {mode preset } {
}
}
#------------------------------------------------------------------------
proc copydmcdata { } {
proc copydmcdataold { } {
global home
set mcversion "McStas 1.8 - Mar. 05, 2004"
washsimfile $home/dmc.xml
mcreader open $home/dmc.xml
mcreader insertmon \
"/$mcversion/DMC_diff/dmc.xml/PSD_sample/values" \
counter 1 [expr 1./700]
counter 1 [expr 1./350]
mcreader insertmon \
"/$mcversion/DMC_diff/dmc.xml/Det9/det9.dat/values" \
counter 5
@ -171,7 +171,36 @@ proc copydmcdata { } {
if { $hmScale <= 0} {
set hmScale 1e9
} else {
set hmScale [expr $hmScale * 1e5]
set hmScale [expr $hmScale * 5e4]
}
clientput "HM scale = $hmScale"
mcreader inserthm \
"/$mcversion/DMC_diff/dmc.xml/Det9/det9.dat/data" banana $hmScale
mcreader close
}
#------------------------------------------------------------------------
proc copydmcdata { } {
global home
set mcversion "McStas 1.8 - Mar. 05, 2004"
washsimfile $home/dmc.xml
mcreader open $home/dmc.xml
mcreader insertmon \
"/$mcversion/DMC_diff/dmc.xml/PSD_sample/values" \
counter 1 [expr 1./350]
mcreader insertmon \
"/$mcversion/DMC_diff/dmc.xml/Det9/det9.dat/values" \
counter 5
set hmScale [SplitReply [counter getmonitor 5]]
set val [mcreader getfield\
"/$mcversion/DMC_diff/dmc.xml/Det9/det9.dat/values"]
set l [split $val]
set a [lindex $l 0]
set b [lindex $val 2]
if {$b > .0} {
set hmScale [expr $b / $a]
set hmScale [expr $hmScale / 6.]
} else {
set hmScale 1e9
}
clientput "HM scale = $hmScale"
mcreader inserthm \
@ -186,9 +215,9 @@ proc dmcdump {pid} {
#mccontrol configure mcstart rundmcsim
mccontrol configure mcstart rundmcoptsim
mccontrol configure mccopydata copydmcdata
mccontrol configure update 60
mccontrol configure update 30
mccontrol configure mcmonfile $home/monfile
mccontrol configure monitorscale [expr 1. /700]
mccontrol configure monitorscale [expr 1. /350]
mccontrol configure mcdump mcstasdump
#--------------------------------------------------------------------------
# A count command for VDMC

View File

@ -14,7 +14,7 @@ sicsdatapostfix .hdf
sicsdatapostfix setAccess 0
sicsdataprefix powder
sicsdataprefix setAccess 0
starttime 2005-07-19 17:15:54
starttime 2005-08-16 16:46:50
starttime setAccess 2
comment3 UNKNOWN
comment3 setAccess 2
@ -121,9 +121,9 @@ a1 precision 0.010000
a1 AccessCode 2.000000
a1 movecount 10.000000
banana CountMode monitor
banana preset 4000.000000
banana preset 60.000000
# Counter counter
counter SetPreset 40000000.000000
counter SetPreset 60000.000000
counter SetMode Monitor
# Motor twothetad
twothetad sign 1.000000