diff --git a/site_ansto/instrument/bilby/config/motors/generated_motor_configuration.tcl b/site_ansto/instrument/bilby/config/motors/generated_motor_configuration.tcl new file mode 100644 index 00000000..d68c978c --- /dev/null +++ b/site_ansto/instrument/bilby/config/motors/generated_motor_configuration.tcl @@ -0,0 +1,438 @@ +#### SICS motor driver configuration #### +# Generated by: ../../../util/genmotconf.tcl Bilby_Motion_control_axes.csv COLLIMATOR_POSITIONS_D.csv sicsmot_attlist.csv hdb_info.csv +# Date: 2014-01-15T15:36:43 +# Generated from the following files, +# file1: Bilby_Motion_control_axes.csv +# file2: COLLIMATOR_POSITIONS_D.csv +# file3: sicsmot_attlist.csv +# file4: hdb_info.csv + +# Load motor driver configuration parameters +set flist [list\ + {Bilby_Motion_control_axes.csv}\ + {COLLIMATOR_POSITIONS_D.csv}\ + {sicsmot_attlist.csv}\ + {hdb_info.csv}\ + ] + +foreach fattfile $flist { + if [catch { + set fattpath config/motors/$fattfile + set fh [open $fattpath RDONLY] + while {[gets $fh line] >= 0} { + eval "set [split $line {,}]" + } + close $fh + } msg] { + clientput ERROR: $msg + } +} + + +set sim_mode [SplitReply [motor_simulation]] + +if {$sim_mode == true} { + set motor_driver_type asim +} else { + set motor_driver_type DMC2280 +} + +if {$sim_mode == false} { + MakeAsyncQueue mc1 DMC2280 [dict get $::MOTOR_HOSTPORT MC1 HOST] [dict get $::MOTOR_HOSTPORT MC1 PORT] + MakeAsyncQueue mc2 DMC2280 [dict get $::MOTOR_HOSTPORT MC2 HOST] [dict get $::MOTOR_HOSTPORT MC2 PORT] + MakeAsyncQueue mc3 DMC2280 [dict get $::MOTOR_HOSTPORT MC3 HOST] [dict get $::MOTOR_HOSTPORT MC3 PORT] +} + +# ap1 configuration +Motor ap1 $motor_driver_type [params\ + asyncqueue mc2\ + axis A\ + units $ap1_units\ + hardlowerlim $ap1_rev_lim\ + hardupperlim $ap1_fwd_lim\ + maxSpeed $ap1_maxspeed\ + maxAccel $ap1_maxaccel\ + maxDecel $ap1_maxdecel\ + stepsPerX $ap1_steps_per_x\ + posit_count 5\ + posit_1 $ap1_100X100\ + posit_2 $ap1_40X40\ + posit_3 $ap1_D10\ + posit_4 $ap1_D20\ + posit_5 $ap1_D40\ + absEnc 1\ + absEncHome $ap1_absenchome\ + cntsPerX $ap1_cnts_per_x] +ap1 softlowerlim $ap1_rev_lim +ap1 softupperlim $ap1_fwd_lim +ap1 home $ap1_home +ap1 part $ap1_part +ap1 long_name ap1 + +# ap2 configuration +Motor ap2 $motor_driver_type [params\ + asyncqueue mc2\ + axis B\ + units $ap2_units\ + hardlowerlim $ap2_rev_lim\ + hardupperlim $ap2_fwd_lim\ + maxSpeed $ap2_maxspeed\ + maxAccel $ap2_maxaccel\ + maxDecel $ap2_maxdecel\ + stepsPerX $ap2_steps_per_x\ + posit_count 5\ + posit_1 $ap2_100X100\ + posit_2 $ap2_40X40\ + posit_3 $ap2_D10\ + posit_4 $ap2_D20\ + posit_5 $ap2_D40\ + absEnc 1\ + absEncHome $ap2_absenchome\ + cntsPerX $ap2_cnts_per_x] +ap2 softlowerlim $ap2_rev_lim +ap2 softupperlim $ap2_fwd_lim +ap2 home $ap2_home +ap2 part $ap2_part +ap2 long_name ap2 + +# ap3 configuration +Motor ap3 $motor_driver_type [params\ + asyncqueue mc2\ + axis C\ + units $ap3_units\ + hardlowerlim $ap3_rev_lim\ + hardupperlim $ap3_fwd_lim\ + maxSpeed $ap3_maxspeed\ + maxAccel $ap3_maxaccel\ + maxDecel $ap3_maxdecel\ + stepsPerX $ap3_steps_per_x\ + posit_count 5\ + posit_1 $ap3_100X100\ + posit_2 $ap3_40X40\ + posit_3 $ap3_D10\ + posit_4 $ap3_D20\ + posit_5 $ap3_D40\ + absEnc 1\ + absEncHome $ap3_absenchome\ + cntsPerX $ap3_cnts_per_x] +ap3 softlowerlim $ap3_rev_lim +ap3 softupperlim $ap3_fwd_lim +ap3 home $ap3_home +ap3 part $ap3_part +ap3 long_name ap3 + +# ap4 configuration +Motor ap4 $motor_driver_type [params\ + asyncqueue mc2\ + axis D\ + units $ap4_units\ + hardlowerlim $ap4_rev_lim\ + hardupperlim $ap4_fwd_lim\ + maxSpeed $ap4_maxspeed\ + maxAccel $ap4_maxaccel\ + maxDecel $ap4_maxdecel\ + stepsPerX $ap4_steps_per_x\ + posit_count 5\ + posit_1 $ap4_100X100\ + posit_2 $ap4_40X40\ + posit_3 $ap4_D10\ + posit_4 $ap4_D20\ + posit_5 $ap4_D40\ + absEnc 1\ + absEncHome $ap4_absenchome\ + cntsPerX $ap4_cnts_per_x] +ap4 softlowerlim $ap4_rev_lim +ap4 softupperlim $ap4_fwd_lim +ap4 home $ap4_home +ap4 part $ap4_part +ap4 long_name ap4 + +# ap5 configuration +Motor ap5 $motor_driver_type [params\ + asyncqueue mc2\ + axis E\ + units $ap5_units\ + hardlowerlim $ap5_rev_lim\ + hardupperlim $ap5_fwd_lim\ + maxSpeed $ap5_maxspeed\ + maxAccel $ap5_maxaccel\ + maxDecel $ap5_maxdecel\ + stepsPerX $ap5_steps_per_x\ + posit_count 5\ + posit_1 $ap5_100X100\ + posit_2 $ap5_40X40\ + posit_3 $ap5_D10\ + posit_4 $ap5_D20\ + posit_5 $ap5_D40\ + absEnc 1\ + absEncHome $ap5_absenchome\ + cntsPerX $ap5_cnts_per_x] +ap5 softlowerlim $ap5_rev_lim +ap5 softupperlim $ap5_fwd_lim +ap5 home $ap5_home +ap5 part $ap5_part +ap5 long_name ap5 + +# ap6 configuration +Motor ap6 $motor_driver_type [params\ + asyncqueue mc2\ + axis F\ + units $ap6_units\ + hardlowerlim $ap6_rev_lim\ + hardupperlim $ap6_fwd_lim\ + maxSpeed $ap6_maxspeed\ + maxAccel $ap6_maxaccel\ + maxDecel $ap6_maxdecel\ + stepsPerX $ap6_steps_per_x\ + posit_count 5\ + posit_1 $ap6_100X100\ + posit_2 $ap6_40X40\ + posit_3 $ap6_D10\ + posit_4 $ap6_D20\ + posit_5 $ap6_D40\ + absEnc 1\ + absEncHome $ap6_absenchome\ + cntsPerX $ap6_cnts_per_x] +ap6 softlowerlim $ap6_rev_lim +ap6 softupperlim $ap6_fwd_lim +ap6 home $ap6_home +ap6 part $ap6_part +ap6 long_name ap6 + +# ap7 configuration +Motor ap7 $motor_driver_type [params\ + asyncqueue mc2\ + axis G\ + units $ap7_units\ + hardlowerlim $ap7_rev_lim\ + hardupperlim $ap7_fwd_lim\ + maxSpeed $ap7_maxspeed\ + maxAccel $ap7_maxaccel\ + maxDecel $ap7_maxdecel\ + stepsPerX $ap7_steps_per_x\ + posit_count 5\ + posit_1 $ap7_100X100\ + posit_2 $ap7_40X40\ + posit_3 $ap7_D10\ + posit_4 $ap7_D20\ + posit_5 $ap7_D40\ + absEnc 1\ + absEncHome $ap7_absenchome\ + cntsPerX $ap7_cnts_per_x] +ap7 softlowerlim $ap7_rev_lim +ap7 softupperlim $ap7_fwd_lim +ap7 home $ap7_home +ap7 part $ap7_part +ap7 long_name ap7 + +# ap8 configuration +Motor ap8 $motor_driver_type [params\ + asyncqueue mc2\ + axis H\ + units $ap8_units\ + hardlowerlim $ap8_rev_lim\ + hardupperlim $ap8_fwd_lim\ + maxSpeed $ap8_maxspeed\ + maxAccel $ap8_maxaccel\ + maxDecel $ap8_maxdecel\ + stepsPerX $ap8_steps_per_x\ + posit_count 5\ + posit_1 $ap8_100X100\ + posit_2 $ap8_40X40\ + posit_3 $ap8_D10\ + posit_4 $ap8_D20\ + posit_5 $ap8_D40\ + absEnc 1\ + absEncHome $ap8_absenchome\ + cntsPerX $ap8_cnts_per_x] +ap8 softlowerlim $ap8_rev_lim +ap8 softupperlim $ap8_fwd_lim +ap8 home $ap8_home +ap8 part $ap8_part +ap8 long_name ap8 + +# col1 configuration +Motor col1 $motor_driver_type [params\ + asyncqueue mc1\ + axis A\ + units $col1_units\ + hardlowerlim $col1_rev_lim\ + hardupperlim $col1_fwd_lim\ + maxSpeed $col1_maxspeed\ + maxAccel $col1_maxaccel\ + maxDecel $col1_maxdecel\ + stepsPerX $col1_steps_per_x\ + posit_count 2\ + posit_1 $col1_aperture\ + posit_2 $col1_guide\ + absEnc 1\ + absEncHome $col1_absenchome\ + cntsPerX $col1_cnts_per_x] +col1 softlowerlim $col1_rev_lim +col1 softupperlim $col1_fwd_lim +col1 home $col1_home +col1 part $col1_part +col1 long_name col1 + +# col2 configuration +Motor col2 $motor_driver_type [params\ + asyncqueue mc1\ + axis B\ + units $col2_units\ + hardlowerlim $col2_rev_lim\ + hardupperlim $col2_fwd_lim\ + maxSpeed $col2_maxspeed\ + maxAccel $col2_maxaccel\ + maxDecel $col2_maxdecel\ + stepsPerX $col2_steps_per_x\ + posit_count 2\ + posit_1 $col2_aperture\ + posit_2 $col2_guide\ + absEnc 1\ + absEncHome $col2_absenchome\ + cntsPerX $col2_cnts_per_x] +col2 softlowerlim $col2_rev_lim +col2 softupperlim $col2_fwd_lim +col2 home $col2_home +col2 part $col2_part +col2 long_name col2 + +# col3 configuration +Motor col3 $motor_driver_type [params\ + asyncqueue mc1\ + axis C\ + units $col3_units\ + hardlowerlim $col3_rev_lim\ + hardupperlim $col3_fwd_lim\ + maxSpeed $col3_maxspeed\ + maxAccel $col3_maxaccel\ + maxDecel $col3_maxdecel\ + stepsPerX $col3_steps_per_x\ + posit_count 2\ + posit_1 $col3_aperture\ + posit_2 $col3_guide\ + absEnc 1\ + absEncHome $col3_absenchome\ + cntsPerX $col3_cnts_per_x] +col3 softlowerlim $col3_rev_lim +col3 softupperlim $col3_fwd_lim +col3 home $col3_home +col3 part $col3_part +col3 long_name col3 + +# col4 configuration +Motor col4 $motor_driver_type [params\ + asyncqueue mc1\ + axis D\ + units $col4_units\ + hardlowerlim $col4_rev_lim\ + hardupperlim $col4_fwd_lim\ + maxSpeed $col4_maxspeed\ + maxAccel $col4_maxaccel\ + maxDecel $col4_maxdecel\ + stepsPerX $col4_steps_per_x\ + posit_count 2\ + posit_1 $col4_aperture\ + posit_2 $col4_guide\ + absEnc 1\ + absEncHome $col4_absenchome\ + cntsPerX $col4_cnts_per_x] +col4 softlowerlim $col4_rev_lim +col4 softupperlim $col4_fwd_lim +col4 home $col4_home +col4 part $col4_part +col4 long_name col4 + +# col5 configuration +Motor col5 $motor_driver_type [params\ + asyncqueue mc1\ + axis E\ + units $col5_units\ + hardlowerlim $col5_rev_lim\ + hardupperlim $col5_fwd_lim\ + maxSpeed $col5_maxspeed\ + maxAccel $col5_maxaccel\ + maxDecel $col5_maxdecel\ + stepsPerX $col5_steps_per_x\ + posit_count 2\ + posit_1 $col5_aperture\ + posit_2 $col5_guide\ + absEnc 1\ + absEncHome $col5_absenchome\ + cntsPerX $col5_cnts_per_x] +col5 softlowerlim $col5_rev_lim +col5 softupperlim $col5_fwd_lim +col5 home $col5_home +col5 part $col5_part +col5 long_name col5 + +# col6 configuration +Motor col6 $motor_driver_type [params\ + asyncqueue mc1\ + axis F\ + units $col6_units\ + hardlowerlim $col6_rev_lim\ + hardupperlim $col6_fwd_lim\ + maxSpeed $col6_maxspeed\ + maxAccel $col6_maxaccel\ + maxDecel $col6_maxdecel\ + stepsPerX $col6_steps_per_x\ + posit_count 2\ + posit_1 $col6_aperture\ + posit_2 $col6_guide\ + absEnc 1\ + absEncHome $col6_absenchome\ + cntsPerX $col6_cnts_per_x] +col6 softlowerlim $col6_rev_lim +col6 softupperlim $col6_fwd_lim +col6 home $col6_home +col6 part $col6_part +col6 long_name col6 + +# col7 configuration +Motor col7 $motor_driver_type [params\ + asyncqueue mc1\ + axis G\ + units $col7_units\ + hardlowerlim $col7_rev_lim\ + hardupperlim $col7_fwd_lim\ + maxSpeed $col7_maxspeed\ + maxAccel $col7_maxaccel\ + maxDecel $col7_maxdecel\ + stepsPerX $col7_steps_per_x\ + posit_count 2\ + posit_1 $col7_aperture\ + posit_2 $col7_guide\ + absEnc 1\ + absEncHome $col7_absenchome\ + cntsPerX $col7_cnts_per_x] +col7 softlowerlim $col7_rev_lim +col7 softupperlim $col7_fwd_lim +col7 home $col7_home +col7 part $col7_part +col7 long_name col7 + +# col8 configuration +Motor col8 $motor_driver_type [params\ + asyncqueue mc1\ + axis H\ + units $col8_units\ + hardlowerlim $col8_rev_lim\ + hardupperlim $col8_fwd_lim\ + maxSpeed $col8_maxspeed\ + maxAccel $col8_maxaccel\ + maxDecel $col8_maxdecel\ + stepsPerX $col8_steps_per_x\ + posit_count 2\ + posit_1 $col8_aperture\ + posit_2 $col8_guide\ + absEnc 1\ + absEncHome $col8_absenchome\ + cntsPerX $col8_cnts_per_x] +col8 softlowerlim $col8_rev_lim +col8 softupperlim $col8_fwd_lim +col8 home $col8_home +col8 part $col8_part +col8 long_name col8 + +proc motor_set_sobj_attributes {} {} diff --git a/site_ansto/instrument/bilby/config/motors/motor_configuration.tcl b/site_ansto/instrument/bilby/config/motors/motor_configuration.tcl new file mode 100644 index 00000000..ab399f9e --- /dev/null +++ b/site_ansto/instrument/bilby/config/motors/motor_configuration.tcl @@ -0,0 +1,6 @@ +# @file Loads the generated_motor_configuration.tcl file which is created by util/genmotconf.tcl from CSV files. +fileeval config/motors/generated_motor_configuration.tcl +# Motors which should not be driven should be set as "fixed" here. +# Configurable virtual motors can be defined here. +# Eg, mot fixed 1 +# Define "proc motor_set_sobj_attributes {}" if we need to define extra sicslist attributes for some motors. diff --git a/site_ansto/instrument/bilby/config/motors/sicsmot_attlist.csv b/site_ansto/instrument/bilby/config/motors/sicsmot_attlist.csv new file mode 100644 index 00000000..b0ed59ce --- /dev/null +++ b/site_ansto/instrument/bilby/config/motors/sicsmot_attlist.csv @@ -0,0 +1,112 @@ +ap1_absenchome,74080 +ap1_fwd_lim,104.24377441406246 +ap1_home,0 +ap1_maxaccel,1 +ap1_maxdecel,1 +ap1_maxspeed,1 +ap1_rev_lim,0 +ap2_absenchome,55223 +ap2_fwd_lim,108.00659179687496 +ap2_home,0 +ap2_maxaccel,1 +ap2_maxdecel,1 +ap2_maxspeed,1 +ap2_rev_lim,0 +ap3_absenchome,13986 +ap3_fwd_lim,102.21679687499996 +ap3_home,0 +ap3_maxaccel,1 +ap3_maxdecel,1 +ap3_maxspeed,1 +ap3_rev_lim,0 +ap4_absenchome,5616 +ap4_fwd_lim,107.88574218749996 +ap4_home,0 +ap4_maxaccel,1 +ap4_maxdecel,1 +ap4_maxspeed,1 +ap4_rev_lim,0 +ap5_absenchome,73254 +ap5_fwd_lim,101.83227539062496 +ap5_home,0 +ap5_maxaccel,1 +ap5_maxdecel,1 +ap5_maxspeed,1 +ap5_rev_lim,0 +ap6_absenchome,72533 +ap6_fwd_lim,108.62182617187496 +ap6_home,0 +ap6_maxaccel,1 +ap6_maxdecel,1 +ap6_maxspeed,1 +ap6_rev_lim,0 +ap7_absenchome,74427 +ap7_fwd_lim,103.56811523437496 +ap7_home,0 +ap7_maxaccel,1 +ap7_maxdecel,1 +ap7_maxspeed,1 +ap7_rev_lim,0 +ap8_absenchome,7189 +ap8_fwd_lim,110.12695312499996 +ap8_home,0 +ap8_maxaccel,1 +ap8_maxdecel,1 +ap8_maxspeed,1 +ap8_rev_lim,0 +col1_absenchome,4666 +col1_fwd_lim,269 +col1_home,0 +col1_maxaccel,1 +col1_maxdecel,1 +col1_maxspeed,1 +col1_rev_lim,0 +col2_absenchome,10598 +col2_fwd_lim,269 +col2_home,0 +col2_maxaccel,1 +col2_maxdecel,1 +col2_maxspeed,1 +col2_rev_lim,0 +col3_absenchome,28865 +col3_fwd_lim,268 +col3_home,0 +col3_maxaccel,1 +col3_maxdecel,1 +col3_maxspeed,1 +col3_rev_lim,0 +col4_absenchome,11788 +col4_fwd_lim,270 +col4_home,0 +col4_maxaccel,1 +col4_maxdecel,1 +col4_maxspeed,1 +col4_rev_lim,0 +col5_absenchome,376887 +col5_fwd_lim,269 +col5_home,0 +col5_maxaccel,1 +col5_maxdecel,1 +col5_maxspeed,1 +col5_rev_lim,0 +col6_absenchome,190872 +col6_fwd_lim,272 +col6_home,0 +col6_maxaccel,1 +col6_maxdecel,1 +col6_maxspeed,1 +col6_rev_lim,0 +col7_absenchome,23912 +col7_fwd_lim,270 +col7_home,0 +col7_maxaccel,1 +col7_maxdecel,1 +col7_maxspeed,1 +col7_rev_lim,0 +col8_absenchome,12085 +col8_fwd_lim,269 +col8_home,0 +col8_maxaccel,1 +col8_maxdecel,1 +col8_maxspeed,1 +col8_rev_lim,0