SICS-377 hipadaba_configuration_common.tcl
One typo and forgetting to clear a temporary variable meant that the list of candidates for removal never shrank while pruning reflectometer/config/motors/sct_batmotor.tcl The beam attenuator is on axis D not A. Also provide statemon feedback, "busy" or "idle" sans/config/velsel/velsel.tcl Update velocity selector parameters for NVS 43 SICS-374 sans/config/velsel/sct_velsel.tcl Set velocity selector identifier script_context_util.tcl Don't override the "klass' attribute, just make sure that it matches the hdb klass property if it's defined. event.h and statemon.c Added statemon BUSY and IDLE events for the scbat because it when it oscillates it's busy doing something. r2875 | ffr | 2010-01-22 20:41:36 +1100 (Fri, 22 Jan 2010) | 18 lines
This commit is contained in:
committed by
Douglas Clowes
parent
4a7bfba81e
commit
3a3b6764ee
@@ -9,6 +9,7 @@ namespace eval ::scobj::galil {
|
||||
|
||||
set NS ::scobj::galil
|
||||
set batObjName scbat
|
||||
|
||||
set batpath /sics/$batObjName
|
||||
|
||||
set sim_mode [SplitReply [motor_simulation]]
|
||||
@@ -113,14 +114,14 @@ namespace eval ::scobj::galil {
|
||||
# NOTE: If you change the status command you must also
|
||||
# update the rdStatus procedure
|
||||
proc getStatus {} {
|
||||
sct send "MG OSCD,POS,_TPA,DBAND"
|
||||
sct send "MG OSCD,POS,_TPD,DBAND"
|
||||
return rdStatus
|
||||
}
|
||||
|
||||
##
|
||||
# @brief Parse the status reply from the Galil and set
|
||||
# the abstract status.
|
||||
proc rdStatus {} {
|
||||
proc rdStatus {batName} {
|
||||
variable bat_state
|
||||
|
||||
set data [sct result]
|
||||
@@ -131,12 +132,15 @@ namespace eval ::scobj::galil {
|
||||
default {
|
||||
if {$data != [sct oldval]} {
|
||||
sct oldval $data
|
||||
foreach {OSCD POS TPA DBAND} $data {}
|
||||
foreach {OSCD POS TPD DBAND} $data {}
|
||||
if [expr $OSCD == $bat_state(OSC)] {
|
||||
statemon busy $batName
|
||||
set newStatus "busy"
|
||||
} elseif [expr abs($TPA - $POS) < $DBAND] {
|
||||
} elseif [expr abs($TPD - $POS) < $DBAND] {
|
||||
statemon idle $batName
|
||||
set newStatus "idle"
|
||||
} else {
|
||||
statemon busy $batName
|
||||
set newStatus "busy"
|
||||
}
|
||||
if {[sct oldStatus] != $newStatus} {
|
||||
@@ -161,7 +165,7 @@ namespace eval ::scobj::galil {
|
||||
# Report the abstract status to GumTree
|
||||
hfactory $batpath/status plain user text
|
||||
hsetprop $batpath/status read ${NS}::getStatus
|
||||
hsetprop $batpath/status rdStatus ${NS}::rdStatus
|
||||
hsetprop $batpath/status rdStatus ${NS}::rdStatus $batObjName
|
||||
hsetprop $batpath/status values busy,idle
|
||||
hsetprop $batpath/status oldval UNKNOWN
|
||||
hsetprop $batpath/status oldStatus UNKNOWN
|
||||
@@ -170,7 +174,7 @@ namespace eval ::scobj::galil {
|
||||
# Report the current position in encoder counts
|
||||
# Useful as an activity monitor and troubleshooting.
|
||||
hfactory $batpath/pos plain user int
|
||||
hsetprop $batpath/pos read ${NS}::getValue rdValue "TPA"
|
||||
hsetprop $batpath/pos read ${NS}::getValue rdValue "TPD"
|
||||
hsetprop $batpath/pos rdValue ${NS}::rdValue
|
||||
hsetprop $batpath/pos oldval UNKNOWN
|
||||
|
||||
|
||||
Reference in New Issue
Block a user