From 579fd8ebd01af5242f76e5a0a71c1e4735675f8c Mon Sep 17 00:00:00 2001 From: Ferdi Franceschini Date: Thu, 19 May 2011 08:39:00 +1000 Subject: [PATCH] sct_oxford_itc.tcl Revert changes to drving state. r3136 | ffr | 2011-05-19 08:39:00 +1000 (Thu, 19 May 2011) | 2 lines --- .../config/environment/temperature/sct_oxford_itc.tcl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/site_ansto/instrument/config/environment/temperature/sct_oxford_itc.tcl b/site_ansto/instrument/config/environment/temperature/sct_oxford_itc.tcl index 81d6a3c4..629d2580 100644 --- a/site_ansto/instrument/config/environment/temperature/sct_oxford_itc.tcl +++ b/site_ansto/instrument/config/environment/temperature/sct_oxford_itc.tcl @@ -40,8 +40,11 @@ debug_log "setPoint $tc_root $nextState $cmd sct=[sct]" set par "[sct target]" } hset $tc_root/status "busy" + if {[sct writestatus] == "start"} { + # Called by drive adapter + hsetprop $tc_root/setpoint driving 1 + } sct send "@1$cmd$par" - sct setpoint_pending 0 debug_log "setPoint $cmd$par" return $nextState } @@ -256,7 +259,7 @@ debug_log "rdState $tc_root: target=$tgt" set tgt [SplitReply [hgetprop $tc_root/setpoint target]] debug_log "rdState $tc_root: initialised target to: target=$tgt" } - if {$my_driving > 0 && [sct setpoint_pending] == 0} { + if {$my_driving > 0} { if {[hval $tc_root/control_sensor] == "3"} { set temp [hval $tc_root/sensor3/value] } elseif {[hval $tc_root/control_sensor] == "2"} { @@ -296,10 +299,8 @@ debug_log "rdState returns: $nextState" set lolimit [hval $tc_root/lowerlimit] set hilimit [hval $tc_root/upperlimit] if {$setpoint < $lolimit || $setpoint > $hilimit} { - sct driving 0 error "setpoint violates limits" } - sct setpoint_pending 1 return OK } @@ -340,7 +341,6 @@ debug_log "halt $tc_root" hsetprop $scobj_hpath/setpoint noResponse ${ns}::noResponse hsetprop $scobj_hpath/setpoint oldval UNKNOWN hsetprop $scobj_hpath/setpoint driving 0 - hsetprop $scobj_hpath/setpoint setpoint_pending 0 hsetprop $scobj_hpath/setpoint writestatus UNKNOWN # Drive adapter interface hsetprop $scobj_hpath/setpoint checklimits ${ns}::check $scobj_hpath