From 33e6611b144b7d541c5c76006f49d4de9eeb668a Mon Sep 17 00:00:00 2001 From: Ferdi Franceschini Date: Fri, 29 Apr 2011 10:53:41 +1000 Subject: [PATCH] Reverted r3122 | ffr | 2011-04-29 10:53:41 +1000 (Fri, 29 Apr 2011) | 1 line --- .../instrument/sans/config/velsel/sct_velsel.tcl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/site_ansto/instrument/sans/config/velsel/sct_velsel.tcl b/site_ansto/instrument/sans/config/velsel/sct_velsel.tcl index 2dab07dc..dd6710b0 100644 --- a/site_ansto/instrument/sans/config/velsel/sct_velsel.tcl +++ b/site_ansto/instrument/sans/config/velsel/sct_velsel.tcl @@ -251,6 +251,11 @@ proc rdPwdAck {} { hset $vs_root/status "busy" statemon start nvs_speed statemon start nvs_lambda + if {[sct writestatus] == "start"} { + # Called by drive adapter + hsetprop $vs_root/setspeed driving 1 + hsetprop $vs_root/setLambda driving 1 + } return $nextState } @@ -300,7 +305,6 @@ proc rdPwdAck {} { set state [lindex [hval $statuspath] $paramindex(state) end] set aspeed [lindex [hval $statuspath] $paramindex(aspeed) end] if {[string match {*CONTROL*} $state] || $aspeed != 0} { - sct driving 0 error "Not allowed while the velocity selector is running" } return OK @@ -310,7 +314,6 @@ proc is_Speed_in_blocked_range {speed} { variable blocked_speeds foreach {min max} $blocked_speeds { if {$min <= $speed && $speed <= $max} { - sct driving 0 error "Speed of $speed rpm is within the blocked range of $min to $max rpm" } } @@ -355,7 +358,6 @@ proc get_nearest_allowed_speed {speed} { set speed [sct target] set ttang [lindex [hval $statuspath] $paramindex(ttang) end] if {$ttang > 90} { - sct driving 0 error "ERROR: You must first initialise the turntable" } @@ -370,7 +372,6 @@ proc checkBlockedWavelengths {statuspath} { set lambda [sct target] set ttang [lindex [hval $statuspath] $paramindex(ttang) end] if {$ttang > 90} { - sct driving 0 error "ERROR: You must first initialise the turntable" } set angle [lindex [hval $statuspath] $paramindex(ttang) end] @@ -423,6 +424,11 @@ proc halt {root} { hset $vs_root/status "busy" statemon start nvs_speed statemon start nvs_lambda + if {[sct writestatus] == "start"} { + # Called by drive adapter + hsetprop $vs_root/setLambda driving 1 + hsetprop $vs_root/setspeed driving 1 + } return $nextState }