Merge branch 'RELEASE-3_1' into RELEASE-3_2
Conflicts: sics/site_ansto/instrument/reflectometer/platypus_configuration.tcl
This commit is contained in:
16
site_ansto/instrument/TEST_SICS/setup/pelican
Executable file
16
site_ansto/instrument/TEST_SICS/setup/pelican
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
echo me:${0}
|
||||||
|
. $(dirname ${0})/common
|
||||||
|
status=${?}
|
||||||
|
echo root:${status}:${root}
|
||||||
|
if [ ! ${status} ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
gnome-terminal \
|
||||||
|
--tab --title="Motors" \
|
||||||
|
--working-directory=${root}/fakeGalil \
|
||||||
|
--command="${root}/fakeGalil/SIM_GALIL.py -w pelican" \
|
||||||
|
--tab --title="Bash" \
|
||||||
|
--working-directory=${root} \
|
||||||
|
--command="bash"
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
# vim: ts=8 sts=2 sw=2 expandtab autoindent smartindent nocindent
|
# vim: ts=8 sts=2 sw=2 expandtab autoindent smartindent nocindent
|
||||||
driver watlow_mrm = {
|
driver watlow_mrm = {
|
||||||
protocol = std
|
protocol = modbus
|
||||||
sobj_priv_type = 'user float'
|
sobj_priv_type = 'user float'
|
||||||
class = environment
|
class = environment
|
||||||
simulation_group = environment_simulation
|
simulation_group = environment_simulation
|
||||||
|
@ -61,8 +61,8 @@ proc ::scobj::watlow_mrm::add_driver {name device_class simulation_flag ip_addre
|
|||||||
::scobj::watlow_mrm::sics_log 9 "makesctcontroller sct_${name} aqadapter ${tcp_port}"
|
::scobj::watlow_mrm::sics_log 9 "makesctcontroller sct_${name} aqadapter ${tcp_port}"
|
||||||
makesctcontroller sct_${name} aqadapter ${tcp_port}
|
makesctcontroller sct_${name} aqadapter ${tcp_port}
|
||||||
} else {
|
} else {
|
||||||
::scobj::watlow_mrm::sics_log 9 "makesctcontroller sct_${name} std ${ip_address}:${tcp_port}"
|
::scobj::watlow_mrm::sics_log 9 "makesctcontroller sct_${name} modbus ${ip_address}:${tcp_port}"
|
||||||
makesctcontroller sct_${name} std ${ip_address}:${tcp_port}
|
makesctcontroller sct_${name} modbus ${ip_address}:${tcp_port}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
::scobj::watlow_mrm::sics_log 9 "simulation_flag=${simulation_flag} => Null sctcontroller for watlow_mrm"
|
::scobj::watlow_mrm::sics_log 9 "simulation_flag=${simulation_flag} => Null sctcontroller for watlow_mrm"
|
||||||
@ -131,7 +131,7 @@ proc ::scobj::watlow_mrm::read_config {} {
|
|||||||
if { [string equal -nocase ${asyncqueue} "sct"] } {
|
if { [string equal -nocase ${asyncqueue} "sct"] } {
|
||||||
set ip_address [dict get $v ip]
|
set ip_address [dict get $v ip]
|
||||||
set tcp_port [dict get $v port]
|
set tcp_port [dict get $v port]
|
||||||
makesctcontroller sct_${name} std ${ip_address}:${tcp_port}
|
makesctcontroller sct_${name} modbus ${ip_address}:${tcp_port}
|
||||||
} else {
|
} else {
|
||||||
makesctcontroller sct_${name} aqadapter ${asyncqueue}
|
makesctcontroller sct_${name} aqadapter ${asyncqueue}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,12 @@ if {$sim_mode == "true"} {
|
|||||||
#MakeAsyncQueue mc3 DMC2280 [dict get $::MOTOR_HOSTPORT MC3 HOST] [dict get $::MOTOR_HOSTPORT MC3 PORT]
|
#MakeAsyncQueue mc3 DMC2280 [dict get $::MOTOR_HOSTPORT MC3 HOST] [dict get $::MOTOR_HOSTPORT MC3 PORT]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set sample_stage_rotate "normal_sample_stage"
|
||||||
|
if { [ info exists ::config_dict ] } {
|
||||||
|
if { [ dict exists $::config_dict sample_stage implementation ] } {
|
||||||
|
set sample_stage_rotate [ dict get $::config_dict sample_stage implementation ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Dummy translation motor, useful for testing scans
|
# Dummy translation motor, useful for testing scans
|
||||||
set dummy_Home 0
|
set dummy_Home 0
|
||||||
@ -135,41 +141,43 @@ sy softlowerlim -50
|
|||||||
sy softupperlim 230
|
sy softupperlim 230
|
||||||
sy home 0
|
sy home 0
|
||||||
|
|
||||||
# mc1: Sample rotation axis
|
if {[string equal -nocase ${sample_stage_rotate} "normal_sample_stage"]} {
|
||||||
# Gearbox 100:1, screw pitch 356:1
|
# mc1: Sample rotation axis
|
||||||
# Encoder 2P17
|
# Gearbox 100:1, screw pitch 356:1
|
||||||
#set stth_Home 821487
|
# Encoder 2P17
|
||||||
set stth_Home 0
|
#set stth_Home 821487
|
||||||
#set stthStepRate [expr -$motorrate*100.0]
|
set stth_Home 0
|
||||||
set stthStepRate -2478000
|
#set stthStepRate [expr -$motorrate*100.0]
|
||||||
Motor stth $motor_driver_type [params \
|
set stthStepRate -2478000
|
||||||
asyncqueue mc1\
|
Motor stth $motor_driver_type [params \
|
||||||
host mc1-dingo\
|
asyncqueue mc1\
|
||||||
port pmc1-dingo\
|
host mc1-dingo\
|
||||||
axis D\
|
port pmc1-dingo\
|
||||||
units degree\
|
axis D\
|
||||||
hardlowerlim -722\
|
units degree\
|
||||||
hardupperlim 722\
|
hardlowerlim -722\
|
||||||
maxSpeed 0.12\
|
hardupperlim 722\
|
||||||
maxAccel 1\
|
maxSpeed 2.0\
|
||||||
maxDecel 1\
|
maxAccel 1\
|
||||||
stepsPerX $stthStepRate\
|
maxDecel 1\
|
||||||
absEnc 1\
|
stepsPerX $stthStepRate\
|
||||||
absEncHome $stth_Home\
|
absEnc 1\
|
||||||
nopowersave 1\
|
absEncHome $stth_Home\
|
||||||
cntsPerX 93206.75556 ]
|
nopowersave 1\
|
||||||
stth speed 0.1
|
cntsPerX 93206.75556 ]
|
||||||
stth accel 0.1
|
stth speed 0.5
|
||||||
stth decel 0.1
|
stth accel 0.1
|
||||||
stth part sample
|
stth decel 0.1
|
||||||
stth long_name stth
|
stth part sample
|
||||||
stth softlowerlim 0.01
|
stth long_name stth
|
||||||
stth softupperlim 359.99
|
stth softlowerlim 0.01
|
||||||
stth home 0
|
stth softupperlim 359.99
|
||||||
#stth bias_bits 25
|
stth home 0
|
||||||
#stth bias_bias -33432264
|
#stth bias_bits 25
|
||||||
stth rotary_bits 25
|
#stth bias_bias -33432264
|
||||||
stth creep_offset 0.05
|
stth rotary_bits 25
|
||||||
|
stth creep_offset 0.05
|
||||||
|
}
|
||||||
|
|
||||||
# mc1: detection Z-stage Translation
|
# mc1: detection Z-stage Translation
|
||||||
# Gearbox 5:1, Gear ratio 16:1, pitch 4mm
|
# Gearbox 5:1, Gear ratio 16:1, pitch 4mm
|
||||||
@ -199,40 +207,81 @@ dz softlowerlim 0
|
|||||||
dz softupperlim 170
|
dz softupperlim 170
|
||||||
dz home 0
|
dz home 0
|
||||||
|
|
||||||
# mc1:H Sample rotation axis
|
if {[string equal -nocase ${sample_stage_rotate} "soma"]} {
|
||||||
# Resolver 2,048 counts per degree
|
# mc1:H Sample rotation axis
|
||||||
# Motor 12,500 steps per degree
|
# Resolver 2,048 counts per degree
|
||||||
# Positive steps are CCW viewed from above
|
# Motor 12,500 steps per degree
|
||||||
set soma_Home 9867748
|
# Positive steps are CCW viewed from above
|
||||||
#set somaStepRate [expr -$motorrate*100.0]
|
set soma_Home 9867748
|
||||||
set somaStepRate 12500
|
#set somaStepRate [expr -$motorrate*100.0]
|
||||||
Motor soma $motor_driver_type [params \
|
set somaStepRate 12500
|
||||||
asyncqueue mc1\
|
Motor soma $motor_driver_type [params \
|
||||||
host mc1-dingo\
|
asyncqueue mc1\
|
||||||
port pmc1-dingo\
|
host mc1-dingo\
|
||||||
axis H\
|
port pmc1-dingo\
|
||||||
units degree\
|
axis H\
|
||||||
hardlowerlim -722\
|
units degree\
|
||||||
hardupperlim 722\
|
hardlowerlim -722\
|
||||||
maxSpeed 12\
|
hardupperlim 722\
|
||||||
maxAccel 1\
|
maxSpeed 12\
|
||||||
maxDecel 1\
|
maxAccel 1\
|
||||||
stepsPerX $somaStepRate\
|
maxDecel 1\
|
||||||
absEnc 1\
|
stepsPerX $somaStepRate\
|
||||||
absEncHome $soma_Home\
|
absEnc 1\
|
||||||
nopowersave 1\
|
absEncHome $soma_Home\
|
||||||
cntsPerX 2048 ]
|
nopowersave 1\
|
||||||
soma speed 0.1
|
cntsPerX 2048 ]
|
||||||
soma accel 0.1
|
soma speed 0.1
|
||||||
soma decel 0.1
|
soma accel 0.1
|
||||||
soma part sample
|
soma decel 0.1
|
||||||
soma long_name soma
|
soma part sample
|
||||||
soma softlowerlim -1
|
soma long_name soma
|
||||||
soma softupperlim 361
|
soma softlowerlim -1
|
||||||
soma home 0
|
soma softupperlim 361
|
||||||
#soma bias_bits 25
|
soma home 0
|
||||||
#soma rotary_bits 25
|
#soma bias_bits 25
|
||||||
soma creep_offset 0.05
|
#soma rotary_bits 25
|
||||||
|
soma creep_offset 0.05
|
||||||
|
}
|
||||||
|
|
||||||
|
if {[string equal -nocase ${sample_stage_rotate} "somb"]} {
|
||||||
|
# mc1:D,H Sample rotation axis
|
||||||
|
# Resolver 4,096 counts per degree
|
||||||
|
# Motor 10*25,000 steps per degree
|
||||||
|
# Positive steps are CCW viewed from above
|
||||||
|
set somb_Home [expr 2**23]
|
||||||
|
#set sombStepRate [expr -$motorrate*100.0]
|
||||||
|
set sombStepRate [expr 10 * 25000]
|
||||||
|
Motor somb $motor_driver_type [params \
|
||||||
|
asyncqueue mc1\
|
||||||
|
host mc1-dingo\
|
||||||
|
port pmc1-dingo\
|
||||||
|
axis D\
|
||||||
|
encoderaxis H\
|
||||||
|
units degree\
|
||||||
|
hardlowerlim -722\
|
||||||
|
hardupperlim 722\
|
||||||
|
maxSpeed 0.4\
|
||||||
|
maxAccel 1\
|
||||||
|
maxDecel 1\
|
||||||
|
stepsPerX $sombStepRate\
|
||||||
|
absEnc 1\
|
||||||
|
absEncHome $somb_Home\
|
||||||
|
nopowersave 1\
|
||||||
|
cntsPerX 4096 ]
|
||||||
|
somb speed 0.1
|
||||||
|
somb accel 0.1
|
||||||
|
somb decel 0.1
|
||||||
|
somb part sample
|
||||||
|
somb long_name somb
|
||||||
|
somb softlowerlim -1
|
||||||
|
somb softupperlim 361
|
||||||
|
somb home 0
|
||||||
|
somb bias_bits 24
|
||||||
|
somb bias_bias [expr 2**23]
|
||||||
|
#somb rotary_bits 25
|
||||||
|
somb creep_offset 0.05
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
############################
|
############################
|
||||||
@ -243,7 +292,7 @@ soma creep_offset 0.05
|
|||||||
#
|
#
|
||||||
|
|
||||||
# mc2: Camera translation axis along beam
|
# mc2: Camera translation axis along beam
|
||||||
# Gearbox ?, Gear ratio ?,
|
# Gearbox ?, Gear ratio ?,
|
||||||
set dy_Home 8847069
|
set dy_Home 8847069
|
||||||
set dyStepRate [expr 25000.0/2.0]
|
set dyStepRate [expr 25000.0/2.0]
|
||||||
Motor dy $motor_driver_type [params \
|
Motor dy $motor_driver_type [params \
|
||||||
|
@ -124,6 +124,28 @@ terminator = \r\n
|
|||||||
tol1 = 1.0
|
tol1 = 1.0
|
||||||
tol2 = 1.0
|
tol2 = 1.0
|
||||||
|
|
||||||
|
[ls336_05]
|
||||||
|
asyncqueue = sct
|
||||||
|
desc = "Lakeshore 336 temperature controller"
|
||||||
|
driver = "ls336"
|
||||||
|
imptype = temperature
|
||||||
|
ip = 137.157.201.21
|
||||||
|
port = 7777
|
||||||
|
terminator = \r\n
|
||||||
|
tol1 = 1.0
|
||||||
|
tol2 = 1.0
|
||||||
|
|
||||||
|
[ls336_06]
|
||||||
|
asyncqueue = sct
|
||||||
|
desc = "Lakeshore 336 temperature controller"
|
||||||
|
driver = "ls336"
|
||||||
|
imptype = temperature
|
||||||
|
ip = 137.157.201.21
|
||||||
|
port = 7777
|
||||||
|
terminator = \r\n
|
||||||
|
tol1 = 1.0
|
||||||
|
tol2 = 1.0
|
||||||
|
|
||||||
[ls336_11]
|
[ls336_11]
|
||||||
desc = "Lakeshore 336 temperature controller"
|
desc = "Lakeshore 336 temperature controller"
|
||||||
driver = "ls336"
|
driver = "ls336"
|
||||||
@ -207,3 +229,10 @@ imptype = multimeter
|
|||||||
ip = 10.157.205.37
|
ip = 10.157.205.37
|
||||||
port = 4001
|
port = 4001
|
||||||
|
|
||||||
|
[soma]
|
||||||
|
desc = "This is alternative Sample Omega A"
|
||||||
|
imptype = motion_axis
|
||||||
|
|
||||||
|
[somb]
|
||||||
|
desc = "This is alternative Sample Omega B"
|
||||||
|
imptype = motion_axis
|
||||||
|
@ -1,166 +1,230 @@
|
|||||||
# cf commands for driving sample environment
|
# cf commands for driving sample environment
|
||||||
# ajs feb 2015
|
# ajs feb 2015
|
||||||
|
|
||||||
# cf namespace
|
# cf namespace
|
||||||
# assumes tc1 and tc2 are the cf8 336 and 340 lakeshores for now
|
# assumes tc1 and tc2 are the cf8 336 and 340 lakeshores for now
|
||||||
|
|
||||||
namespace eval cf {
|
namespace eval cf {
|
||||||
variable wall_lag 10
|
variable wall_lag 10
|
||||||
variable wall_max 300
|
variable wall_max 200
|
||||||
variable sample_tolerance 5
|
variable sample_tolerance 5
|
||||||
variable wall_tolerance 5
|
variable wall_tolerance 5
|
||||||
variable wall_set true
|
variable wall_set true
|
||||||
variable base_set true
|
variable base_set true
|
||||||
variable base_control true
|
variable base_control true
|
||||||
variable wall_control true
|
variable wall_control true
|
||||||
|
|
||||||
proc UseWall {_wall_set _wall_control} {
|
proc UseWall {_wall_set _wall_control} {
|
||||||
variable wall_set
|
variable wall_set
|
||||||
variable wall_control
|
variable wall_control
|
||||||
if {$_wall_set == false} {set wall_set false} else {set wall_set true}
|
if {$_wall_set == false} {set wall_set false} else {set wall_set true}
|
||||||
if {$_wall_control == false} {set wall_control false} else {set wall_control true}
|
if {$_wall_control == false} {set wall_control false} else {set wall_control true}
|
||||||
}
|
}
|
||||||
|
|
||||||
proc UseBase {_base_set _base_control} {
|
proc UseBase {_base_set _base_control} {
|
||||||
variable base_set
|
variable base_set
|
||||||
variable base_control
|
variable base_control
|
||||||
if {$_base_set == false} {set base_set false} else {set base_set true}
|
if {$_base_set == false} {set base_set false} else {set base_set true}
|
||||||
if {$_base_control == false} {set base_control false} else {set base_control true}
|
if {$_base_control == false} {set base_control false} else {set base_control true}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proc RampOn {rate} {
|
||||||
proc WallParams {_wall_lag _wall_max _wall_tolerance} {
|
variable base_set
|
||||||
variable wall_lag
|
variable wall_set
|
||||||
variable wall_max
|
|
||||||
variable wall_tolerance
|
hset /sample/tc1/control/ramp_Loop_1 1,$rate
|
||||||
set wall_lag $_wall_lag
|
if {$base_set} {hset /sample/tc1/control/ramp_Loop_2 1,$rate}
|
||||||
set wall_max $_wall_max
|
if {$wall_set} {hset /sample/tc2/control/ramp_Loop_1 1,$rate}
|
||||||
set wall_tolerance $_wall_tolerance
|
wait 5
|
||||||
hset /sample/tc2/control/tolerance1 $wall_tolerance
|
}
|
||||||
}
|
|
||||||
|
proc RampOff {} {
|
||||||
proc TempSet {temp} {
|
variable base_set
|
||||||
variable wall_lag
|
variable wall_set
|
||||||
variable wall_max
|
|
||||||
variable base_set
|
hset /sample/tc1/control/ramp_Loop_1 0,5
|
||||||
variable wall_set
|
if {$base_set} {hset /sample/tc1/control/ramp_Loop_2 0,5}
|
||||||
set tempc [expr {$temp - $wall_lag}]
|
if {$wall_set} {hset /sample/tc2/control/ramp_Loop_1 0,5}
|
||||||
if {$tempc < 4} {set tempc 4}
|
wait 5
|
||||||
if {$tempc > $wall_max} {set tempc $wall_max}
|
|
||||||
hset /sample/tc1/sensor/setpoint1 $temp
|
}
|
||||||
if {$base_set} {hset /sample/tc1/sensor/setpoint2 $tempc}
|
|
||||||
if {$wall_set} {hset /sample/tc2/sensor/setpoint1 $tempc}
|
|
||||||
}
|
proc WallParams {_wall_lag _wall_max _wall_tolerance} {
|
||||||
|
variable wall_lag
|
||||||
proc TempDrive {temp} {
|
variable wall_max
|
||||||
variable wall_lag
|
variable wall_tolerance
|
||||||
variable wall_max
|
set wall_lag $_wall_lag
|
||||||
variable base_control
|
set wall_max $_wall_max
|
||||||
variable wall_control
|
set wall_tolerance $_wall_tolerance
|
||||||
TempSet $temp
|
hset /sample/tc2/control/tolerance1 $wall_tolerance
|
||||||
set tempc [expr {$temp - $wall_lag}]
|
}
|
||||||
if {$tempc < 4} {set tempc 4}
|
|
||||||
if {$tempc > $wall_max} {set tempc $wall_max}
|
proc TempSet {temp} {
|
||||||
set drstr "drive tc1_driveable \$temp"
|
variable wall_lag
|
||||||
if {$base_control} {append drstr " tc1_driveable2 \$tempc"}
|
variable wall_max
|
||||||
if {$wall_control} {append drstr " tc2_driveable \$tempc"}
|
variable base_set
|
||||||
eval $drstr
|
variable wall_set
|
||||||
}
|
set tempc [expr {$temp - $wall_lag}]
|
||||||
|
if {$tempc < 4} {set tempc 4}
|
||||||
proc Tolerance {sample} {
|
if {$tempc > $wall_max} {set tempc $wall_max}
|
||||||
hset /sample/tc1/control/tolerance1 $sample
|
hset /sample/tc1/sensor/setpoint1 $temp
|
||||||
hset /sample/tc1/control/tolerance2 $sample
|
if {$base_set} {hset /sample/tc1/sensor/setpoint2 $temp}
|
||||||
}
|
if {$wall_set} {hset /sample/tc2/sensor/setpoint1 $tempc}
|
||||||
|
}
|
||||||
proc MakeCold {} {
|
|
||||||
variable sample_tolerance
|
proc TempDrive {temp} {
|
||||||
variable wall_tolerance
|
variable wall_lag
|
||||||
Tolerance 20
|
variable wall_max
|
||||||
hset /sample/tc2/control/tolerance1 20
|
variable base_control
|
||||||
hset /sample/tc2/sensor/setpoint1 4
|
variable wall_control
|
||||||
TempDrive 4
|
TempSet $temp
|
||||||
Tolerance $sample_tolerance
|
set tempc [expr {$temp - $wall_lag}]
|
||||||
hset /sample/tc2/control/tolerance1 $wall_tolerance
|
if {$tempc < 4} {set tempc 4}
|
||||||
wait 300
|
if {$tempc > $wall_max} {set tempc $wall_max}
|
||||||
}
|
set drstr "drive tc1_driveable \$temp"
|
||||||
|
if {$base_control} {append drstr " tc1_driveable2 \$temp"}
|
||||||
|
if {$wall_control} {append drstr " tc2_driveable \$tempc"}
|
||||||
proc TempRun {temp delay numsteps oscno} {
|
eval $drstr
|
||||||
TempDrive $temp
|
}
|
||||||
wait $delay
|
|
||||||
newfile HISTOGRAM_XY
|
proc Tolerance {sample} {
|
||||||
for {set i 0} {$i < $numsteps} {incr i} {
|
hset /sample/tc1/control/tolerance1 $sample
|
||||||
oct oscillate_count $oscno
|
hset /sample/tc1/control/tolerance2 $sample
|
||||||
oct oscillate start
|
}
|
||||||
hmm countblock
|
|
||||||
save $i
|
proc MakeCold {} {
|
||||||
}
|
variable sample_tolerance
|
||||||
}
|
variable wall_tolerance
|
||||||
|
Tolerance 20
|
||||||
proc RampRun {start step fin oscno delay} {
|
hset /sample/tc2/control/tolerance1 20
|
||||||
histmem mode unlimited
|
hset /sample/tc2/sensor/setpoint1 4
|
||||||
newfile HISTOGRAM_XY
|
TempDrive 4
|
||||||
set loopvar 1
|
Tolerance $sample_tolerance
|
||||||
set i 0
|
hset /sample/tc2/control/tolerance1 $wall_tolerance
|
||||||
while {$loopvar} {
|
wait 300
|
||||||
set j [expr {$i*$step+$start}]
|
}
|
||||||
if {$j> $fin && $step > 0} {break}
|
|
||||||
if {$j< $fin && $step < 0} {break}
|
|
||||||
TempSet $j
|
proc TempRun {temp delay numsteps oscno} {
|
||||||
wait $delay
|
RampOff
|
||||||
oct oscillate_count $oscno
|
TempDrive $temp
|
||||||
oct oscillate start
|
wait $delay
|
||||||
hmm countblock
|
newfile HISTOGRAM_XY
|
||||||
save $i
|
for {set i 0} {$i < $numsteps} {incr i} {
|
||||||
incr i
|
oct oscillate_count $oscno
|
||||||
}
|
oct oscillate start
|
||||||
}
|
hmm countblock
|
||||||
|
save $i
|
||||||
proc StepRun {start step fin oscno delay} {
|
}
|
||||||
histmem mode unlimited
|
}
|
||||||
newfile HISTOGRAM_XY
|
|
||||||
set loopvar 1
|
proc StepRun {start step fin oscno delay} {
|
||||||
set i 0
|
RampOff
|
||||||
while {$loopvar} {
|
histmem mode unlimited
|
||||||
set j [expr {$i*$step+$start}]
|
newfile HISTOGRAM_XY
|
||||||
if {$j> $fin && $step > 0} {break}
|
set loopvar 1
|
||||||
if {$j< $fin && $step < 0} {break}
|
set i 0
|
||||||
TempDrive $j
|
while {$loopvar} {
|
||||||
wait $delay
|
set j [expr {$i*$step+$start}]
|
||||||
oct oscillate_count $oscno
|
if {$j> $fin && $step > 0} {break}
|
||||||
oct oscillate start
|
if {$j< $fin && $step < 0} {break}
|
||||||
hmm countblock
|
TempSet $j
|
||||||
save $i
|
wait $delay
|
||||||
incr i
|
oct oscillate_count $oscno
|
||||||
}
|
oct oscillate start
|
||||||
}
|
hmm countblock
|
||||||
|
save $i
|
||||||
proc HeaterOn {} {
|
incr i
|
||||||
variable base_set
|
}
|
||||||
variable wall_set
|
}
|
||||||
|
|
||||||
hset /sample/tc1/heater/heaterRange_1 4
|
proc StepWaitRun {start step fin oscno delay} {
|
||||||
if {$base_set} {hset /sample/tc1/heater/heaterRange_2 4}
|
RampOff
|
||||||
if {$wall_set} {hset /sample/tc2/heater/heaterRange 5}
|
histmem mode unlimited
|
||||||
}
|
newfile HISTOGRAM_XY
|
||||||
|
set loopvar 1
|
||||||
proc GetTemp {} {
|
set i 0
|
||||||
variable base_set
|
while {$loopvar} {
|
||||||
set t1top [hget /sample/tc1/sensor/sensorValueA]
|
set j [expr {$i*$step+$start}]
|
||||||
broadcast "sample top : $t1top"
|
if {$j> $fin && $step > 0} {break}
|
||||||
if {$base_set} {
|
if {$j< $fin && $step < 0} {break}
|
||||||
set t1base [hget /sample/tc1/sensor/sensorValueB]
|
TempDrive $j
|
||||||
broadcast "sample base: $t1base"
|
wait $delay
|
||||||
}
|
oct oscillate_count $oscno
|
||||||
set t1wall [hget /sample/tc2/sensor/sensorValueA]
|
oct oscillate start
|
||||||
broadcast "sample wall: $t1wall"
|
hmm countblock
|
||||||
}
|
save $i
|
||||||
|
incr i
|
||||||
|
}
|
||||||
|
}
|
||||||
namespace export *
|
|
||||||
namespace ensemble create
|
|
||||||
}
|
proc RampRun {start rate fin oscno} {
|
||||||
|
|
||||||
publish cf user
|
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
|
||||||
|
|
||||||
|
hset /sample/tc1/heater/heaterRange_1 4
|
||||||
|
if {$base_set} {hset /sample/tc1/heater/heaterRange_2 4}
|
||||||
|
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"
|
||||||
|
}
|
||||||
|
set t1wall [hget /sample/tc2/sensor/sensorValueA]
|
||||||
|
broadcast "sample wall: $t1wall"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
namespace export *
|
||||||
|
namespace ensemble create
|
||||||
|
}
|
||||||
|
|
||||||
|
publish cf user
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ proc ::histogram_memory::init_OAT_TABLE {args} {
|
|||||||
hmm configure fat_frame_source INTERNAL
|
hmm configure fat_frame_source INTERNAL
|
||||||
|
|
||||||
|
|
||||||
set resolution "double_x"
|
# set resolution "double_x"
|
||||||
|
|
||||||
switch $resolution {
|
switch $resolution {
|
||||||
"hires" {
|
"hires" {
|
||||||
|
@ -97,7 +97,7 @@ SetVoltScale 1000.0
|
|||||||
# LS336 02 at 205.29
|
# LS336 02 at 205.29
|
||||||
# add_sct_ls336 tc2 10.157.205.30 7777 "\r\n" 1.0 1.0
|
# 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_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
|
server_init
|
||||||
###########################################
|
###########################################
|
||||||
|
@ -19,7 +19,8 @@ proc ::histogram_memory::init_OAT_TABLE {} {
|
|||||||
hmm configure fat_frame_source EXTERNAL
|
hmm configure fat_frame_source EXTERNAL
|
||||||
|
|
||||||
# OAT_TABLE -set X { -210.5 -209.5 } NXC 421 Y { -110.5 -109.5 } NYC 221 T { 0 40 } NTC 1000
|
# OAT_TABLE -set X { -210.5 -209.5 } NXC 421 Y { -110.5 -109.5 } NYC 221 T { 0 40 } NTC 1000
|
||||||
OAT_TABLE -set X { 56.5 -56.5 } NXC 1 Y { 110.5 109.5 } NYC 221 T { 0 40 } NTC 1000
|
# OAT_TABLE -set X { 56.5 -56.5 } NXC 1 Y { 110.5 109.5 } NYC 221 T { 0 40 } NTC 1000
|
||||||
|
OAT_TABLE -set X { 60.5 -60.5 } NXC 1 Y { 110.5 109.5 } NYC 221 T { 0 40 } NTC 1000
|
||||||
} message ] {
|
} message ] {
|
||||||
if {$::errorCode=="NONE"} {return $message}
|
if {$::errorCode=="NONE"} {return $message}
|
||||||
return -code error $message
|
return -code error $message
|
||||||
|
@ -27,6 +27,7 @@ fileeval $cfPath(plc)/plc.tcl
|
|||||||
fileeval $cfPath(counter)/counter.tcl
|
fileeval $cfPath(counter)/counter.tcl
|
||||||
fileeval $cfPath(environment)/sct_syr.tcl
|
fileeval $cfPath(environment)/sct_syr.tcl
|
||||||
fileeval $cfPath(environment)/syringe_pump_sct.tcl
|
fileeval $cfPath(environment)/syringe_pump_sct.tcl
|
||||||
|
fileeval $cfPath(environment)/isotech_ps_sct.tcl
|
||||||
fileeval $cfPath(environment)/knauer_pump_sct.tcl
|
fileeval $cfPath(environment)/knauer_pump_sct.tcl
|
||||||
fileeval $cfPath(environment)/sct_mvp.tcl
|
fileeval $cfPath(environment)/sct_mvp.tcl
|
||||||
fileeval $cfPath(environment)/mvp_valve_sct.tcl
|
fileeval $cfPath(environment)/mvp_valve_sct.tcl
|
||||||
@ -40,6 +41,7 @@ fileeval $cfPath(environment)/temperature/sct_lakeshore_336.tcl
|
|||||||
fileeval $cfPath(environment)/temperature/ls336_sct.tcl
|
fileeval $cfPath(environment)/temperature/ls336_sct.tcl
|
||||||
fileeval $cfPath(environment)/temperature/sct_lakeshore_340.tcl
|
fileeval $cfPath(environment)/temperature/sct_lakeshore_340.tcl
|
||||||
fileeval $cfPath(environment)/temperature/ls340_sct.tcl
|
fileeval $cfPath(environment)/temperature/ls340_sct.tcl
|
||||||
|
fileeval $cfPath(environment)/temperature/julabo_lh45_sct.tcl
|
||||||
fileeval $cfPath(environment)/temperature/julabo_lh45_gen_sct.tcl
|
fileeval $cfPath(environment)/temperature/julabo_lh45_gen_sct.tcl
|
||||||
fileeval $cfPath(environment)/temperature/oxford_mercury_sct.tcl
|
fileeval $cfPath(environment)/temperature/oxford_mercury_sct.tcl
|
||||||
fileeval $cfPath(hmm)/hmm_configuration.tcl
|
fileeval $cfPath(hmm)/hmm_configuration.tcl
|
||||||
|
@ -47,11 +47,21 @@ set 10sample_table {
|
|||||||
10 -214.5996
|
10 -214.5996
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set 5sample_table {
|
||||||
|
1 120
|
||||||
|
2 60
|
||||||
|
3 0
|
||||||
|
4 -60
|
||||||
|
5 -120
|
||||||
|
}
|
||||||
|
|
||||||
if { [ info exists ::config_dict ] } {
|
if { [ info exists ::config_dict ] } {
|
||||||
if { [ dict exists $::config_dict sample_stage implementation ] } {
|
if { [ dict exists $::config_dict sample_stage implementation ] } {
|
||||||
set implementation [ dict get $::config_dict sample_stage implementation ]
|
set implementation [ dict get $::config_dict sample_stage implementation ]
|
||||||
if {$implementation == "normal_sample_stage"} {
|
if {$implementation == "normal_sample_stage"} {
|
||||||
# Don't make posit motor
|
# Don't make posit motor
|
||||||
|
} elseif {$implementation == "5_pos_sample_tumbler"} {
|
||||||
|
mkPosit sct_mc1 sampleNum float samx sample $5sample_table
|
||||||
} elseif {$implementation == "10_pos_sample_stage"} {
|
} elseif {$implementation == "10_pos_sample_stage"} {
|
||||||
mkPosit sct_mc1 sampleNum float samx sample $10sample_table
|
mkPosit sct_mc1 sampleNum float samx sample $10sample_table
|
||||||
} elseif {$implementation == "20_pos_sample_stage"} {
|
} elseif {$implementation == "20_pos_sample_stage"} {
|
||||||
|
@ -510,7 +510,7 @@ Motor m1 $motor_driver_type [params \
|
|||||||
maxDecel 0.25\
|
maxDecel 0.25\
|
||||||
stepsPerX 100000\
|
stepsPerX 100000\
|
||||||
absEnc 1\
|
absEnc 1\
|
||||||
absEncHome 16189898\
|
absEncHome 16190612\
|
||||||
cntsPerX -2048]
|
cntsPerX -2048]
|
||||||
m1 part crystal
|
m1 part crystal
|
||||||
m1 long_name m1
|
m1 long_name m1
|
||||||
|
Reference in New Issue
Block a user