Make the default frame source setting instrument specific
r2240 | ffr | 2007-11-07 15:47:34 +1100 (Wed, 07 Nov 2007) | 2 lines
This commit is contained in:
committed by
Douglas Clowes
parent
04d0a2ab9a
commit
0c6e24747f
@@ -1,5 +1,5 @@
|
||||
# $Revision: 1.24 $
|
||||
# $Date: 2007-11-06 03:43:46 $
|
||||
# $Revision: 1.25 $
|
||||
# $Date: 2007-11-07 04:47:34 $
|
||||
# Author: Ferdi Franceschini
|
||||
# Based on the examples in the hs_test.tcl sample configuration by Mark Lesha.
|
||||
# http://gumtree.ansto.gov.au:9080/nbicms/bragg-systems/histogram-server/hs_test.tcl/view
|
||||
@@ -949,12 +949,31 @@ proc ::histogram_memory::get_frame_freq {} {
|
||||
# if you are setting the frequency from a chopper which is stopped.
|
||||
proc ::histogram_memory::set_frame_freq {freq {frame_source INTERNAL}} {
|
||||
variable state
|
||||
# Frame source for each instrument if freq = 0, this can happen when automatically
|
||||
# setting frequencies from choppers.
|
||||
array set frame_source_on_zero_freq {
|
||||
echidna INTERNAL
|
||||
koala INTERNAL
|
||||
kowari EXTERNAL
|
||||
pelican INTERNAL
|
||||
platypus EXTERNAL
|
||||
quokka INTERNAL
|
||||
taipan INTERNAL
|
||||
wombat INTERNAL
|
||||
}
|
||||
if {[string is double $freq] == 0 || $freq < 0} {
|
||||
return -code error "Frequency must be a non-negative floating point number"
|
||||
}
|
||||
#TODO Add tolerance parameters to choppercontroller
|
||||
if {abs($freq - 0) <= [expr {2.0/60.0}]} {
|
||||
hmm configure fat_frame_source INTERNAL
|
||||
set zf_frame_source $frame_source_on_zero_freq([instname])
|
||||
if {$zf_frame_source == "INTERNAL"} {
|
||||
clientput "WARNING: A histmem frame frequency of zero was requested, setting frequency to 50Hz instead" value
|
||||
} else {
|
||||
clientput "WARNING: A histmem frame frequency of zero was requested, setting frequency to 50Hz instead" value
|
||||
clientput "WARNING: You must provide an external oscillator" value
|
||||
}
|
||||
hmm configure fat_frame_source $zf_frame_source
|
||||
set newfreq 50
|
||||
} else {
|
||||
hmm configure fat_frame_source [string toupper $frame_source]
|
||||
|
||||
Reference in New Issue
Block a user