Use sics_config.ini to generate 12T magnet setup on Taipan.
This commit is contained in:
@@ -2102,4 +2102,16 @@ proc add_sct_ls340 {name IP port terminator {_tol1 1.0} {_tol2 1.0} {_verbose 0}
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if { [ info exists ::config_dict ] } {
|
||||||
|
if { [ dict get $::config_dict ls340_1 enabled ] } {
|
||||||
|
set IP [dict get $::config_dict ls340_1 ip]
|
||||||
|
set PORT [dict get $::config_dict ls340_1 port]
|
||||||
|
set name [dict get $::config_dict ls340_1 name]
|
||||||
|
set term [dict get $::config_dict ls340_1 terminator]
|
||||||
|
set tol1 [dict get $::config_dict ls340_1 tol1]
|
||||||
|
set tol2 [dict get $::config_dict ls340_1 tol2]
|
||||||
|
|
||||||
|
add_sct_ls340 $name $IP $PORT $term $tol1 $tol2
|
||||||
|
}
|
||||||
|
}
|
||||||
namespace import ::scobj::ls340::*
|
namespace import ::scobj::ls340::*
|
||||||
|
|||||||
@@ -119,6 +119,11 @@ if {[info exists env(SICS_SIMULATION)] != 1} {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fileeval util/config_reader.tcl
|
||||||
|
if [file exists ../sics_config.ini] {
|
||||||
|
set config_dict [config_reader::dump ../sics_config.ini]
|
||||||
|
}
|
||||||
|
|
||||||
set cfParent config
|
set cfParent config
|
||||||
|
|
||||||
#WARNING Make sure there are no spaces after the back-slashes
|
#WARNING Make sure there are no spaces after the back-slashes
|
||||||
|
|||||||
@@ -138,6 +138,36 @@ dummy_s1 softupperlim 180
|
|||||||
dummy_s1 precision 0.02
|
dummy_s1 precision 0.02
|
||||||
dummy_s1 home 0
|
dummy_s1 home 0
|
||||||
|
|
||||||
|
if { [ info exists ::config_dict ] && [ dict get $::config_dict s1_sample_insert enabled ] } {
|
||||||
|
set samp_stage_name "s1ss"
|
||||||
|
set tilt_motor_driver_type asim
|
||||||
|
|
||||||
|
Motor s1 $motor_driver_type [params \
|
||||||
|
asyncqueue mc2\
|
||||||
|
host mc2-taipan\
|
||||||
|
port pmc2-taipan\
|
||||||
|
axis A\
|
||||||
|
units degrees\
|
||||||
|
hardlowerlim -180\
|
||||||
|
hardupperlim 180\
|
||||||
|
maxSpeed 1\
|
||||||
|
maxAccel 1\
|
||||||
|
maxDecel 1\
|
||||||
|
stepsPerX 12500\
|
||||||
|
absEnc 1\
|
||||||
|
absEncHome 10695068\
|
||||||
|
cntsPerX 4096]
|
||||||
|
s1 part sample
|
||||||
|
s1 long_name s1
|
||||||
|
s1 softlowerlim -180
|
||||||
|
s1 softupperlim 180
|
||||||
|
s1 home 0
|
||||||
|
|
||||||
|
} else {
|
||||||
|
set samp_stage_name "s1"
|
||||||
|
set tilt_motor_driver_type $motor_driver_type
|
||||||
|
}
|
||||||
|
|
||||||
#if $use_tiltstage {
|
#if $use_tiltstage {
|
||||||
# mc1: Monochromator crystal selection rotation/Tilt
|
# mc1: Monochromator crystal selection rotation/Tilt
|
||||||
Motor mtilt $motor_driver_type [params \
|
Motor mtilt $motor_driver_type [params \
|
||||||
@@ -263,7 +293,7 @@ a2 decel 0.2
|
|||||||
#
|
#
|
||||||
|
|
||||||
# mc2: Sample Tilt 1
|
# mc2: Sample Tilt 1
|
||||||
Motor sgu $motor_driver_type [params \
|
Motor sgu $tilt_motor_driver_type [params \
|
||||||
asyncqueue mc2\
|
asyncqueue mc2\
|
||||||
host mc2-taipan\
|
host mc2-taipan\
|
||||||
port pmc2-taipan\
|
port pmc2-taipan\
|
||||||
@@ -286,7 +316,7 @@ sgu home 0
|
|||||||
sgu backlash_offset -0.2
|
sgu backlash_offset -0.2
|
||||||
|
|
||||||
# mc2: Sample Tilt 2
|
# mc2: Sample Tilt 2
|
||||||
Motor sgl $motor_driver_type [params \
|
Motor sgl $tilt_motor_driver_type [params \
|
||||||
asyncqueue mc2\
|
asyncqueue mc2\
|
||||||
host mc2-taipan\
|
host mc2-taipan\
|
||||||
port pmc2-taipan\
|
port pmc2-taipan\
|
||||||
@@ -355,7 +385,7 @@ stl home 0.0
|
|||||||
stl backlash_offset -0.2
|
stl backlash_offset -0.2
|
||||||
|
|
||||||
# mc2: Sample Rotate
|
# mc2: Sample Rotate
|
||||||
Motor s1 $motor_driver_type [params \
|
Motor $samp_stage_name $motor_driver_type [params \
|
||||||
asyncqueue mc2\
|
asyncqueue mc2\
|
||||||
host mc2-taipan\
|
host mc2-taipan\
|
||||||
port pmc2-taipan\
|
port pmc2-taipan\
|
||||||
|
|||||||
27
site_ansto/instrument/tas/util/sics_config.ini
Normal file
27
site_ansto/instrument/tas/util/sics_config.ini
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
[12tmagnet]
|
||||||
|
desc = "12 Tesla Oxford Magnet"
|
||||||
|
enabled = False
|
||||||
|
group = environment:magnet
|
||||||
|
ip = 137.157.203.153
|
||||||
|
port = 55001
|
||||||
|
|
||||||
|
[12tmagnet_setup]
|
||||||
|
cascade = 12tmagnet,s1_sample_insert
|
||||||
|
enabled = False
|
||||||
|
group = 0setup
|
||||||
|
|
||||||
|
[ls340_1]
|
||||||
|
enabled = False
|
||||||
|
group = environment:temperature
|
||||||
|
ip = 137.157.203.137
|
||||||
|
name = tc1
|
||||||
|
port = 4001
|
||||||
|
terminator = "\r\n"
|
||||||
|
tol1 = 1.0
|
||||||
|
tol2 = 1.0
|
||||||
|
|
||||||
|
[s1_sample_insert]
|
||||||
|
desc = "s1 will be defined as the sample insert rotation. Sample stage will be renamed to s1ss and sgu and sgl will be simulated"
|
||||||
|
enabled = False
|
||||||
|
group = motors
|
||||||
|
|
||||||
@@ -73,7 +73,6 @@ proc config_reader::parse_file {filename} {
|
|||||||
return $dictionary
|
return $dictionary
|
||||||
}
|
}
|
||||||
|
|
||||||
if { "[lindex [split [info nameofexecutable] "/"] end]" == "tclsh"} {
|
|
||||||
proc config_reader::dump {{the_config startup.ini}} {
|
proc config_reader::dump {{the_config startup.ini}} {
|
||||||
set my_dict [config_reader::parse_file $the_config]
|
set my_dict [config_reader::parse_file $the_config]
|
||||||
puts "Dict: $my_dict"
|
puts "Dict: $my_dict"
|
||||||
@@ -88,6 +87,8 @@ if { "[lindex [split [info nameofexecutable] "/"] end]" == "tclsh"} {
|
|||||||
}
|
}
|
||||||
return $my_dict
|
return $my_dict
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if { "[lindex [split [info nameofexecutable] "/"] end]" == "tclsh"} {
|
||||||
set filename "/tmp/test_[pid].ini"
|
set filename "/tmp/test_[pid].ini"
|
||||||
set sects [list]
|
set sects [list]
|
||||||
lappend sects "\[Section_1\]"
|
lappend sects "\[Section_1\]"
|
||||||
|
|||||||
Reference in New Issue
Block a user