PSI sics-cvs-psi_pre-ansto
This commit is contained in:
20
beam.tcl
Normal file
20
beam.tcl
Normal 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
|
||||
Reference in New Issue
Block a user