From 73ec03ca814121d4b11a1e69975c01057af56ba3 Mon Sep 17 00:00:00 2001 From: Jing Chen Date: Wed, 20 Apr 2011 12:38:09 +1000 Subject: [PATCH] add Pelican r3109 | jgn | 2011-04-20 12:38:09 +1000 (Wed, 20 Apr 2011) | 1 line --- .../config/environment/environment.tcl | 55 ------- .../environment/temperature/lakeshore340.tcl | 51 ------- .../config/motors/motor_configuration.tcl | 134 ++++++++---------- .../motors/positmotor_configuration.tcl | 24 ++-- ...guration.tcl => pelican_configuration.tcl} | 14 +- 5 files changed, 76 insertions(+), 202 deletions(-) delete mode 100644 site_ansto/instrument/pelican/config/environment/environment.tcl delete mode 100644 site_ansto/instrument/pelican/config/environment/temperature/lakeshore340.tcl rename site_ansto/instrument/pelican/{taipan_configuration.tcl => pelican_configuration.tcl} (65%) diff --git a/site_ansto/instrument/pelican/config/environment/environment.tcl b/site_ansto/instrument/pelican/config/environment/environment.tcl deleted file mode 100644 index 4dd78bed..00000000 --- a/site_ansto/instrument/pelican/config/environment/environment.tcl +++ /dev/null @@ -1,55 +0,0 @@ -proc select_environment_controller {envtemp} { -if [ catch { -puts "selecting $envtemp for environment control" -switch $envtemp { - "lh45" { - add_lh45 tc1 ca5-taipan 4003 1 - proc ::histogram_memory::pre_count {} { - hset /sample/tc1/sensor/start_temperature [hval /sample/tc1/sensor/value] - hset /sample/tc1/sensor/end_temperature [hval /sample/tc1/sensor/value] - } - proc ::histogram_memory::post_count {} { - hset /sample/tc1/sensor/end_temperature [hval /sample/tc1/sensor/value] - } - } - "rhqc" { - puts "Configuring RHQC" - # 9600 8 1 None None Enable - add_sct_ls340 tc1 ca5-[instname] 4001 "\r" 0.5 5.0 -# TODO Set controlsensor -# if { [SplitReply [environment_simulation]] == "false"} { -# tc1 controlsensor sensorB -# } -# puts "Added tc1 with [tc1 controlsensor]" - # 9600 8 1 None None Enable - add_sct_ls340 tc2 ca5-[instname] 4002 "\r" 0.5 5.0 -# TODO Set controlsensor -# if { [SplitReply [environment_simulation]] == "false"} { -# tc2 controlsensor sensorD -# } -# puts "Added tc2 with [tc2 controlsensor]" - } - "11TMagnet" { - puts "Configuring 11TMagnet" - add_sct_ls340 tc2 ca5-[instname] 4001 "\r" 0.5 5.0 - if { [SplitReply [environment_simulation]] == "false"} { - ::utility::macro::getset float temperature {} { - return [sicsmsgfmt [hval /sample/tc2/sensor/sensorValueA]] - } - sicslist setatt temperature long_name temperature - sicslist setatt temperature klass sample - sicslist setatt temperature units K -# TODO Set controlsensor -# tc1 controlsensor sensorA -# } - add_ips120 ips120 ca5-taipan 4004 0.001 - - } - default { - clientput "Unknown environment controller $envtemp" - } -} -} msg ] { - puts "Failed to configure $envtemp: $msg" -} -} diff --git a/site_ansto/instrument/pelican/config/environment/temperature/lakeshore340.tcl b/site_ansto/instrument/pelican/config/environment/temperature/lakeshore340.tcl deleted file mode 100644 index 31c49bbd..00000000 --- a/site_ansto/instrument/pelican/config/environment/temperature/lakeshore340.tcl +++ /dev/null @@ -1,51 +0,0 @@ -source $cfPath(environment)/temperature/lakeshore340_common.tcl - -# @brief Adds a lakeshore 340 temperature controller object. -# -# This must be called when the instrument configuration is loaded and before\n -# the buildHDB function is called. Currently there is no way to add and remove\n -# environment controllers and their hdb paths at runtime. -# -# @param tcn temperature controller name, the hdb name will be tcn_cntrl -# @param mport, the moxa RS232 port number, ie 1,2,3,4 -# -# Optional parameters, see lakeshore340_common.tcl for defaults in tc_dfltPar -# @param tolerance, temperature controller tolerance -# @param settle, settling time in seconds -# @param range, lakeshore range -# @param upperlimit, upper temperature limit Kelvin -# @param lowerlimit, lower temperature limit Kelvin -proc ::environment::temperature::add_ls340 {tcn tc_dfltURL mport args} { - variable tc_dfltPar - variable moxaPortMap - if [catch { - if {$tcn == "" || $mport == ""} { - error "ERROR: You must provide a temperature controller name and moxa port number" - } - - array set tc_param [array get tc_dfltPar] - - if {$args != ""} { - array set tc_param $args - foreach {nm v} $args { - set tc_param($nm) $v - } - } - set sim_mode [SplitReply [environment_simulation]] - if {$sim_mode == "true"} { - ::environment::temperature::mkls340sim $tcn - } else { - ::environment::temperature::mkls340 $tcn $tc_dfltURL $moxaPortMap($mport) - foreach nm [array names tc_param] { - $tcn $nm $tc_param($nm) - } - } - - sicslist setatt $tcn environment_name ${tcn}_cntrl - sicslist setatt $tcn long_name control_sensor_reading - ::environment::mkenvinfo $tcn {heateron {priv user} range {priv manager} } - } message ] { - if {$::errorCode=="NONE"} {return $message} - return -code error $message - } -} diff --git a/site_ansto/instrument/pelican/config/motors/motor_configuration.tcl b/site_ansto/instrument/pelican/config/motors/motor_configuration.tcl index 5231e4a5..3d6eeee9 100644 --- a/site_ansto/instrument/pelican/config/motors/motor_configuration.tcl +++ b/site_ansto/instrument/pelican/config/motors/motor_configuration.tcl @@ -6,7 +6,7 @@ # SET TO 1 TO USE THE TILT STAGE ie sample phi and chi set use_tiltstage 0 -set animal taipan +set animal pelican set sim_mode [SplitReply [motor_simulation]] # Setup addresses of Galil DMC2280 controllers. @@ -56,14 +56,6 @@ set att_Home 24782942 set coll_StepsPerX [expr -25000.0/6.0] set coll_CntsPerX [expr 8192.0/6.0] -#Measured or computed step rate for samz (Sample Raise) -#Copied from Reflectometer then divided by 2.0 for SANS -# Motor:25000/turn, gear:1/25, screw:5mm/turn -set samzStepRate [expr -((25000.0*25.0)/5.0)/2.0] -#set samzCountRate [expr -(8192.0/5.0/0.932)] -# 8192 count encoder, 5mm/Turn screw, 14:15 gearing? -set samzCountRate [expr -((8192.0/5.0)/(14.0/15.0))/2.0] - # set movecount high to reduce the frequency of # hnotify messages to a reasonable level set move_count 100 @@ -79,8 +71,8 @@ set move_count 100 Motor dummy_motor asim [params \ asyncqueue mc1\ - host mc1-taipan\ - port pmc1-taipan\ + host mc1-pelican\ + port pmc1-pelican\ axis C\ units mm\ hardlowerlim -500\ @@ -102,8 +94,8 @@ dummy_motor home 0 # mc1: Monochromator crystal selection rotation/Tilt Motor mtilt $motor_driver_type [params \ asyncqueue mc1\ - host mc1-taipan\ - port pmc1-taipan\ + host mc1-pelican\ + port pmc1-pelican\ axis A\ units degrees\ hardlowerlim -5\ @@ -127,8 +119,8 @@ set atest mtilt # mc1: Monochromator Linear (Translate) Motor mtrans $motor_driver_type [params \ asyncqueue mc1\ - host mc1-taipan\ - port pmc1-taipan\ + host mc1-pelican\ + port pmc1-pelican\ axis B\ units degrees\ hardlowerlim -10\ @@ -149,8 +141,8 @@ mtrans home 0 # mc1: Fight Tube Rotate Motor m2 $motor_driver_type [params \ asyncqueue mc1\ - host mc1-taipan\ - port pmc1-taipan\ + host mc1-pelican\ + port pmc1-pelican\ axis F\ units degrees\ hardlowerlim -32.5\ @@ -171,8 +163,8 @@ m2 home 0 # mc1: Detector Rotate Motor a2 $motor_driver_type [params \ asyncqueue mc1\ - host mc1-taipan\ - port pmc1-taipan\ + host mc1-pelican\ + port pmc1-pelican\ axis H\ units degrees\ hardlowerlim -55\ @@ -201,8 +193,8 @@ a2 home 0 # mc2: Sample Tilt 1 Motor sgu $motor_driver_type [params \ asyncqueue mc2\ - host mc2-taipan\ - port pmc2-taipan\ + host mc2-pelican\ + port pmc2-pelican\ axis A\ units degrees\ hardlowerlim -18\ @@ -223,8 +215,8 @@ sgu home 0 # mc2: Sample Tilt 2 Motor sgl $motor_driver_type [params \ asyncqueue mc2\ - host mc2-taipan\ - port pmc2-taipan\ + host mc2-pelican\ + port pmc2-pelican\ axis B\ units degrees\ hardlowerlim -18\ @@ -245,8 +237,8 @@ sgl home 0 # mc2: Sample Up Tanslation Motor stu $motor_driver_type [params \ asyncqueue mc2\ - host mc2-taipan\ - port pmc2-taipan\ + host mc2-pelican\ + port pmc2-pelican\ axis C\ units degrees\ hardlowerlim -15\ @@ -267,8 +259,8 @@ stu home 0 # mc2: Sample Lower Tanslation Motor stl $motor_driver_type [params \ asyncqueue mc2\ - host mc2-taipan\ - port pmc2-taipan\ + host mc2-pelican\ + port pmc2-pelican\ axis D\ units degrees\ hardlowerlim -15\ @@ -289,8 +281,8 @@ stl home 0 # mc2: Sample Rotate Motor s1 $motor_driver_type [params \ asyncqueue mc2\ - host mc2-taipan\ - port pmc2-taipan\ + host mc2-pelican\ + port pmc2-pelican\ axis E\ units degrees\ hardlowerlim -185\ @@ -311,8 +303,8 @@ s1 home 0 # mc2: Analyser Detector Rotate -- Sample Scattering Angle Motor s2 $motor_driver_type [params \ asyncqueue mc2\ - host mc2-taipan\ - port pmc2-taipan\ + host mc2-pelican\ + port pmc2-pelican\ axis F\ units degrees\ hardlowerlim -128\ @@ -333,8 +325,8 @@ s2 home 0 # mc2: Analyser Horizontal Focus Motor ahfocus $motor_driver_type [params \ asyncqueue mc2\ - host mc2-taipan\ - port pmc2-taipan\ + host mc2-pelican\ + port pmc2-pelican\ axis G\ units degrees\ hardlowerlim -360\ @@ -355,8 +347,8 @@ ahfocus home 0 # mc2: Analyser Vertical Focus Motor avfocus $motor_driver_type [params \ asyncqueue mc2\ - host mc2-taipan\ - port pmc2-taipan\ + host mc2-pelican\ + port pmc2-pelican\ axis H\ units degrees\ hardlowerlim -200\ @@ -377,8 +369,8 @@ avfocus home 0 # mc3: Monochromator Vertical Focus Motor mvfocus $motor_driver_type [params \ asyncqueue mc3\ - host mc3-taipan\ - port pmc3-taipan\ + host mc3-pelican\ + port pmc3-pelican\ axis A\ units degrees\ hardlowerlim 0\ @@ -399,8 +391,8 @@ mvfocus home 0 # mc3: Monochromator Horizontal Focus Motor mhfocus $motor_driver_type [params \ asyncqueue mc3\ - host mc3-taipan\ - port pmc3-taipan\ + host mc3-pelican\ + port pmc3-pelican\ axis B\ units degrees\ hardlowerlim -180\ @@ -421,8 +413,8 @@ mhfocus home 0 # mc3: Monochromator Rotate Motor m1 $motor_driver_type [params \ asyncqueue mc3\ - host mc3-taipan\ - port pmc3-taipan\ + host mc3-pelican\ + port pmc3-pelican\ axis E\ units degrees\ hardlowerlim 5\ @@ -443,8 +435,8 @@ m1 home 0 # mc4: Analyzer Tilt 1 -- Two-theta Angle Motor atilt $motor_driver_type [params \ asyncqueue mc4\ - host mc4-taipan\ - port pmc4-taipan\ + host mc4-pelican\ + port pmc4-pelican\ axis A\ units degrees\ hardlowerlim -5\ @@ -465,8 +457,8 @@ atilt home 0 # mc4: Analyzer Translate Motor atrans $motor_driver_type [params \ asyncqueue mc4\ - host mc4-taipan\ - port pmc4-taipan\ + host mc4-pelican\ + port pmc4-pelican\ axis C\ units degrees\ hardlowerlim -1\ @@ -487,8 +479,8 @@ atrans home 0 # mc4: Analyzer Rotate Motor a1 $motor_driver_type [params \ asyncqueue mc4\ - host mc4-taipan\ - port pmc4-taipan\ + host mc4-pelican\ + port pmc4-pelican\ axis D\ units degrees\ hardlowerlim -5.1\ @@ -509,8 +501,8 @@ a1 home 0 # mc4: Virtural Source Left Translation Motor VS_left $motor_driver_type [params \ asyncqueue mc4\ - host mc4-taipan\ - port pmc4-taipan\ + host mc4-pelican\ + port pmc4-pelican\ axis E\ units mm\ hardlowerlim 2\ @@ -531,8 +523,8 @@ VS_left home 0 # mc4: Virtural Source Right Translation Motor VS_right $motor_driver_type [params \ asyncqueue mc4\ - host mc4-taipan\ - port pmc4-taipan\ + host mc4-pelican\ + port pmc4-pelican\ axis F\ units mm\ hardlowerlim -35\ @@ -553,8 +545,8 @@ VS_right home 0 # mc4: Filter Rotate Motor mfilter $motor_driver_type [params \ asyncqueue mc4\ - host mc4-taipan\ - port pmc4-taipan\ + host mc4-pelican\ + port pmc4-pelican\ axis G\ units degrees\ hardlowerlim 0\ @@ -575,8 +567,8 @@ mfilter home 0 # mc4: Primary collimator Translate Motor collimator $motor_driver_type [params \ asyncqueue mc4\ - host mc4-taipan\ - port pmc4-taipan\ + host mc4-pelican\ + port pmc4-pelican\ axis H\ units mm\ hardlowerlim -112\ @@ -597,8 +589,8 @@ mfilter home 0 # mc6: Pre-sample right aperture -- Slit s1 right Blade Motor ps_right $motor_driver_type [params \ asyncqueue mc6\ - host mc6-taipan\ - port pmc6-taipan\ + host mc6-pelican\ + port pmc6-pelican\ axis A\ units mm\ hardlowerlim -27\ @@ -619,8 +611,8 @@ ps_right home 0 # mc6: Pre-sample left aperture -- Slit s1 left Blade Motor ps_left $motor_driver_type [params \ asyncqueue mc6\ - host mc6-taipan\ - port pmc6-taipan\ + host mc6-pelican\ + port pmc6-pelican\ axis B\ units mm\ hardlowerlim -27\ @@ -641,8 +633,8 @@ ps_left home 0 # mc6: Pre-sample top aperture -- Slit s1 top Blade Motor ps_top $motor_driver_type [params \ asyncqueue mc6\ - host mc6-taipan\ - port pmc6-taipan\ + host mc6-pelican\ + port pmc6-pelican\ axis C\ units mm\ hardlowerlim -200\ @@ -663,8 +655,8 @@ ps_top home 0 # mc6: Pre-sample bottom aperture -- Slit s1 bottom Blade Motor ps_bottom $motor_driver_type [params \ asyncqueue mc6\ - host mc6-taipan\ - port pmc6-taipan\ + host mc6-pelican\ + port pmc6-pelican\ axis D\ units mm\ hardlowerlim -200\ @@ -685,8 +677,8 @@ ps_bottom home 0 # mc6: Pre-sample right aperture -- Slit s2 right Blade Motor pa_right $motor_driver_type [params \ asyncqueue mc6\ - host mc6-taipan\ - port pmc6-taipan\ + host mc6-pelican\ + port pmc6-pelican\ axis E\ units mm\ hardlowerlim -26\ @@ -707,8 +699,8 @@ pa_right home 0 # mc6: Pre-sample left aperture -- Slit s2 left Blade Motor pa_left $motor_driver_type [params \ asyncqueue mc6\ - host mc6-taipan\ - port pmc6-taipan\ + host mc6-pelican\ + port pmc6-pelican\ axis F\ units mm\ hardlowerlim -26\ @@ -729,8 +721,8 @@ pa_left home 0 # mc6: Pre-sample top aperture -- Slit s2 top Blade Motor pa_top $motor_driver_type [params \ asyncqueue mc6\ - host mc6-taipan\ - port pmc6-taipan\ + host mc6-pelican\ + port pmc6-pelican\ axis G\ units mm\ hardlowerlim -200\ @@ -751,8 +743,8 @@ pa_left home 0 # mc6: Pre-sample bottom aperture -- Slit s2 bottom Blade Motor pa_bottom $motor_driver_type [params \ asyncqueue mc6\ - host mc6-taipan\ - port pmc6-taipan\ + host mc6-pelican\ + port pmc6-pelican\ axis H\ units mm\ hardlowerlim -200\ diff --git a/site_ansto/instrument/pelican/config/motors/positmotor_configuration.tcl b/site_ansto/instrument/pelican/config/motors/positmotor_configuration.tcl index 6f383fc0..e4fa9ed8 100644 --- a/site_ansto/instrument/pelican/config/motors/positmotor_configuration.tcl +++ b/site_ansto/instrument/pelican/config/motors/positmotor_configuration.tcl @@ -2,19 +2,19 @@ source $cfPath(motors)/sct_positmotor_common.tcl -set port1 [portnum pmc1-taipan] -set port2 [portnum pmc2-taipan] -set port3 [portnum pmc3-taipan] -set port4 [portnum pmc4-taipan] -set port5 [portnum pmc5-taipan] -set port6 [portnum pmc6-taipan] +set port1 [portnum pmc1-pelican] +set port2 [portnum pmc2-pelican] +set port3 [portnum pmc3-pelican] +set port4 [portnum pmc4-pelican] +set port5 [portnum pmc5-pelican] +set port6 [portnum pmc6-pelican] -makesctcontroller sct_mc1 std mc1-taipan:$port1 -makesctcontroller sct_mc2 std mc2-taipan:$port2 -makesctcontroller sct_mc3 std mc3-taipan:$port3 -makesctcontroller sct_mc4 std mc4-taipan:$port4 -makesctcontroller sct_mc5 std mc5-taipan:$port5 -makesctcontroller sct_mc6 std mc6-taipan:$port6 +makesctcontroller sct_mc1 std mc1-pelican:$port1 +makesctcontroller sct_mc2 std mc2-pelican:$port2 +makesctcontroller sct_mc3 std mc3-pelican:$port3 +makesctcontroller sct_mc4 std mc4-pelican:$port4 +makesctcontroller sct_mc5 std mc5-pelican:$port5 +makesctcontroller sct_mc6 std mc6-pelican:$port6 # label pos #index position diff --git a/site_ansto/instrument/pelican/taipan_configuration.tcl b/site_ansto/instrument/pelican/pelican_configuration.tcl similarity index 65% rename from site_ansto/instrument/pelican/taipan_configuration.tcl rename to site_ansto/instrument/pelican/pelican_configuration.tcl index 5dd814cc..a44a1b86 100644 --- a/site_ansto/instrument/pelican/taipan_configuration.tcl +++ b/site_ansto/instrument/pelican/pelican_configuration.tcl @@ -2,7 +2,7 @@ # Required by server_config.tcl VarMake Instrument Text Internal -Instrument taipan +Instrument pelican Instrument lock #START SERVER CONFIGURATION SECTION @@ -23,28 +23,16 @@ fileeval $cfPath(motors)/positmotor_configuration.tcl fileeval $cfPath(plc)/plc.tcl fileeval $cfPath(optics)/optics.tcl fileeval $cfPath(counter)/counter.tcl -#fileeval $cfPath(environment)/temperature/sct_lakeshore_340.tcl -#fileeval $cfPath(environment)/temperature/sct_lakeshore_336.tcl fileeval $cfPath(hmm)/hmm_configuration.tcl fileeval $cfPath(nexus)/nxscripts.tcl fileeval $cfPath(scan)/scan.tcl fileeval $cfPath(commands)/commands.tcl fileeval $cfPath(anticollider)/anticollider.tcl -#fileeval $cfPath(environment)/temperature/sct_julabo_lh45.tcl -#fileeval $cfPath(environment)/temperature/sct_qlink.tcl -#fileeval $cfPath(environment)/magneticField/sct_oxford_ips.tcl -#fileeval $cfPath(environment)/environment.tcl -#fileeval $cfPath(environment)/sct_mcr500_rheometer.tcl -#fileeval $cfPath(environment)/sct_protek_common.tcl -fileeval $cfPath(tasmad)/taspub_sics/tasscript.tcl -#fileeval $cfPath(tasmad)/taspub_sics/tasp.tcl source gumxml.tcl ::utility::mkVar ::anticollider::protect_detector text manager protect_detector false detector true false ::anticollider::protect_detector "true" -# init for the tasUB -MakeTasUB tasub m1 m2 mvfocus mhfocus s1 s2 sgu sgl a1 a2 avfocus ahfocus server_init ###########################################