commands_common.tcl

Added histmem and runscan command

hmm_configuration_common_1.tcl
Set histmem_cmd  status feedback to IDLE on COUNTEND event

nxscripts_common_1.tcl
When saving a set of files the time-stamp is offset from the time the first file is created.

scan_common_1.tcl
The hmscan hook functions now set feedback on the runscan_cmd

sct_positmotor_common.tcl
Added mk_sct_positmotor command to create a script context controller which runs a motor to an indexed position.

Added positmotor_configuration.tcl to echidna, wombat, kowari, quokka, platypus.

sans/config/motors/positmotor_configuration.tcl
Has an example of a positmotor configuration for the sample changer

sanx/quokka_configuration.tcl
Setup feedback nodes for AttRotDeg and RotApDeg.

motor_utility.tcl
Added reldrive and relrun commands along with getmotpar convenience command.

r2725 | ffr | 2008-10-27 15:55:48 +1100 (Mon, 27 Oct 2008) | 26 lines
This commit is contained in:
Ferdi Franceschini
2008-10-27 15:55:48 +11:00
committed by Douglas Clowes
parent 7ded983eba
commit 81f98bd337
24 changed files with 397 additions and 86 deletions

View File

@@ -113,7 +113,7 @@ proc ::scan::ic_initialize {} {
numpoints int=0,inf
mode text=[join [concat [list time unlimited period count frame] $::counter::isc_beam_monitor_list ] , ]
preset float=0,inf
filetype text=[join [array names ::nexus::histmem_filetype_spec] , ]
datatype text=[join [array names ::nexus::histmem_filetype_spec] , ]
savetype text=save,nosave
force boolean
}]
@@ -207,17 +207,12 @@ proc ::scan::hmm_scan_prepare {sobj uobj} {
set vlist [split [$sobj getvarpar 0] = ]
set scanstart [lindex $vlist 1]
set scanstep [lindex $vlist 2]
::scan::hdb_hmscan -set NP $numpoints
::scan::hdb_hmscan -set scan_variable [string trim [lindex [split [lindex $vlist 0] . ] 1]]
::scan::hdb_hmscan -set scan_start $scanstart
::scan::hdb_hmscan -set scan_increment $scanstep
::scan::hdb_hmscan -set feedback status BUSY
::scan::runscan_cmd -set feedback status BUSY
run_mode "hmscan"
::nexus::newfile $ic_hmm_datatype $save_filetype
data axis 1 [::scan::hdb_hmscan -set scan_variable]
data axis 1 [::scan::runscan_cmd -set scan_variable]
clientput "Scan start: $scanstart, Scan step: $scanstep, Number of points: $numpoints"
clientput "Datatype: $ic_hmm_datatype"
@@ -233,12 +228,8 @@ proc ::scan::hmm_scan_prepare {sobj uobj} {
}
proc ::scan::hmm_count {sobj uobj point mode preset} {
::scan::hdb_hmscan -set mode $mode
::scan::hdb_hmscan -set preset $preset
::scan::hdb_hmscan -set feedback scanpoint $point
::scan::hdb_hmscan -set feedback mode $mode
::scan::hdb_hmscan -set feedback preset $preset
::scan::hdb_hmscan -set feedback scan_variable_value [SplitReply [[::scan::hdb_hmscan -set scan_variable]]]
::scan::runscan_cmd -set feedback scanpoint $point
::scan::runscan_cmd -set feedback scan_variable_value [SplitReply [[::scan::runscan_cmd -set scan_variable]]]
# Start histogram and block until count is complete
::histogram_memory::start block
}
@@ -249,17 +240,17 @@ proc ::scan::hmm_scan_finish {sobj uobj} {
variable reset_position
set $save_filetype "data"
::histogram_memory::stop
::scan::hdb_hmscan -set feedback status IDLE
::scan::runscan_cmd -set feedback status IDLE
run_mode "normal"
# Make sure that the next save command doesn't overwrite our scan data.
# and clear any data links
::nexus::newfile clear data
if {$reset_position == "true"} {
set reset_position "false"
set svar [::scan::hdb_hmscan -get scan_variable]
set svar [::scan::runscan_cmd -get scan_variable]
set svtype [getatt $svar type]
if {$svtype == "motor" || $svtype == "configurablevirtualmotor"} {
drive $svar [::scan::hdb_hmscan -get scan_start]
drive $svar [::scan::runscan_cmd -get scan_start]
}
}
# ::histogram_memory::configure_server Filler_defaults
@@ -454,6 +445,13 @@ namespace eval scan {
hmscan clear
hmscan add $scanvar $start $step
# hmscan ignores mode and preset, we use FAT_COUNT_METHOD and FAT_COUNT_STOP
::scan::runscan_cmd -set numpoints $numpoints
::scan::runscan_cmd -set scan_variable $scanvar
::scan::runscan_cmd -set scan_start $start
::scan::runscan_cmd -set scan_stop $stop
::scan::runscan_cmd -set feedback scan_step $step
::scan::runscan_cmd -set mode $mode
::scan::runscan_cmd -set preset $preset
set status [catch {hmscan run $numpoints timer 0} msg]
set force_scan false