Files
sics/site_ansto/instrument/config/commands/commands_common.tcl
Ferdi Franceschini 1f0f5fe72e commands_common.tcl
scan_common_t.tcl
Remove redundant filename entries from bmonscan and hmscan feedback

reflectometer/config/parameters/parameters.tcl
Put instrument parameters under hdb parameters section a la Quokka

r2645 | ffr | 2008-07-11 11:42:52 +1000 (Fri, 11 Jul 2008) | 7 lines
2012-11-15 13:40:11 +11:00

85 lines
2.2 KiB
Tcl

##
# @file Definition of common command node procs.
################################################################################
# SCAN COMMANDS
namespace eval scan {
command hdb_bmonscan {
text=drivable scan_variable
float scan_start
float scan_increment
int NP
text=monitor,timer mode
float preset
int=0,2 channel
} {
bmonscan clear
# bmonscan configure script
bmonscan add $scan_variable $scan_start $scan_increment
bmonscan setchannel $channel;
set status [catch {bmonscan run $NP $mode $preset} msg]
# bmonscan configure soft
if {$status == 0} {
return $msg
} else {
return -code error "ERROR [info level 0]"
}
}
::scan::hdb_bmonscan -addfb text mode float preset float scan_variable_value int scanpoint int counts text status
::scan::hdb_bmonscan -set feedback status IDLE
command hdb_hmscan {
text=drivable scan_variable
float scan_start
float scan_increment
int NP
text=monitor,timer mode
float preset
int=0,2 channel
} {
hmscan clear
hmscan add $scan_variable $scan_start $scan_increment
hmscan setchannel $channel;
set status [catch {hmscan run $NP $mode $preset} msg]
if {$status == 0} {
return $msg
} else {
return -code error "ERROR [info level 0]"
}
}
::scan::hdb_hmscan -addfb text mode float preset float scan_variable_value int scanpoint int counts text status
::scan::hdb_hmscan -set feedback status IDLE
}
sicslist setatt ::scan::hdb_bmonscan long_name bmonscan
sicslist setatt ::scan::hdb_hmscan long_name hmscan
################################################################################
################################################################################
# MONITOR COMMANDS
namespace eval monitor {
command count {
text=timer,monitor mode
float preset
} {
::monitor::count -set feedback status BUSY
bm setmode $mode
bm_mode $mode
bm count $preset
bm_preset $preset
::monitor::count -set feedback counts [SplitReply [bm getcounts]];
::monitor::count -set feedback status IDLE
}
::monitor::count -addfb int counts text status
::monitor::count -set feedback status IDLE
}
################################################################################