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:
committed by
Douglas Clowes
parent
d71dbd9b9a
commit
6b3f71cc6a
@@ -397,8 +397,6 @@ namespace eval scan {
|
|||||||
if { $numpoints < 1 } {
|
if { $numpoints < 1 } {
|
||||||
error "Number of points <$numpoints> must not be less than one"
|
error "Number of points <$numpoints> must not be less than one"
|
||||||
}
|
}
|
||||||
::histogram_memory::count_method $mode
|
|
||||||
::histogram_memory::count_size $preset
|
|
||||||
|
|
||||||
if {$numpoints == 1} {
|
if {$numpoints == 1} {
|
||||||
set step 0
|
set step 0
|
||||||
@@ -441,9 +439,17 @@ namespace eval scan {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 clear
|
||||||
hmscan add $scanvar $start $step
|
hmscan add $scanvar $start $step
|
||||||
# hmscan ignores mode and preset, we use FAT_COUNT_METHOD and FAT_COUNT_STOP
|
} else {
|
||||||
|
bmonscan clear
|
||||||
|
bmonscan add $scanvar $start $step
|
||||||
|
}
|
||||||
::scan::runscan_cmd -set numpoints $numpoints
|
::scan::runscan_cmd -set numpoints $numpoints
|
||||||
::scan::runscan_cmd -set scan_variable $scanvar
|
::scan::runscan_cmd -set scan_variable $scanvar
|
||||||
::scan::runscan_cmd -set scan_start $start
|
::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 feedback scan_step $step
|
||||||
::scan::runscan_cmd -set mode $mode
|
::scan::runscan_cmd -set mode $mode
|
||||||
::scan::runscan_cmd -set preset $preset
|
::scan::runscan_cmd -set preset $preset
|
||||||
|
if {$det_type == "histmem"} {
|
||||||
hmscan run $numpoints timer 0
|
hmscan run $numpoints timer 0
|
||||||
|
} else {
|
||||||
|
bmonscan run $numpoints $mode $preset
|
||||||
|
}
|
||||||
} message ] {
|
} message ] {
|
||||||
set force_scan false
|
set force_scan false
|
||||||
return -code error "ERROR [info level 0]\n$message"
|
return -code error "ERROR [info level 0]\n$message"
|
||||||
|
|||||||
Reference in New Issue
Block a user