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

34
helium.tcl Normal file
View File

@@ -0,0 +1,34 @@
#--------------------------------------------------------------------------
# helium: a script for reading the helium level from an AMI-135 Helium Level
# Monitor.
#
# Mark Koennecke, December 1999
#-------------------------------------------------------------------------
#--------- some code to do proper initialization if necessary
set ret [catch {helium} msg]
if {$ret != 0} {
Publish heliumport Spy
Publish helium Spy
Publish heliuminit Mugger
}
#--------------- initialize things
proc heliuminit {mac chan} {
serialport heliumport $mac 4000 $chan
heliumport -tmo 2000
return OK
}
#--------------- real work
proc helium {} {
set ret [catch {heliumport cm} msg]
if {$ret != 0} {
error $msg
}
set ret [catch {heliumport level} msg]
if {$ret != 0} {
error $msg
} else {
return [format "helium = %6.2f cm" $msg]
}
}