- Added separate drivable motors for four circle H, K, L
- Added a listen mode to commandlog in order to support the batchEditor - Some small fixes to exe* for BatchEditor
This commit is contained in:
174
sans2.tcl
174
sans2.tcl
@@ -1,33 +1,48 @@
|
||||
# --------------------------------------------------------------------------
|
||||
# Initialization script for the instrument SANSII at SINQ
|
||||
#
|
||||
# Dr. Mark Koennecke, January - ???? 2003
|
||||
# Dr. Mark Koennecke, January - March 2003
|
||||
#
|
||||
# Changes:
|
||||
# Pavel Strunz, 15.04.2003: - changed backlash dz (0.15 --> 0.005)
|
||||
# Pavel Strunz, 16.04.2003: - changed NVS forbiden gaps according to the actual NVS037
|
||||
# Pavel Strunz, 23.04.2003: - changed backlash for all ecb motors
|
||||
# Pavel Strunz, 29.04.2003: - hakle.tcl sourced
|
||||
# Pavel Strunz, 20.11.2003: - source sans2geometry, sans2measurement
|
||||
# Pavel Strunz, 03.12.2003: - source scan_a, sans2wavelength, nvs interrupt changed from 3 to 0
|
||||
#---------------------------------------------------------------------------
|
||||
# O P T I O N S
|
||||
set root "/afs/psi.ch/user/k/koennecke/src/sics"
|
||||
set root "/home/SANS2"
|
||||
|
||||
set scriptroot $root/sans2_sics
|
||||
|
||||
|
||||
# first all the server options are set
|
||||
|
||||
ServerOption SaveFile $root/tmp/sans2stat.tcl
|
||||
ServerOption statusfile $root/data/2003/sans2stat.tcl
|
||||
# File to save the status of the instrument too
|
||||
|
||||
ServerOption ReadTimeOut 10
|
||||
ServerOption ReadTimeOut 5
|
||||
# timeout when checking for commands. In the main loop SICS checks for
|
||||
# pending commands on each connection with the above timeout, has
|
||||
# pending commands on each connection with the above timeout, has
|
||||
# PERFORMANCE impact!
|
||||
|
||||
ServerOption AcceptTimeOut 10
|
||||
ServerOption AcceptTimeOut 5
|
||||
# timeout when checking for connection req.
|
||||
# Similar to above, but for connections
|
||||
|
||||
ServerOption ReadUserPasswdTimeout 500000
|
||||
# time to wiat for a user/passwd to be sent from a client. Increase this
|
||||
ServerOption ReadUserPasswdTimeout 500000
|
||||
# time to wait 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 LogFileBaseName $root/tmp/sans2log
|
||||
ServerOption LogFileBaseName $root/log/sans2log
|
||||
# the path and base name of the internal server logfile to which all
|
||||
# activity will be logged.
|
||||
|
||||
ServerOption ServerPort 2915
|
||||
ServerOption LogFileDir $root/log
|
||||
# This is where log files from command log go
|
||||
|
||||
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
|
||||
|
||||
@@ -46,9 +61,11 @@ TokenInit connan
|
||||
|
||||
# than the SICS users are specified
|
||||
# Syntax: SicsUser name password userRightsCode
|
||||
SicsUser Manager Joachim 1
|
||||
SicsUser User Kohl 2
|
||||
SicsUser Spy 007 1
|
||||
SicsUser Manager Manager 1
|
||||
SicsUser lnsmanager lnsSICSlns 1
|
||||
SicsUser User Looser 2
|
||||
SicsUser sans2user 04lns1 2
|
||||
SicsUser Spy 007 3
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# S I M P L E V A R I A B L E S
|
||||
@@ -58,8 +75,8 @@ SicsUser Spy 007 1
|
||||
# type can be one of: Text, Int, Float
|
||||
#access can be one of: Internal, Mugger, user, Spy
|
||||
|
||||
VarMake Instrument Text Internal
|
||||
Instrument "SANS-II at SINQ,PSI"
|
||||
VarMake Instrument Text Internal
|
||||
Instrument "SANS-II at SINQ,PSI"
|
||||
#initialisation
|
||||
Instrument lock
|
||||
|
||||
@@ -68,7 +85,7 @@ VarMake User Text User
|
||||
VarMake SubTitle Text User
|
||||
VarMake environment Text User
|
||||
VarMake comment Text User
|
||||
VarMake samplename Text User
|
||||
#VarMake samplename Text User
|
||||
VarMake email Text User
|
||||
VarMake fax Text User
|
||||
VarMake phone Text User
|
||||
@@ -77,20 +94,21 @@ VarMake sample Text User
|
||||
VarMake BatchRoot Text User
|
||||
VarMake starttime Text User
|
||||
BatchRoot $root
|
||||
#BatchRoot $root/command
|
||||
|
||||
VarMake sampletable Text User
|
||||
|
||||
#----------- Initialize data storage stuff
|
||||
VarMake SicsDataPath Text Mugger
|
||||
SicsDataPath $root/tmp/
|
||||
SicsDataPath $root/data/2004/
|
||||
SicsDataPath lock
|
||||
VarMake SicsDataPrefix Text Mugger
|
||||
SicsDataPrefix sansII
|
||||
SicsDataPrefix sans2
|
||||
SicsDataPrefix lock
|
||||
VarMake SicsDataPostFix Text Mugger
|
||||
SicsDataPostFix ".hdf"
|
||||
SicsDataPostFix lock
|
||||
MakeDataNumber SicsDataNumber $root/tmp/DataNumber
|
||||
MakeDataNumber SicsDataNumber $root/data/2004/DataNumber
|
||||
|
||||
#=========================================================================
|
||||
# Initialize ECB system
|
||||
@@ -99,8 +117,8 @@ MakeDataNumber SicsDataNumber $root/tmp/DataNumber
|
||||
#--------- GPIB Controller with National Instruments driver
|
||||
MakeGPIB gpib ni
|
||||
|
||||
#-------- MakeECB name gpib-controller board-number gpib-address
|
||||
MakeECB ecb1 gpib 0 5
|
||||
#-------- MakeECB name gpib-controller board-number gpib-address
|
||||
MakeECB ecb1 gpib 0 5
|
||||
|
||||
#--------- Function to switch ecb to automatic control
|
||||
proc ecbauto {} {
|
||||
@@ -113,7 +131,7 @@ ecbauto
|
||||
#-------------- ECB Motors
|
||||
# Motor name ecb ecb-controller ecb-motor-index hardlowerlimit hardupperlimit
|
||||
|
||||
Motor sr ecb ecb1 1 -10000. 10000.
|
||||
Motor sr ecb ecb1 1 -17500. 17500.
|
||||
sr encoder 0
|
||||
sr control 0
|
||||
sr range 1
|
||||
@@ -130,7 +148,7 @@ sr offset 0
|
||||
sr dtolerance .01
|
||||
sr step2deg 1
|
||||
sr step2dig 0
|
||||
sr backlash .15
|
||||
sr backlash 500
|
||||
|
||||
Motor stx ecb ecb1 2 -16000. 16000.
|
||||
stx encoder 0
|
||||
@@ -149,7 +167,7 @@ stx offset 0
|
||||
stx dtolerance .01
|
||||
stx step2deg 1
|
||||
stx step2dig 0
|
||||
stx backlash .15
|
||||
stx backlash 500
|
||||
|
||||
Motor stz ecb ecb1 3 6500. 20000.
|
||||
stz encoder 0
|
||||
@@ -168,7 +186,7 @@ stz offset 0
|
||||
stz dtolerance .01
|
||||
stz step2deg 1
|
||||
stz step2dig 0
|
||||
stz backlash .15
|
||||
stz backlash 500
|
||||
|
||||
Motor sc ecb ecb1 4 -2000. 70000.
|
||||
sc encoder 0
|
||||
@@ -187,7 +205,7 @@ sc offset 0
|
||||
sc dtolerance .01
|
||||
sc step2deg 1
|
||||
sc step2dig 0
|
||||
sc backlash .15
|
||||
sc backlash 1000
|
||||
|
||||
Motor gu ecb ecb1 5 -10000. 10000.
|
||||
gu encoder 0
|
||||
@@ -206,7 +224,7 @@ gu offset 0
|
||||
gu dtolerance .02
|
||||
gu step2deg 1
|
||||
gu step2dig 0
|
||||
gu backlash .15
|
||||
gu backlash 100
|
||||
|
||||
Motor gl ecb ecb1 6 -10000. 10000.
|
||||
gl encoder 0
|
||||
@@ -225,7 +243,7 @@ gl offset 0
|
||||
gl dtolerance .02
|
||||
gl step2deg 1
|
||||
gl step2dig 0
|
||||
gl backlash .15
|
||||
gl backlash 100
|
||||
|
||||
|
||||
Motor tu ecb ecb1 7 -10000. 10000.
|
||||
@@ -245,7 +263,7 @@ tu offset 0
|
||||
tu dtolerance .01
|
||||
tu step2deg 1
|
||||
tu step2dig 0
|
||||
tu backlash .15
|
||||
tu backlash 100
|
||||
|
||||
|
||||
Motor tl ecb ecb1 8 -10000. 10000.
|
||||
@@ -265,7 +283,7 @@ tl offset 0
|
||||
tl dtolerance .01
|
||||
tl step2deg 1
|
||||
tl step2dig 0
|
||||
tl backlash .15
|
||||
tl backlash 100
|
||||
|
||||
Motor om ecb ecb1 9 -10000. 10000.
|
||||
om encoder 1
|
||||
@@ -284,7 +302,7 @@ om offset 0
|
||||
om dtolerance .01
|
||||
om step2deg 1
|
||||
om step2dig 10
|
||||
om backlash .15
|
||||
om backlash 100
|
||||
|
||||
Motor sz ecb ecb1 10 -10000. 10000.
|
||||
sz encoder 0
|
||||
@@ -303,7 +321,7 @@ sz offset 0
|
||||
sz dtolerance .001
|
||||
sz step2deg 1
|
||||
sz step2dig 0
|
||||
sz backlash .15
|
||||
sz backlash 100
|
||||
|
||||
Motor sx ecb ecb1 11 -10000. 10000.
|
||||
sx encoder 0
|
||||
@@ -322,7 +340,7 @@ sx offset 0
|
||||
sx dtolerance .01
|
||||
sx step2deg 1
|
||||
sx step2dig 0
|
||||
sx backlash .15
|
||||
sx backlash 100
|
||||
|
||||
Motor sy ecb ecb1 12 -10000. 10000.
|
||||
sy encoder 0
|
||||
@@ -341,9 +359,9 @@ sy offset 0
|
||||
sy dtolerance .001
|
||||
sy step2deg 1
|
||||
sy step2dig 0
|
||||
sy backlash .15
|
||||
sy backlash 100
|
||||
|
||||
Motor dz ecb ecb1 13 1.05 6.0
|
||||
Motor dz ecb ecb1 13 0.905 6.015
|
||||
dz encoder 0
|
||||
dz control 0
|
||||
dz range 1
|
||||
@@ -360,9 +378,9 @@ dz offset 0
|
||||
dz dtolerance .001
|
||||
dz step2deg 53076
|
||||
dz step2dig 0
|
||||
dz backlash .15
|
||||
dz backlash .005
|
||||
|
||||
Motor dh ecb ecb1 14 -14000. 16000.
|
||||
Motor dh ecb ecb1 14 -10100. 16400.
|
||||
dh encoder 0
|
||||
dh control 0
|
||||
dh range 1
|
||||
@@ -379,9 +397,9 @@ dh offset 0
|
||||
dh dtolerance .001
|
||||
dh step2deg 1
|
||||
dh step2dig 0
|
||||
dh backlash .15
|
||||
dh backlash 100
|
||||
|
||||
Motor dv ecb ecb1 15 -14000. 25000.
|
||||
Motor dv ecb ecb1 15 -14600. 25400.
|
||||
dv encoder 0
|
||||
dv control 0
|
||||
dv range 1
|
||||
@@ -398,7 +416,7 @@ dv offset 0
|
||||
dv dtolerance .001
|
||||
dv step2deg 1
|
||||
dv step2dig 0
|
||||
dv backlash .15
|
||||
dv backlash 100
|
||||
|
||||
Motor az1 ecb ecb1 16 -3900. 0.
|
||||
az1 encoder 0
|
||||
@@ -417,7 +435,7 @@ az1 offset 0
|
||||
az1 dtolerance .001
|
||||
az1 step2deg 1
|
||||
az1 step2dig 0
|
||||
az1 backlash .15
|
||||
az1 backlash 200
|
||||
|
||||
Motor atz ecb ecb1 17 -3900. 0.
|
||||
atz encoder 0
|
||||
@@ -436,15 +454,15 @@ atz offset 0
|
||||
atz dtolerance .001
|
||||
atz step2deg 1
|
||||
atz step2dig 0
|
||||
atz backlash .15
|
||||
atz backlash 200
|
||||
|
||||
#===========================================================================
|
||||
# The ECB system has the drawback that only one out of 8 motors in a rack
|
||||
# can run at any given time. Access to such motors has to be serialized.
|
||||
# This is done through the anticollision system originally developed for
|
||||
# TRICS. This system registers requests from motors to run and then calls
|
||||
# a script which serializes the running of motors. This system is used at
|
||||
# SANS to deal with the rack logic. This section installs the necessary
|
||||
# a script which serializes the running of motors. This system is used at
|
||||
# SANS to deal with the rack logic. This section installs the necessary
|
||||
# scripts and configures the system.
|
||||
#===========================================================================
|
||||
AntiCollisionInstall
|
||||
@@ -531,12 +549,16 @@ proc sans2rack args {
|
||||
}
|
||||
return
|
||||
}
|
||||
Publish sans2rack User #---------for testing purposes
|
||||
Publish sans2rack User
|
||||
anticollision script sans2rack
|
||||
#====================== PSI Motoren ===================================
|
||||
Motor ome EL734 sans2 4000 2 1
|
||||
Motor chi EL734 sans2 4000 2 2
|
||||
Motor tilt EL734 sans2 4000 3 1
|
||||
Motor ome EL734 sans2 4000 3 1
|
||||
Motor chi EL734 sans2 4000 3 2
|
||||
Motor phi EL734 sans2 4000 3 3
|
||||
Motor tilt EL734 sans2 4000 2 1
|
||||
|
||||
SicsAlias ome traz "These motors are used to drive SANS I translation table"
|
||||
SicsAlias chi trax "while ome is sample z and chi is sample x (TG070704)"
|
||||
#====================== Multi Motor Setup ==============================
|
||||
MakeMulti detector
|
||||
detector alias dz x
|
||||
@@ -565,9 +587,9 @@ gonio endconfig
|
||||
MakeMulti table
|
||||
table alias om om
|
||||
table alias sz z
|
||||
table alias sx x
|
||||
table alias sx x
|
||||
table alias sy y
|
||||
table endconfig
|
||||
table endconfig#
|
||||
#====================== HISTOGRAM MEMORY ================================
|
||||
MakeCounter counter ecb ecb1
|
||||
MakeECB tdc gpib 0 7
|
||||
@@ -587,27 +609,57 @@ banana init
|
||||
banana exponent 6
|
||||
banana CountMode timer
|
||||
banana preset 100
|
||||
#=========================== velocity selector ========================
|
||||
VelocitySelector nvs tilt SIM
|
||||
=========================== velocity selector ========================
|
||||
set dorn(Host) psts233
|
||||
set dorn(Port) 3004
|
||||
set dorn(Channel) 4
|
||||
set dorn(Timeout) 20000
|
||||
set dorn(MinControl) 6500
|
||||
VelocitySelector nvs tilt dornier2003 dorn
|
||||
#VelocitySelector nvs tilt SIM
|
||||
nvs add -20 28800
|
||||
nvs add 3600 4300
|
||||
nvs add 7600 9600
|
||||
nvs add 13400 13450
|
||||
nvs add 24200 24250
|
||||
nvs add 3600 4500
|
||||
nvs add 7800 10500
|
||||
nvs add 21500 23500
|
||||
nvs status
|
||||
nvs interrupt 0
|
||||
MakeSANSWave lambda nvs
|
||||
emon unregister nvswatch
|
||||
#===================================== auxiliary hardware ==============
|
||||
set distoCON [gpib attach 0 14 0 13 0 1]
|
||||
|
||||
#--------- for the Hakle Feucht
|
||||
MakeRS232Controller h50 psts233 3005
|
||||
#===================================== data file writing ================
|
||||
MakeNXScript
|
||||
#===================================== install commands ==================
|
||||
MakeDrive
|
||||
MakeRuenBuffer
|
||||
commandlog auto
|
||||
#=================================== load specific command file ===========
|
||||
source $root/sans2com.tcl
|
||||
MakePSDFrame
|
||||
SerialInit
|
||||
#--------- drive command
|
||||
MakeDrive
|
||||
SicsAlias drive dr
|
||||
#----------- for adding scripted content to the status file
|
||||
MakeTclInt bckintern
|
||||
#----- alias for temperature
|
||||
DefineAlias tt temperature
|
||||
#=================================== load specific command files ===========
|
||||
source $scriptroot/sans2com.tcl
|
||||
source $scriptroot/hakle.tcl
|
||||
source $scriptroot/hakle50.tcl
|
||||
source $scriptroot/HaakeSetup.tcl
|
||||
source $scriptroot/A1931Setup.tcl
|
||||
source $scriptroot/sans2geometry.tcl
|
||||
source $scriptroot/sans2measurement.tcl
|
||||
source $scriptroot/sans2wavelength.tcl
|
||||
source $scriptroot/scan_a.tcl
|
||||
# initialisation for IPS-120 superconducting magnet power supply
|
||||
# this definition does not harm other devices used through the same channel
|
||||
ips init localhost 4000 7
|
||||
#=================================== load display definition =============
|
||||
source $root/sans2dis.tcl
|
||||
|
||||
|
||||
#source $scriptroot/sans2dis.tcl
|
||||
|
||||
#=======================================================================
|
||||
disto
|
||||
|
||||
Reference in New Issue
Block a user