Pullback from Wombat 2015-04-17

This commit is contained in:
Douglas Clowes
2015-04-17 13:12:42 +10:00
parent 25d73eb17a
commit f2568b681d
3 changed files with 232 additions and 168 deletions

View File

@ -6,7 +6,7 @@
namespace eval cf {
variable wall_lag 10
variable wall_max 300
variable wall_max 200
variable sample_tolerance 5
variable wall_tolerance 5
variable wall_set true
@ -28,6 +28,27 @@ namespace eval cf {
if {$_base_control == false} {set base_control false} else {set base_control true}
}
proc RampOn {rate} {
variable base_set
variable wall_set
hset /sample/tc1/control/ramp_Loop_1 1,$rate
if {$base_set} {hset /sample/tc1/control/ramp_Loop_2 1,$rate}
if {$wall_set} {hset /sample/tc2/control/ramp_Loop_1 1,$rate}
wait 5
}
proc RampOff {} {
variable base_set
variable wall_set
hset /sample/tc1/control/ramp_Loop_1 0,5
if {$base_set} {hset /sample/tc1/control/ramp_Loop_2 0,5}
if {$wall_set} {hset /sample/tc2/control/ramp_Loop_1 0,5}
wait 5
}
proc WallParams {_wall_lag _wall_max _wall_tolerance} {
variable wall_lag
@ -48,7 +69,7 @@ namespace eval cf {
if {$tempc < 4} {set tempc 4}
if {$tempc > $wall_max} {set tempc $wall_max}
hset /sample/tc1/sensor/setpoint1 $temp
if {$base_set} {hset /sample/tc1/sensor/setpoint2 $tempc}
if {$base_set} {hset /sample/tc1/sensor/setpoint2 $temp}
if {$wall_set} {hset /sample/tc2/sensor/setpoint1 $tempc}
}
@ -62,7 +83,7 @@ namespace eval cf {
if {$tempc < 4} {set tempc 4}
if {$tempc > $wall_max} {set tempc $wall_max}
set drstr "drive tc1_driveable \$temp"
if {$base_control} {append drstr " tc1_driveable2 \$tempc"}
if {$base_control} {append drstr " tc1_driveable2 \$temp"}
if {$wall_control} {append drstr " tc2_driveable \$tempc"}
eval $drstr
}
@ -86,6 +107,7 @@ namespace eval cf {
proc TempRun {temp delay numsteps oscno} {
RampOff
TempDrive $temp
wait $delay
newfile HISTOGRAM_XY
@ -97,7 +119,8 @@ namespace eval cf {
}
}
proc RampRun {start step fin oscno delay} {
proc StepRun {start step fin oscno delay} {
RampOff
histmem mode unlimited
newfile HISTOGRAM_XY
set loopvar 1
@ -116,7 +139,8 @@ namespace eval cf {
}
}
proc StepRun {start step fin oscno delay} {
proc StepWaitRun {start step fin oscno delay} {
RampOff
histmem mode unlimited
newfile HISTOGRAM_XY
set loopvar 1
@ -135,6 +159,36 @@ namespace eval cf {
}
}
proc RampRun {start rate fin oscno} {
RampOff
TempSet $start
wait 5
set tim1 [clock seconds]
set tlength [expr abs($start-$fin)/($rate/60.0)]
broadcast $rate $tlength
RampOn $rate
wait 5
TempSet $fin
set bool 0
set i 0
histmem mode unlimited
newfile HISTOGRAM_XY
while {$bool==0} {
oct oscillate_count $oscno
oct oscillate start
hmm countblock
save $i
incr i
set tim2 [expr [clock seconds]-$tim1]
broadcast $tim2
if {$tim2>$tlength} {set bool 1}
}
RampOff
}
proc HeaterOn {} {
variable base_set
variable wall_set
@ -144,10 +198,20 @@ namespace eval cf {
if {$wall_set} {hset /sample/tc2/heater/heaterRange 5}
}
proc HeaterOff {} {
variable base_set
variable wall_set
hset /sample/tc1/heater/heaterRange_1 0
if {$base_set} {hset /sample/tc1/heater/heaterRange_2 0}
if {$wall_set} {hset /sample/tc2/heater/heaterRange 0}
}
proc GetTemp {} {
variable base_set
set t1top [hget /sample/tc1/sensor/sensorValueA]
broadcast "sample top : $t1top"
if {$base_set} {
set t1base [hget /sample/tc1/sensor/sensorValueB]
broadcast "sample base: $t1base"

View File

@ -28,7 +28,7 @@ proc ::histogram_memory::init_OAT_TABLE {args} {
hmm configure fat_frame_source INTERNAL
set resolution "double_x"
# set resolution "double_x"
switch $resolution {
"hires" {

View File

@ -97,7 +97,7 @@ SetVoltScale 1000.0
# LS336 02 at 205.29
# add_sct_ls336 tc2 10.157.205.30 7777 "\r\n" 1.0 1.0
# add_sct_ls336 tc1 10.157.205.31 7777 "\r\n" 1.0 1.0
# add_sct_ls340 tc3 137.157.201.86 4001 "\r\n" 1.0 1.0
# add_sct_ls340 tc3 137.157.201.86 4002 "\r\n" 1.0 1.0
server_init
###########################################