diff --git a/site_ansto/instrument/config/scan/scan_common_1.tcl b/site_ansto/instrument/config/scan/scan_common_1.tcl index cfec12db..0b206318 100644 --- a/site_ansto/instrument/config/scan/scan_common_1.tcl +++ b/site_ansto/instrument/config/scan/scan_common_1.tcl @@ -446,9 +446,17 @@ namespace eval scan { ::histogram_memory::count_size $preset hmscan clear hmscan add $scanvar $start $step - } else { + } elseif {$det_type == "bmon"} { + set mode [string tolower $mode] + switch -glob $mode { + "time" { set bms_mode "timer" } + "monitor" { set bms_mode "monitor" } + default {return -code error "ERROR: mode should be 'time' or 'monitor' not $mode"} + } bmonscan clear bmonscan add $scanvar $start $step + } else { + return -code error "ERROR: detector type should be 'histmem' or 'bmon' not $det_type" } ::scan::runscan_cmd -set numpoints $numpoints ::scan::runscan_cmd -set scan_variable $scanvar @@ -460,7 +468,7 @@ namespace eval scan { if {$det_type == "histmem"} { hmscan run $numpoints timer 0 } else { - bmonscan run $numpoints $mode $preset + bmonscan run $numpoints $bms_mode $preset } } message ] { set force_scan false