- Fixed a few problems with hklscan

- Added transfer of zipped data to conman.c, histogram memory software
  in order to support the TRICS status display.
- Upgraded TRICS data file writing.
- First installment of triple axis spectrometer support: initialization of
  data structures and an implementation of the MAD dr(ive) command.
This commit is contained in:
cvs
2000-11-21 08:16:46 +00:00
parent f9a31d2065
commit e83d3e6946
39 changed files with 5301 additions and 563 deletions

303
test.tcl
View File

@@ -27,7 +27,7 @@ ServerOption AcceptTimeOut 100
# timeout when checking for connection req.
# Similar to above, but for connections
ServerOption ReadUserPasswdTimeout 7000
ServerOption ReadUserPasswdTimeout 10
# 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\
@@ -114,7 +114,7 @@ sampledist lock
#Motor D1V EL734 lnsp22.psi.ch 4000 3 3
Motor A1 SIM 15.0 120. .1 2. # Monochromator Theta
Motor A2 SIM -73. 137. .1 1. # Monochromator 2Theta
Motor A3 SIM 0. 360. .1 3. # Sample Omega
Motor A3 SIM -360. 360. .1 3. # Sample Omega
Motor A4 SIM -130. 130. .1 1. # Sample 2Theta
Motor A5 SIM -30. 30. .1 3. # ? horiz. Translation
Motor A6 SIM -30. 30. .1 3. # ? vert Translation
@@ -223,8 +223,11 @@ MakePeakCenter xxxscan
MakeHM banana SIM
banana configure HistMode HRPT
banana configure OverFlowMode reflect
#MakeHM banana SINQHM
#banana configure HistMode HRPT
banana configure HistMode Normal
#banana configure OverFlowMode reflect
banana configure OverFlowMode Ceil
banana configure Rank 1
#banana configure Length 400
banana configure Length 16384
@@ -233,10 +236,11 @@ banana configure dim1 128
banana configure BinWidth 4
banana preset 100.
banana CountMode Timer
#banana configure HMComputer lnse02.psi.ch
#banana configure HMPort 2400
#banana configure Counter counter
banana configure HMComputer lnse02.psi.ch
banana configure HMPort 2400
banana configure Counter counter
banana init
ClientPut "HM initialized"
source $shome/sics/tcl/scancom.tcl
#source $shome/sics/countf.tcl
@@ -259,7 +263,7 @@ ClientPut "Installed ev test stuff"
Motor twotheta SIM -120.0 120. .1 2. # 2 theta arm
Motor omega SIM -73. 134. .1 2. # omega
Motor chi SIM 0. 360. .1 2. # chi circle
Motor phi SIM 0. 360. .1 2. # phi circle
Motor phi SIM -360. 360. .1 2. # phi circle
Motor muca SIM 30. 36. .1 2. # phi circle
Motor dg1 SIM -10. 40. .1 2. # phi circle
SicsAlias phi ph
@@ -305,12 +309,286 @@ fcircleinit
MakeDifrac twotheta omega chi phi counter
#----------- histogram memory
# --------------------------------------------------------------------------
# Initialization script for a simulated TOPSI instrument
#
#
# Dr. Mark Koennecke February, 1996
#---------------------------------------------------------------------------
# O P T I O N S
# --------------- Initialize Tcl internals --------------------------------
rename scan stscan
#-------- a home for this, everything else is in relation to this
set shome /data/koenneck/src
# first all the server options are set
#ServerOption RedirectFile $shome/sics/stdout
ServerOption ReadTimeOut 100
# timeout when checking for commands. In the main loop SICS checks for
# pending commands on each connection with the above timeout, has
# PERFORMANCE impact!
ServerOption AcceptTimeOut 100
# timeout when checking for connection req.
# Similar to above, but for connections
ServerOption ReadUserPasswdTimeout 10
# 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 LogFileDir $shome/log
#LogFileDir is the directory where the command log is going
#ServerOption logstartfile $shome/sics/start.tcl
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 "tecs/bin/TecsServer -h lnsp26:4000/0"
# -h host:port/channel is for serial server
ServerOption TecsBinDir tecs/bin/
ServerOption TecsLogDir /data/koenneck/tmp/
ServerOption TecsPort 9753
ServerOption statusfile sicsstatus.tcl
ServerOption ServerPort 2911
# the port number the server is going to listen at. The client MUST know
# this number in order to connect. It is in client.ini
ServerOption InterruptPort 2914
# The UDP port where the server will wait for Interrupts from clients.
# Obviously, clients wishing to interrupt need to know this number.
# Telnet options
ServerOption TelnetPort 1301
ServerOption TelWord sicslogin
ServerOption DefaultTclDirectory $shome/sics/tcl
ServerOption DefaultCommandFile ""
#------ a port for broadcasting UDP messages
#ServerOption QuieckPort 2108
TokenInit connan
#---------------------------------------------------------------------------
# U S E R S
# than the SICS users are specified
# Syntax: SicsUser name password userRightsCode
SicsUser Mugger Diethelm 1
SicsUser User Rosy 2
SicsUser Spy 007 1
SicsUser me me 1
#--------------------------------------------------------------------------
# S I M P L E V A R I A B L E S
# now a few general variables are created
# Syntax: VarMake name type access
# type can be one of: Text, Int, Float
#access can be one of: Internal, Mugger, user, Spy
VarMake Instrument Text Internal
Instrument "TOPSI"
Instrument lock
VarMake starttime Text User
VarMake Title Text User
VarMake sample Text User
sample "DanielOxid"
Title "TopsiTupsiTapsi"
VarMake User Text User
User "Daniel_the_Clementine"
VarMake detectordist Float Mugger
detectordist 2500
detectordist lock
VarMake sampledist Float Mugger
sampledist 496.
sampledist lock
#--------------------------------------------------------------------------
# D E V I C E S : M O T O R S
# Motor a4 EL734 LNSP22 4000 5 6
# EL734 motor with parameters: hostname PortNumber Channel MotorID
#Motor D1V EL734 lnsp22.psi.ch 4000 3 3
Motor A1 SIM 15.0 120. .1 2. # Monochromator Theta
Motor A2 SIM -73. 137. .1 1. # Monochromator 2Theta
Motor A3 SIM -360. 360. .1 3. # Sample Omega
Motor A4 SIM -130. 130. .1 1. # Sample 2Theta
Motor A5 SIM -30. 30. .1 3. # ? horiz. Translation
Motor A6 SIM -30. 30. .1 3. # ? vert Translation
Motor MTL SIM -30. 30. .1 3. # mono lower translation
Motor MTU SIM -30. 30. .1 3. # mono upper translation
Motor STL SIM -30. 30. .1 3. # sample lower translation
Motor STU SIM -30. 30. .1 3. # sample upper translation
Motor MGU SIM -50. 50. .1 3. # mono upper goniometer
Motor SGL SIM -20. 20. .1 3. # sample lower goniometer
Motor SGU SIM -20. 20. .1 3. # sample upper goniometer
Motor SDM SIM -5 50. .1 3. # weird Motor
SicsAlias A4 Tasse
SicsAlias A5 MonoX
SicsAlias A5 MonoY
SicsAlias A5 MonoPhi
SicsAlias A5 MonoChi
Motor D1R SIM -20. 20. .1 3. # Diaphragm 1 right
Motor D1L SIM -20. 20. .1 3. # Diaphragm 1 left
Motor D1T SIM -20. 20. .1 3. # Diaphragm 1 top & Bottom
Motor D2R SIM -20. 20. .1 3. # Diaphragm 2 right
Motor D2L SIM -20. 20. .1 3. # Diaphragm 2 left
Motor D2T SIM -20. 20. .1 3. # Diaphragm 2 top & Bottom
Motor BeamStopX SIM -20. 20. .1 3. # Diaphragm 2 right
Motor BeamStopY SIM -20. 20. .1 3. # Diaphragm 2 left
Motor DetectorX SIM -20. 20. .1 3. # Diaphragm 2 right
Motor DetectorY SIM -20. 20. .1 3. # Diaphragm 2 left
Motor DetectorRotation SIM -20. 20. .1 3. # Diaphragm 2 top & Bottom
ClientPut "Motors done"
MakeMulti sampletable
sampletable alias D1r x
sampletable alias D1L y
sampletable alias D1T z
sampletable pos henry D1r 5. D1L -5. D1T 0.
sampletable endconfig
SicsAlias sampletable st
#------------------------------------------------------------------------
# Velocity selector
#Motor tilt EL734 lnsp25.psi.ch 4000 2 2
Motor tilt SIM -15 15 .1 3.
set dornen(Host) lnsp25.psi.ch
set dornen(Port) 4000
set dornen(Channel) 6
set dornen(Timeout) 5000
#VelocitySelector nvs tilt DORNIER dornen
VelocitySelector nvs tilt SIM
nvs add -20 28800
nvs add 3800 4500
nvs add 5900 6700
nvs add 8100 9600
unset dornen
MakeSANSWave lumbda nvs
ClientPut "Velocity Selector done"
SicsAlias MTL sax
SicsAlias A3 som
#--------------------------------------------------------------------------
# C O U N T E R S
MakeCounter counter SIM
#MakeCounter counter EL737 lnsp19.psi.ch 4000 4
#--------------------------------------------------------------------------
# M U L T I D E V I C E V A R I A B L E S
MakeMono Mono "Ge-111" A1 A2 SDM
Mono dd 3.3537
Mono vk1 -0.025942
Mono vk2 5.35166
MakeWaveLength lambda Mono
MakeO2T O2T A3 A4
#--------------------------------------------------------------------------
# P R O C E D U R E S
source tcl/log.tcl
MakeDrive
SicsAlias drive dr
Publish LogBook Spy
MakeRuenBuffer
#---------------- TestVariables for Storage
VarMake SicsDataPath Text Mugger
SicsDataPath "$shome/sics/"
SicsDataPath lock
VarMake SicsDataPrefix Text Mugger
SicsDataPrefix test
SicsDataPrefix lock
VarMake SicsDataPostFix Text Mugger
SicsDataPostFix ".hdf"
SicsDataPostFix lock
VarMake Adress Text User
VarMake phone Text User
VarMake fax Text User
VarMake email Text User
VarMake sample_mur Float User
MakeDataNumber SicsDataNumber "$shome/sics/danu.dat"
#InitSANS $shome/sics/sansdict.dic
InitDMC
MakeScanCommand xxxscan counter topsi.hdd recover.bin
MakePeakCenter xxxscan
MakeHM hm1 SIM
hm1 configure HistMode HRPT
hm1 configure OverFlowMode reflect
hm1 configure Rank 1
#hm1 configure Length 400
hm1 configure Length 65536
hm1 configure dim0 256
hm1 configure dim1 256
hm1 configure BinWidth 4
hm1 preset 100.
hm1 CountMode Timer
#hm1 configure HMComputer lnse02.psi.ch
#hm1 configure HMPort 2400
#hm1 configure Counter counter
hm1 init
MakeHM hm2 SIM
hm2 configure HistMode HRPT
hm2 configure OverFlowMode reflect
hm2 configure Rank 1
#hm2 configure Length 400
hm2 configure Length 65536
hm2 configure dim0 256
hm2 configure dim1 256
hm2 configure BinWidth 4
hm2 preset 100.
hm2 CountMode Timer
#hm2 configure HMComputer lnse02.psi.ch
#hm2 configure HMPort 2400
#hm2 configure Counter counter
hm2 init
MakeHM hm3 SIM
hm3 configure HistMode HRPT
hm3 configure OverFlowMode reflect
hm3 configure Rank 1
#hm3 configure Length 400
hm3 configure Length 65536
hm3 configure dim0 256
hm3 configure dim1 256
hm3 configure BinWidth 4
hm3 preset 100.
hm3 CountMode Timer
#hm3 configure HMComputer lnse02.psi.ch
#hm3 configure HMPort 2400
#hm3 configure Counter counter
hm3 init
ClientPut "Installed 4-circle stuff"
#source transact.tcl
#Publish transact Spy
#MakeSPS suff lnsp26.psi.ch 4000 7
MakeSPS sps lnsa12.psi.ch 4000 4
#source beamdt.tcl
#------------- C804-DC motors
@@ -365,9 +643,9 @@ ChopperAdapter phase choco phase 0 90.
ChopperAdapter ratio choco ratio 0 6.
#-------- SANS Cooker
MakeChopper cooker sanscook lnsa10 4000 11
ChopperAdapter cookp cooker mp 0 400
ChopperAdapter cookz cooker mz 0 400
#MakeChopper cooker sanscook lnsa10 4000 11
#ChopperAdapter cookp cooker mp 0 400
#ChopperAdapter cookz cooker mz 0 400
source chosta.tcl
@@ -400,3 +678,4 @@ MakeLin2Ang a5l a5
#source tmp/beam.tcl
source tcl/wwwpar.tcl
source bef.tcl