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
|
||||
driver watlow_mrm = {
|
||||
protocol = std
|
||||
protocol = modbus
|
||||
sobj_priv_type = 'user float'
|
||||
class = environment
|
||||
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}"
|
||||
makesctcontroller sct_${name} aqadapter ${tcp_port}
|
||||
} else {
|
||||
::scobj::watlow_mrm::sics_log 9 "makesctcontroller sct_${name} std ${ip_address}:${tcp_port}"
|
||||
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} modbus ${ip_address}:${tcp_port}
|
||||
}
|
||||
} else {
|
||||
::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"] } {
|
||||
set ip_address [dict get $v ip]
|
||||
set tcp_port [dict get $v port]
|
||||
makesctcontroller sct_${name} std ${ip_address}:${tcp_port}
|
||||
makesctcontroller sct_${name} modbus ${ip_address}:${tcp_port}
|
||||
} else {
|
||||
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]
|
||||
}
|
||||
|
||||
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
|
||||
set dummy_Home 0
|
||||
@ -135,6 +141,7 @@ sy softlowerlim -50
|
||||
sy softupperlim 230
|
||||
sy home 0
|
||||
|
||||
if {[string equal -nocase ${sample_stage_rotate} "normal_sample_stage"]} {
|
||||
# mc1: Sample rotation axis
|
||||
# Gearbox 100:1, screw pitch 356:1
|
||||
# Encoder 2P17
|
||||
@ -150,7 +157,7 @@ Motor stth $motor_driver_type [params \
|
||||
units degree\
|
||||
hardlowerlim -722\
|
||||
hardupperlim 722\
|
||||
maxSpeed 0.12\
|
||||
maxSpeed 2.0\
|
||||
maxAccel 1\
|
||||
maxDecel 1\
|
||||
stepsPerX $stthStepRate\
|
||||
@ -158,7 +165,7 @@ Motor stth $motor_driver_type [params \
|
||||
absEncHome $stth_Home\
|
||||
nopowersave 1\
|
||||
cntsPerX 93206.75556 ]
|
||||
stth speed 0.1
|
||||
stth speed 0.5
|
||||
stth accel 0.1
|
||||
stth decel 0.1
|
||||
stth part sample
|
||||
@ -170,6 +177,7 @@ stth home 0
|
||||
#stth bias_bias -33432264
|
||||
stth rotary_bits 25
|
||||
stth creep_offset 0.05
|
||||
}
|
||||
|
||||
# mc1: detection Z-stage Translation
|
||||
# Gearbox 5:1, Gear ratio 16:1, pitch 4mm
|
||||
@ -199,6 +207,7 @@ dz softlowerlim 0
|
||||
dz softupperlim 170
|
||||
dz home 0
|
||||
|
||||
if {[string equal -nocase ${sample_stage_rotate} "soma"]} {
|
||||
# mc1:H Sample rotation axis
|
||||
# Resolver 2,048 counts per degree
|
||||
# Motor 12,500 steps per degree
|
||||
@ -233,6 +242,46 @@ soma home 0
|
||||
#soma bias_bits 25
|
||||
#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
|
||||
}
|
||||
|
||||
|
||||
############################
|
||||
|
@ -124,6 +124,28 @@ terminator = \r\n
|
||||
tol1 = 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]
|
||||
desc = "Lakeshore 336 temperature controller"
|
||||
driver = "ls336"
|
||||
@ -207,3 +229,10 @@ imptype = multimeter
|
||||
ip = 10.157.205.37
|
||||
port = 4001
|
||||
|
||||
[soma]
|
||||
desc = "This is alternative Sample Omega A"
|
||||
imptype = motion_axis
|
||||
|
||||
[somb]
|
||||
desc = "This is alternative Sample Omega B"
|
||||
imptype = motion_axis
|
||||
|
@ -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"
|
||||
|
@ -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" {
|
||||
|
@ -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
|
||||
###########################################
|
||||
|
@ -19,7 +19,8 @@ proc ::histogram_memory::init_OAT_TABLE {} {
|
||||
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 { 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 ] {
|
||||
if {$::errorCode=="NONE"} {return $message}
|
||||
return -code error $message
|
||||
|
@ -27,6 +27,7 @@ fileeval $cfPath(plc)/plc.tcl
|
||||
fileeval $cfPath(counter)/counter.tcl
|
||||
fileeval $cfPath(environment)/sct_syr.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)/sct_mvp.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/sct_lakeshore_340.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/oxford_mercury_sct.tcl
|
||||
fileeval $cfPath(hmm)/hmm_configuration.tcl
|
||||
|
@ -47,11 +47,21 @@ set 10sample_table {
|
||||
10 -214.5996
|
||||
}
|
||||
|
||||
set 5sample_table {
|
||||
1 120
|
||||
2 60
|
||||
3 0
|
||||
4 -60
|
||||
5 -120
|
||||
}
|
||||
|
||||
if { [ info exists ::config_dict ] } {
|
||||
if { [ dict exists $::config_dict sample_stage implementation ] } {
|
||||
set implementation [ dict get $::config_dict sample_stage implementation ]
|
||||
if {$implementation == "normal_sample_stage"} {
|
||||
# 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"} {
|
||||
mkPosit sct_mc1 sampleNum float samx sample $10sample_table
|
||||
} elseif {$implementation == "20_pos_sample_stage"} {
|
||||
|
@ -510,7 +510,7 @@ Motor m1 $motor_driver_type [params \
|
||||
maxDecel 0.25\
|
||||
stepsPerX 100000\
|
||||
absEnc 1\
|
||||
absEncHome 16189898\
|
||||
absEncHome 16190612\
|
||||
cntsPerX -2048]
|
||||
m1 part crystal
|
||||
m1 long_name m1
|
||||
|
Reference in New Issue
Block a user