PSI sics-cvs-psi_pre-ansto

This commit is contained in:
2003-06-13 00:00:00 +00:00
committed by Douglas Clowes
parent 2e3ddfb6c6
commit 3ffd0d8af4
1099 changed files with 318432 additions and 0 deletions

20
beam.tcl Normal file
View File

@@ -0,0 +1,20 @@
#------------------------------------------------------------------------
# install a SPS-Controller
MakeSPS sps1 lnsp25.psi.ch 4000 7
#----------------- the beam command
proc beam {} {
#---------- read the SPS
set ret [catch {SPS1 adc 3} msg]
if {$ret != 0} {
ClientPut $msg
ClientPut "ERROR: SPS reading failed"
return
}
#--------- convert the data
set l [split $msg "="]
set raw [lindex $l 1]
set val [expr $raw/13.96]
return [format "beam = %f" $val]
}
Publish beam Spy