From 1026dbb808042f4b72203f0bb2283f7c3b1ce598 Mon Sep 17 00:00:00 2001 From: Ferdi Franceschini Date: Fri, 13 Jan 2012 13:59:20 +1100 Subject: [PATCH] Change driveable motor names to GA GB GC r3339 | ffr | 2012-01-13 13:59:20 +1100 (Fri, 13 Jan 2012) | 2 lines --- .../config/environment/sct_cybaman.tcl | 78 +++++++++---------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/site_ansto/instrument/config/environment/sct_cybaman.tcl b/site_ansto/instrument/config/environment/sct_cybaman.tcl index 2e848e47..fc9a2e7c 100644 --- a/site_ansto/instrument/config/environment/sct_cybaman.tcl +++ b/site_ansto/instrument/config/environment/sct_cybaman.tcl @@ -505,16 +505,16 @@ debug_log "chkWrite new data for $tc_root [sct] result=$data" debug_log "setPt: tc_root=$tc_root sct=[sct] target=[sct target]" #sct print "setPt: tc_root=$tc_root sct=[sct] target=[sct target]" set channel [string toupper [basename [pathname [sct]]]] - if { "$channel" == "A" } { - hset $tc_root/Display/set_pos_A [sct target] + if { "$channel" == "GA" } { + hset $tc_root/Display/set_pos_GA [sct target] sct update [sct target] sct utime readtime - } elseif { "$channel" == "B" } { - hset $tc_root/Display/set_pos_B [sct target] + } elseif { "$channel" == "GB" } { + hset $tc_root/Display/set_pos_GB [sct target] sct update [sct target] sct utime readtime - } elseif { "$channel" == "C" } { - hset $tc_root/Display/set_pos_C [sct target] + } elseif { "$channel" == "GC" } { + hset $tc_root/Display/set_pos_GC [sct target] sct update [sct target] sct utime readtime } else { @@ -710,18 +710,18 @@ debug_log "chkWrite new data for $tc_root [sct] result=$data" if { "$current_state" == 1 } { hsetprop $tc_root/device_state my_state "STATE_IDLE" hset $tc_root/drive_state "IDLE" - hset $tc_root/display/set_pos_A [hval $tc_root/display/act_pos_A] - hset $tc_root/display/set_pos_B [hval $tc_root/display/act_pos_B] - hset $tc_root/display/set_pos_C [hval $tc_root/display/act_pos_C] - hsetprop $tc_root/A/Setpoint driving 0 - hsetprop $tc_root/B/Setpoint driving 0 - hsetprop $tc_root/C/Setpoint driving 0 + hset $tc_root/display/set_pos_GA [hval $tc_root/display/act_pos_GA] + hset $tc_root/display/set_pos_GB [hval $tc_root/display/act_pos_GB] + hset $tc_root/display/set_pos_GC [hval $tc_root/display/act_pos_GC] + hsetprop $tc_root/GA/Setpoint driving 0 + hsetprop $tc_root/GB/Setpoint driving 0 + hsetprop $tc_root/GC/Setpoint driving 0 } set nextState "idle" } elseif {$my_state == "STATE_IDLE"} { set nextState "idle" if { "$current_state" == 1 } { - if { [hgetpropval $tc_root/A/Setpoint driving] || [hgetpropval $tc_root/B/Setpoint driving] || [hgetpropval $tc_root/C/Setpoint driving] } { + if { [hgetpropval $tc_root/GA/Setpoint driving] || [hgetpropval $tc_root/GB/Setpoint driving] || [hgetpropval $tc_root/GC/Setpoint driving] } { hset $tc_root/drive_state "DRIVING" debug_log "drive_state: [sct] DRIVING" hset $tc_root/Display/visstart 1 @@ -736,13 +736,13 @@ debug_log "chkWrite new data for $tc_root [sct] result=$data" if { "$current_state" == 6 } { # still moving } elseif { "$current_state" == 1 } { - if { [hval $tc_root/display/act_pos_A] == [hval $tc_root/display/set_pos_A] && - [hval $tc_root/display/act_pos_B] == [hval $tc_root/display/set_pos_B] && - [hval $tc_root/display/act_pos_C] == [hval $tc_root/display/set_pos_C] } { + if { [hval $tc_root/display/act_pos_GA] == [hval $tc_root/display/set_pos_GA] && + [hval $tc_root/display/act_pos_GB] == [hval $tc_root/display/set_pos_GB] && + [hval $tc_root/display/act_pos_GC] == [hval $tc_root/display/set_pos_GC] } { hsetprop $tc_root/device_state my_state "STATE_IDLE" - hsetprop $tc_root/A/Setpoint driving 0 - hsetprop $tc_root/B/Setpoint driving 0 - hsetprop $tc_root/C/Setpoint driving 0 + hsetprop $tc_root/GA/Setpoint driving 0 + hsetprop $tc_root/GB/Setpoint driving 0 + hsetprop $tc_root/GC/Setpoint driving 0 debug_log "drive_state: [sct] IDLE" hset $tc_root/drive_state "IDLE" } @@ -972,9 +972,9 @@ debug_log "Creating node $nodeName" hsetprop $scobj_hpath/$setNodeName checklimits ${ns}::$chkLimits $scobj_hpath hsetprop $scobj_hpath/$setNodeName checkstatus ${ns}::$chkStatus $scobj_hpath hsetprop $scobj_hpath/$setNodeName halt ${ns}::$doHalt $scobj_hpath - ::scobj::hinitprops $name/$axis [basename $setNodeName] + ::scobj::hinitprops $name $axis [basename $setNodeName] if {[SplitReply [environment_simulation]]=="false"} { - ansto_makesctdrive ${name}_${axis}_driveable $scobj_hpath/$setNodeName $scobj_hpath/$getNodeName $sct_controller + ansto_makesctdrive $axis $scobj_hpath/$setNodeName $scobj_hpath/$getNodeName $sct_controller } } @@ -995,15 +995,15 @@ debug_log "Creating node $nodeName" Display on_auto 0 1 0 int user {on_auto} {rdValue} {on_auto} {wrValue} {}\ Display on_program 0 0 0 int user {on_program} {rdValue} {} {} {}\ Display on_cycleon 0 0 0 int user {on_cycleon} {rdValue} {} {} {}\ - Display act_pos_C 1 0 0 float user {act_pos_1} {rdAngle} {} {} {}\ - Display act_pos_B 1 0 0 float user {act_pos_2} {rdAngle} {} {} {}\ - Display act_pos_A 1 0 0 float user {act_pos_3} {rdAngle} {} {} {}\ + Display act_pos_GC 1 0 0 float user {act_pos_1} {rdAngle} {} {} {}\ + Display act_pos_GB 1 0 0 float user {act_pos_2} {rdAngle} {} {} {}\ + Display act_pos_GA 1 0 0 float user {act_pos_3} {rdAngle} {} {} {}\ Display opmode 0 0 0 int user {opmode} {rdValue} {} {} {}\ Display prognumber 1 0 0 int user {mainProgNumber} {rdValue} {} {} {}\ Display reset 1 1 0 int user {visin_ctrlR} {rdValue} {visin_ctrlR} {wrValue} {}\ - Display set_pos_A 1 1 0 float user {p101} {rdAngle} {p101} {wrAngle} {0:360}\ - Display set_pos_B 1 1 0 float user {p102} {rdAngle} {p102} {wrAngle} {-180:180}\ - Display set_pos_C 1 1 0 float user {p103} {rdAngle} {p103} {wrAngle} {-180:180}\ + Display set_pos_GA 1 1 0 float user {p101} {rdAngle} {p101} {wrAngle} {0:360}\ + Display set_pos_GB 1 1 0 float user {p102} {rdAngle} {p102} {wrAngle} {-180:180}\ + Display set_pos_GC 1 1 0 float user {p103} {rdAngle} {p103} {wrAngle} {-180:180}\ Display feed_rate 1 1 0 int user {p104} {rdValue} {p104} {wrValue} {0:99999}\ Display dwell_time 1 1 0 int user {p105} {rdValue} {p105} {wrValue} {}\ Display visauto 1 1 0 int user {visauto} {rdValue} {visauto} {wrValue} {}\ @@ -1012,20 +1012,20 @@ debug_log "Creating node $nodeName" Display vise_stop 0 1 0 int user {vise_stop} {rdValue} {vise_stop} {wrValue} {}\ Display Value 1 0 0 int internal {mainProgNumber} {rdValue} {} {} {}\ {} Setpoint 0 1 1 int user {} {} {} {setPoint} {}\ - A Setpoint 0 1 1 float user {} {} {} {setPt} {-180:180}\ - A Value 1 0 0 float user {} {rdV.rdN} {} {} {}\ - B Setpoint 0 1 1 float user {} {} {} {setPt} {-180:180}\ - B Value 1 0 0 float user {} {rdV.rdN} {} {} {}\ - C Setpoint 0 1 1 float user {} {} {} {setPt} {-180:180}\ - C Value 1 0 0 float user {} {rdV.rdN} {} {} {}\ + GA Setpoint 0 1 1 float user {} {} {} {setPt} {-180:180}\ + GA Value 1 0 0 float user {} {rdV.rdN} {} {} {}\ + GB Setpoint 0 1 1 float user {} {} {} {setPt} {-180:180}\ + GB Value 1 0 0 float user {} {rdV.rdN} {} {} {}\ + GC Setpoint 0 1 1 float user {} {} {} {setPt} {-180:180}\ + GC Value 1 0 0 float user {} {rdV.rdN} {} {} {}\ Display Tree 0 1 0 text user {} {} {} {wrTree} {}\ } hfactory $scobj_hpath/Control plain spy none hfactory $scobj_hpath/Display plain spy none - hfactory $scobj_hpath/A plain spy none - hfactory $scobj_hpath/B plain spy none - hfactory $scobj_hpath/C plain spy none + hfactory $scobj_hpath/GA plain spy none + hfactory $scobj_hpath/GB plain spy none + hfactory $scobj_hpath/GC plain spy none foreach {cmdGroup varName readable writable drivable dataType permission rdCmd rdFunc wrCmd wrFunc allowedValues} $deviceCommand { createNode $scobj_hpath $sct_controller $cmdGroup $varName $readable $writable $drivable $dataType $permission $rdCmd $rdFunc $wrCmd $wrFunc $allowedValues $klass @@ -1081,9 +1081,9 @@ debug_log "Creating node $nodeName" if {[SplitReply [environment_simulation]]=="false"} { ansto_makesctdrive ${tempobj}_driveable $scobj_hpath/setpoint $scobj_hpath/display/value $sct_controller } - createDriveable ${tempobj} A $scobj_hpath A/Value A/Setpoint checklimits drivestatus halt $sct_controller - createDriveable ${tempobj} B $scobj_hpath B/Value B/Setpoint checklimits drivestatus halt $sct_controller - createDriveable ${tempobj} C $scobj_hpath C/Value C/Setpoint checklimits drivestatus halt $sct_controller + createDriveable ${tempobj} GA $scobj_hpath GA/Value GA/Setpoint checklimits drivestatus halt $sct_controller + createDriveable ${tempobj} GB $scobj_hpath GB/Value GB/Setpoint checklimits drivestatus halt $sct_controller + createDriveable ${tempobj} GC $scobj_hpath GC/Value GC/Setpoint checklimits drivestatus halt $sct_controller } catch_message ] if {$catch_status != 0} {