SICS-477 Modified the runscan command to do bmon scans as well as

hmscans.  The type of scan is determined by the new "detector" parameter
on the /commands/scan/runscan tree.  It is fixed to 'bmon' for Taipan
but is selectable on other instruments with default="histmem"

r3589 | ffr | 2012-06-04 20:11:51 +1000 (Mon, 04 Jun 2012) | 5 lines
This commit is contained in:
Ferdi Franceschini
2012-06-04 20:11:51 +10:00
committed by Douglas Clowes
parent d71dbd9b9a
commit 6b3f71cc6a

View File

@@ -397,8 +397,6 @@ namespace eval scan {
if { $numpoints < 1 } {
error "Number of points <$numpoints> must not be less than one"
}
::histogram_memory::count_method $mode
::histogram_memory::count_size $preset
if {$numpoints == 1} {
set step 0
@@ -441,9 +439,17 @@ namespace eval scan {
}
}
hmscan clear
hmscan add $scanvar $start $step
set det_type [::scan::runscan_cmd -get detector]
if {$det_type == "histmem"} {
# hmscan ignores mode and preset, we use FAT_COUNT_METHOD and FAT_COUNT_STOP
::histogram_memory::count_method $mode
::histogram_memory::count_size $preset
hmscan clear
hmscan add $scanvar $start $step
} else {
bmonscan clear
bmonscan add $scanvar $start $step
}
::scan::runscan_cmd -set numpoints $numpoints
::scan::runscan_cmd -set scan_variable $scanvar
::scan::runscan_cmd -set scan_start $start
@@ -451,7 +457,11 @@ namespace eval scan {
::scan::runscan_cmd -set feedback scan_step $step
::scan::runscan_cmd -set mode $mode
::scan::runscan_cmd -set preset $preset
hmscan run $numpoints timer 0
if {$det_type == "histmem"} {
hmscan run $numpoints timer 0
} else {
bmonscan run $numpoints $mode $preset
}
} message ] {
set force_scan false
return -code error "ERROR [info level 0]\n$message"