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:
committed by
Douglas Clowes
parent
7ded983eba
commit
81f98bd337
@@ -4,8 +4,52 @@
|
||||
################################################################################
|
||||
namespace eval commands { }
|
||||
|
||||
proc ::commands::ic_initialize {} {
|
||||
namespace eval ::histogram {
|
||||
set NS [namespace current]
|
||||
|
||||
command histmem_cmd [subst {
|
||||
text=start,stop,pause cmd
|
||||
text=[join $::histogram_memory::ic_count_methods , ] mode
|
||||
int=0:inf preset
|
||||
float freq
|
||||
text=[join $::histogram_memory::ic_fsrce_values , ] frame_source
|
||||
}] {
|
||||
switch $cmd {
|
||||
"stop" {
|
||||
histmem stop
|
||||
::histogram::histmem_cmd -set feedback status IDLE
|
||||
}
|
||||
"pause" {
|
||||
histmem pause
|
||||
::histogram::histmem_cmd -set feedback status PAUSED
|
||||
}
|
||||
"start" {
|
||||
histmem mode $mode
|
||||
histmem preset $preset
|
||||
histmem freq $freq
|
||||
histmem fsrce $frame_source
|
||||
histmem start
|
||||
::histogram::histmem_cmd -set feedback status BUSY
|
||||
}
|
||||
default {
|
||||
# $cmd unknown
|
||||
}
|
||||
}
|
||||
}
|
||||
::histogram::histmem_cmd -set mode [histmem mode]
|
||||
::histogram::histmem_cmd -set preset [histmem preset]
|
||||
::histogram::histmem_cmd -set freq [histmem freq]
|
||||
::histogram::histmem_cmd -set frame_source [histmem fsrce]
|
||||
::histogram::histmem_cmd -addfb text status
|
||||
::histogram::histmem_cmd -set feedback status IDLE
|
||||
sicslist setatt ::histogram::histmem_cmd long_name histmem
|
||||
}
|
||||
# SCAN COMMANDS
|
||||
namespace eval scan {
|
||||
namespace eval ::scan {
|
||||
set NS [uplevel namespace current]
|
||||
|
||||
|
||||
command hdb_bmonscan {
|
||||
text=drivable scan_variable
|
||||
float scan_start
|
||||
@@ -34,40 +78,30 @@ command hdb_bmonscan {
|
||||
::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
|
||||
command runscan_cmd [subst {
|
||||
text=drivable scan_variable
|
||||
float scan_start
|
||||
float scan_stop
|
||||
int=0:inf numpoints
|
||||
text=[join [concat [list time unlimited period count frame] $::counter::isc_beam_monitor_list ] , ] mode
|
||||
float=0,inf preset
|
||||
text=[join [array names ::nexus::histmem_filetype_spec] , ] datatype
|
||||
text=save,nosave savetype
|
||||
text=true,false force
|
||||
}] {
|
||||
::scan::runscan $scan_variable $scan_start $scan_stop $numpoints $mode $preset savetype $savetype datatype $datatype force $force
|
||||
}
|
||||
::scan::runscan_cmd -addfb float scan_variable_value float scan_step int scanpoint text status
|
||||
::scan::runscan_cmd -set feedback status IDLE
|
||||
sicslist setatt ::scan::runscan_cmd long_name runscan
|
||||
}
|
||||
sicslist setatt ::scan::hdb_bmonscan long_name bmonscan
|
||||
sicslist setatt ::scan::hdb_hmscan long_name hmscan
|
||||
################################################################################
|
||||
|
||||
################################################################################
|
||||
# MONITOR COMMANDS
|
||||
namespace eval monitor {
|
||||
namespace eval ::monitor {
|
||||
command count {
|
||||
text=timer,monitor mode
|
||||
float preset
|
||||
@@ -83,7 +117,6 @@ namespace eval monitor {
|
||||
}
|
||||
################################################################################
|
||||
|
||||
proc ::commands::ic_initialize {} {
|
||||
# Generate the following commands,
|
||||
# ::motor::go_home
|
||||
namespace eval ::motor {
|
||||
|
||||
Reference in New Issue
Block a user