Make sure spin flipper code in rfamp.c is initialised
Fixed drive bugs in lakeshore drivers. r3071 | ffr | 2011-02-25 18:27:31 +1100 (Fri, 25 Feb 2011) | 2 lines
This commit is contained in:
committed by
Douglas Clowes
parent
009fdbfc29
commit
7371a561d9
@@ -446,19 +446,14 @@ proc setDesiredField {tc_root nextState cmd} {
|
||||
set ns ::scobj::lh45
|
||||
set par [sct target]
|
||||
|
||||
#hset $tc_root/status "busy"
|
||||
set wrStatus [sct writestatus]
|
||||
if {$wrStatus == "start"} {
|
||||
# Called by drive adapter
|
||||
# puts "setDesiredField(): driving set to 1"
|
||||
set nodename $tc_root/sensor/setpoint
|
||||
hsetprop $nodename driving 1
|
||||
}
|
||||
#puts "setDesiredField(wrStatus=$wrStatus): sct send $cmd$par"
|
||||
after $::scobj::bruker_BEC1::bruker_BEC1_MIN_TIME_BETWEEN_COMMANDS
|
||||
sct send "$cmd$par"
|
||||
return $nextState
|
||||
} message ]
|
||||
if {$catch_status == 1} {
|
||||
# TCL_ERROR
|
||||
sct driving 0
|
||||
}
|
||||
handle_exception $catch_status $message "in setDesiredField(). Last write command: $::scobj::bruker_BEC1::bruker_BEC1_lastWriteCmd"
|
||||
}
|
||||
|
||||
@@ -475,19 +470,14 @@ proc setDesiredCurrent {tc_root nextState cmd} {
|
||||
set ns ::scobj::lh45
|
||||
set par [sct target]
|
||||
|
||||
#hset $tc_root/status "busy"
|
||||
set wrStatus [sct writestatus]
|
||||
if {$wrStatus == "start"} {
|
||||
# Called by drive adapter
|
||||
# puts "setDesiredCurrent(): driving set to 1"
|
||||
set nodename $tc_root/sensor/nominal_outp_current
|
||||
hsetprop $nodename driving 1
|
||||
}
|
||||
#puts "setDesiredCurrent(wrStatus=$wrStatus): sct send $cmd$par"
|
||||
after $::scobj::bruker_BEC1::bruker_BEC1_MIN_TIME_BETWEEN_COMMANDS
|
||||
sct send "$cmd$par"
|
||||
return $nextState
|
||||
} message ]
|
||||
if {$catch_status == 1} {
|
||||
# TCL_ERROR
|
||||
sct driving 0
|
||||
}
|
||||
handle_exception $catch_status $message "in setDesiredCurrent(). Last write command: $::scobj::bruker_BEC1::bruker_BEC1_lastWriteCmd"
|
||||
}
|
||||
|
||||
|
||||
@@ -71,9 +71,9 @@ debug_log "setPoint new data for $tc_root [sct] result=$par"
|
||||
hset $tc_root/status "busy"
|
||||
sct print "status: busy"
|
||||
hset $tc_root/drive_state "START"
|
||||
hsetprop $tc_root/setpoint driving 1
|
||||
} catch_message ]
|
||||
if {$catch_status != 0} {
|
||||
hsetprop $tc_root/setpoint driving 0
|
||||
return -code error $catch_message
|
||||
}
|
||||
sct print "setPoint: [hget $tc_root/drive_state]"
|
||||
|
||||
@@ -94,9 +94,9 @@ debug_log "setPoint new data for $tc_root [sct] result=$par"
|
||||
hset $tc_root/status "busy"
|
||||
sct print "status: busy"
|
||||
hset $tc_root/drive_state "START"
|
||||
hsetprop $tc_root/setpoint driving 1
|
||||
} catch_message ]
|
||||
if {$catch_status != 0} {
|
||||
hsetprop $tc_root/setpoint driving 0
|
||||
return -code error $catch_message
|
||||
}
|
||||
sct print "setPoint: [hget $tc_root/drive_state]"
|
||||
@@ -456,6 +456,7 @@ debug_log "rdState $tc_root error scan status = $rslt on $my_status"
|
||||
set lolimit [hval $tc_root/lowerlimit]
|
||||
set hilimit [hval $tc_root/upperlimit]
|
||||
if {$setpoint < $lolimit || $setpoint > $hilimit} {
|
||||
sct driving 0
|
||||
error "setpoint violates limits"
|
||||
}
|
||||
return OK
|
||||
|
||||
Reference in New Issue
Block a user