Switch off spin flipper if voltage exceeds 34V in voltage control mode
r2939 | ffr | 2010-05-26 13:32:42 +1000 (Wed, 26 May 2010) | 2 lines
This commit is contained in:
committed by
Douglas Clowes
parent
a0923650d9
commit
9926044c35
@@ -40,6 +40,8 @@ namespace eval ::scobj::rfgen {
|
||||
variable RAMPSTART 2
|
||||
variable RAMPBUSY 3
|
||||
variable RAMPTOZERO 4
|
||||
variable FLIPOFF 5
|
||||
variable MAXVOLTAGE 34
|
||||
}
|
||||
|
||||
##
|
||||
@@ -139,8 +141,8 @@ proc ::scobj::rfgen::rdStatFunc {} {
|
||||
variable RAMPSTART
|
||||
variable RAMPTOZERO
|
||||
variable RAMPIDLE
|
||||
|
||||
set MAXVOLTAGE 34
|
||||
variable FLIPOFF
|
||||
variable MAXVOLTAGE
|
||||
|
||||
set basePath [sct]
|
||||
|
||||
@@ -155,17 +157,6 @@ proc ::scobj::rfgen::rdStatFunc {} {
|
||||
set statList [split $statStr "|="]
|
||||
mkStatArr stateArr $statList
|
||||
|
||||
if {$stateArr(CV)} {
|
||||
broadcast "WARNING: spin flipper has switched to voltage control"
|
||||
if {$stateArr(voltage) >= $MAXVOLTAGE} {
|
||||
set errMsg "ERROR: Spin flipper switched off voltage exceeds $MAXVOLTAGE in voltage control state, check vacuum"
|
||||
sct geterror $errMsg
|
||||
broadcast $errMsg
|
||||
sct ramping $RAMPSTOP
|
||||
return stateChange
|
||||
}
|
||||
}
|
||||
|
||||
if {$statList != [sct oldStateRep]} {
|
||||
hset $basePath/flip_current [expr {$stateArr(curr) / 10.0}]
|
||||
hset $basePath/flip_frequency $stateArr(freq)
|
||||
@@ -176,6 +167,13 @@ proc ::scobj::rfgen::rdStatFunc {} {
|
||||
sct utime readtime
|
||||
sct oldStateRep $statList
|
||||
}
|
||||
if {$currSuperState != $FLIPOFF && $stateArr(curr) > [sct currTol] && $stateArr(O) && $stateArr(CV)} {
|
||||
broadcast "WARNING: spin flipper has switched to voltage control, voltage = $stateArr(voltage)"
|
||||
if {$stateArr(voltage) >= $MAXVOLTAGE} {
|
||||
sct ramping $FLIPOFF
|
||||
}
|
||||
}
|
||||
|
||||
return stateChange
|
||||
}
|
||||
|
||||
@@ -187,6 +185,8 @@ proc ::scobj::rfgen::stateFunc {} {
|
||||
variable RAMPSTART
|
||||
variable RAMPBUSY
|
||||
variable RAMPTOZERO
|
||||
variable FLIPOFF
|
||||
variable MAXVOLTAGE
|
||||
|
||||
set basePath [sct]
|
||||
|
||||
@@ -233,6 +233,17 @@ proc ::scobj::rfgen::stateFunc {} {
|
||||
}
|
||||
return ramp
|
||||
}
|
||||
$FLIPOFF {
|
||||
sct targetCurr 0
|
||||
sct OutputState 0
|
||||
if { $stateArr(curr) <= [sct currTol] } {
|
||||
sct ramping $RAMPSTOP
|
||||
broadcast "ERROR: Spin flipper switched off voltage exceeds $MAXVOLTAGE in voltage control state, check vacuum"
|
||||
return idle
|
||||
} else {
|
||||
return ramp
|
||||
}
|
||||
}
|
||||
$RAMPSTOP {
|
||||
# broadcast RAMPSTOP
|
||||
if [string match $currControlStatus "BUSY"] {
|
||||
|
||||
Reference in New Issue
Block a user