From 9281ebf4dd946d01e7661f5606376430e49855fa Mon Sep 17 00:00:00 2001 From: Jing Chen Date: Fri, 3 Aug 2012 15:34:16 +1000 Subject: [PATCH] r3692 | jgn | 2012-08-03 15:34:16 +1000 (Fri, 03 Aug 2012) | 1 line --- .../pelican/config/beamline/sct_power.tcl | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/site_ansto/instrument/pelican/config/beamline/sct_power.tcl b/site_ansto/instrument/pelican/config/beamline/sct_power.tcl index 921c8277..12960556 100644 --- a/site_ansto/instrument/pelican/config/beamline/sct_power.tcl +++ b/site_ansto/instrument/pelican/config/beamline/sct_power.tcl @@ -345,7 +345,11 @@ proc ::scobj::ag1010::rdValue {} { #set ns [sct] if {[ catch { set data [string trim [sct result] " "] - if {[string length $data] < 1} { + broadcast $data + if {[string first "failed" $data] != -1} { + broadcast "Error in rdValue: $data" + return -code error "$data" + } elseif {[string length $data] < 1} { broadcast "Error in rdValue: no message returned from device" return -code error "Error in rdValue: no message returned from device" } @@ -596,18 +600,18 @@ proc createNode {scobj_hpath sct_controller cmdGroup varName readable writable p hsetprop $nodeName read ${ns}::getValue $scobj_hpath $rdFunc $rdPara hsetprop $nodeName $rdFunc ${ns}::$rdFunc if {$pollEnabled == 1} { - if {[SplitReply [environment_simulation]]=="false"} { + #if {[SplitReply [environment_simulation]]=="false"} { $sct_controller poll $nodeName - } + #} } } if {$writable == 1} { hsetprop $nodeName write ${ns}::setValue $scobj_hpath $rdFunc $rdPara $wrPara hsetprop $nodeName $rdFunc ${ns}::$rdFunc if {$pollEnabled == 1} { - if {[SplitReply [environment_simulation]]=="false"} { + #if {[SplitReply [environment_simulation]]=="false"} { $sct_controller write $nodeName - } + #} } } if {1 < [string length $unit]} {