From 2d2b76dcb5425e226cadfa7f018e53e8e07c2423 Mon Sep 17 00:00:00 2001 From: Ferdi Franceschini Date: Wed, 3 Sep 2014 13:21:22 +1000 Subject: [PATCH] Fix chopper frequency modification. --- .../instrument/bilby/config/chopper/astrium_chopper.sct | 4 ++-- .../instrument/bilby/config/chopper/astrium_chopper_sct.tcl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/site_ansto/instrument/bilby/config/chopper/astrium_chopper.sct b/site_ansto/instrument/bilby/config/chopper/astrium_chopper.sct index 0c9cc615..64e4bd47 100644 --- a/site_ansto/instrument/bilby/config/chopper/astrium_chopper.sct +++ b/site_ansto/instrument/bilby/config/chopper/astrium_chopper.sct @@ -91,7 +91,7 @@ driver astrium_chopper = { set rhs "[string trim [lindex ${lst} 1]]" sct "attr_${lhs}" "${rhs}" set base [pathname [sct]] - switch [string toupper [string trim ${node}]] { + switch [string toupper ${lhs}] { "ASPEED" { if [string is double "${rhs}"] { set freq [expr "${rhs}" / 60.0] @@ -100,7 +100,7 @@ driver astrium_chopper = { } } } - "RSPEED" "APHASE" "RPHASE" "MASTER" { + "RSPEED" - "APHASE" - "RPHASE" - "MASTER" { if { "[hval ${base}/${node}]" != "${rhs}" } { hset ${base}/${node} "${rhs}" } diff --git a/site_ansto/instrument/bilby/config/chopper/astrium_chopper_sct.tcl b/site_ansto/instrument/bilby/config/chopper/astrium_chopper_sct.tcl index f77c8380..b01e07d2 100644 --- a/site_ansto/instrument/bilby/config/chopper/astrium_chopper_sct.tcl +++ b/site_ansto/instrument/bilby/config/chopper/astrium_chopper_sct.tcl @@ -174,7 +174,7 @@ proc ::scobj::astrium_chopper::readState {tc_root} { set rhs "[string trim [lindex ${lst} 1]]" sct "attr_${lhs}" "${rhs}" set base [pathname [sct]] - switch [string toupper [string trim ${node}]] { + switch [string toupper ${lhs}] { "ASPEED" { if [string is double "${rhs}"] { set freq [expr "${rhs}" / 60.0] @@ -183,7 +183,7 @@ proc ::scobj::astrium_chopper::readState {tc_root} { } } } - "RSPEED" "APHASE" "RPHASE" "MASTER" { + "RSPEED" - "APHASE" - "RPHASE" - "MASTER" { if { "[hval ${base}/${node}]" != "${rhs}" } { hset ${base}/${node} "${rhs}" }