From c8057a89aa677e8d5c67eb1dcecd2532732f264a Mon Sep 17 00:00:00 2001 From: Douglas Clowes Date: Tue, 9 Sep 2014 14:52:47 +1000 Subject: [PATCH] Changes pulled back from Wombat 2014-09-09 --- .../hipd/config/commands/eulerscan.tcl | 52 ---------- .../instrument/hipd/config/hmm/hmm_rapid.tcl | 97 ++++++++++--------- .../config/motors/motor_configuration.tcl | 4 +- .../instrument/hipd/wombat_configuration.tcl | 4 +- 4 files changed, 56 insertions(+), 101 deletions(-) diff --git a/site_ansto/instrument/hipd/config/commands/eulerscan.tcl b/site_ansto/instrument/hipd/config/commands/eulerscan.tcl index 954453cd..45b0724b 100644 --- a/site_ansto/instrument/hipd/config/commands/eulerscan.tcl +++ b/site_ansto/instrument/hipd/config/commands/eulerscan.tcl @@ -2,58 +2,6 @@ # AJS Dec 2010 -# SetHistoSync: sets the histogram to receive $framenum worth of frames on receiving -# TTL pulse in frame sync input. Note: Framebuffer should be set to OFF for long runs - -proc SetHistoSync {framenum} { - histmem stop - bat_table -set NO_BAT_ENTRIES $framenum NO_BAT_PERIODS $framenum - bat_table -set NO_REPEAT_ENTRY 1 NO_REPEAT_TABLE 1 NO_EXECUTE_TABLE 1 PERIOD_INDICES { 0 1 } - fat_table -set NOS_PERIODS $framenum - oat_table -set T {0 2200000} NTC 1 - histmem loadconf - histmem fsrce EXTERNAL -} - -publish SetHistoSync user - -# SetHistoNormal: resets the histo for standard operation - -proc SetHistoNormal {} { - histmem stop - bat_table -set NO_BAT_ENTRIES 1 NO_BAT_PERIODS 1 - bat_table -set NO_REPEAT_ENTRY 0 NO_REPEAT_TABLE 0 NO_EXECUTE_TABLE 0 PERIOD_INDICES { 0} - fat_table -set NOS_PERIODS 1 - oat_table -set T {0 2200000} NTC 1 - oat_table -set Y {-0.5 3.5} NYC 128 - histmem loadconf - histmem fsrce INTERNAL - proc ::histogram_memory::pre_count {} {} -} - -publish SetHistoNormal user - -proc SetHistoOneShot {frq framenum } { - histmem stop - oct speed 0.25 - oct accel 0.25 - oct decel 0.25 - drive oct 0 - bat_table -set NO_BAT_ENTRIES $framenum NO_BAT_PERIODS $framenum - bat_table -set NO_REPEAT_ENTRY 1 NO_REPEAT_TABLE 1 NO_EXECUTE_TABLE 1 PERIOD_INDICES { 0 1 } - fat_table -set NOS_PERIODS $framenum - oat_table -set T {0 2200000} NTC 1 - oat_table -set Y {-0.5 15.5} NYC 16 - histmem freq $frq - - histmem loadconf - histmem fsrce INTERNAL - histmem mode unlimited - -} - - -publish SetHistoOneShot user # continous scan for EPHI- the euler cradle phi stage (innermost axis) # note make sure controller 2 has the PHISCAN code in it diff --git a/site_ansto/instrument/hipd/config/hmm/hmm_rapid.tcl b/site_ansto/instrument/hipd/config/hmm/hmm_rapid.tcl index 43f851a0..fd7c040f 100644 --- a/site_ansto/instrument/hipd/config/hmm/hmm_rapid.tcl +++ b/site_ansto/instrument/hipd/config/hmm/hmm_rapid.tcl @@ -29,6 +29,7 @@ proc histset_XYTperiod {} { proc histmem_period_single { } { # Because bugs may not yet have been corrected in hmm_configuration_common_1.tcl, # apply the default settings before attempting del/clear. + histmem astop global n_periods set n_periods 1 FAT_TABLE -set NOS_PERIODS 1 @@ -41,23 +42,9 @@ proc histmem_period_single { } { } Publish histmem_period_single User -# orig version of this pre Oct 09 -# -#proc histmem_period_sequence { Np Nf } { -# Note - sequence needs to be at least 2 periods. -# global n_periods -# set n_periods $Np -# set fatstr "FAT_TABLE -set NOS_PERIODS $Np" -# set fatstr2 "FAT_TABLE -set PERIOD_INDICES { 0 1 }" -# set batstr "BAT_TABLE -set NO_BAT_ENTRIES $Np NO_BAT_PERIODS $Np NO_REPEAT_ENTRY $Nf NO_REPEAT_TABLE 1 NO_EXECUTE_TABLE 1" -# eval $fatstr -# eval $fatstr2 -# eval $batstr -# histmem loadconf -# -#} - proc histmem_period_sequence {Np Nt} { + histmem stop + hmm astop global n_periods set n_periods $Np #FAT_TABLE -set NOS_PERIODS $Np @@ -69,9 +56,12 @@ proc histmem_period_sequence {Np Nt} { # newfile HISTOGRAM_XYT } +Publish histmem_period_sequence User proc histmem_period_sequence_off {} { + histmem stop + hmm astop global n_periods set n_periods $Np FAT_TABLE -set NOS_PERIODS 1 @@ -79,7 +69,7 @@ proc histmem_period_sequence_off {} { histmem loadconf histset_XYperiod } -Publish histmem_period_sequence User +Publish histmem_period_sequence_off User @@ -95,6 +85,8 @@ proc histmem_save_period_sequence { } { Publish histmem_save_period_sequence User proc histmem_period_strobo {Freq Bins} { + histmem stop + hmm astop global nos_bins set nos_bins $Bins set bintime [expr int(1000000./($Freq*$Bins))] @@ -108,6 +100,7 @@ proc histmem_period_strobo {Freq Bins} { Publish histmem_period_strobo User proc histmem_strobo_off {} { + hmm astop histmem fsrce INTERNAL OAT_TABLE -set T { 0 200000 } NTC 1 histmem loadconf @@ -115,44 +108,56 @@ proc histmem_strobo_off {} { } Publish histmem_strobo_off User +# SetHistoSync: sets the histogram to receive $framenum worth of frames on receiving +# TTL pulse in frame sync input. Note: Framebuffer should be set to OFF for long runs - -proc histmem_acquire_period_sequence { Np Nf } { - - newfile HISTOGRAM_XYT - +proc SetHistoSync {framenum} { histmem stop - histmem_period_sequence $Np $Nf + hmm astop + bat_table -set NO_BAT_ENTRIES $framenum NO_BAT_PERIODS $framenum + bat_table -set NO_REPEAT_ENTRY 1 NO_REPEAT_TABLE 1 NO_EXECUTE_TABLE 1 PERIOD_INDICES { 0 1 } + fat_table -set NOS_PERIODS $framenum + oat_table -set T {0 2200000} NTC 1 histmem loadconf - histmem start + histmem fsrce EXTERNAL +} - set dlytime [ expr int( 1000 * $Nf / 50. ) ] -# clientput "Waiting for" $dlytime "ms..." - after $dlytime +publish SetHistoSync user -# clientput "tc1 reading is: " [tc1 get] +# SetHistoNormal: resets the histo for standard operation - global n_periods - for { set i 0 } { $i < $n_periods } { incr i } { -# after $dlytime -# set current_period -1 -# while { $current_period < $i } { -# update -# after 500 -# # hmm count -# # hmm init 2 -# clientput [hmm configure current_period] -# set current_period [lindex [split [hmm configure current_period] " "] 2] -# clientput "i = " $i " and the current period is " $current_period -# } +proc SetHistoNormal {} { + histmem stop + hmm astop + bat_table -set NO_BAT_ENTRIES 1 NO_BAT_PERIODS 1 + bat_table -set NO_REPEAT_ENTRY 0 NO_REPEAT_TABLE 0 NO_EXECUTE_TABLE 0 PERIOD_INDICES { 0} + fat_table -set NOS_PERIODS 1 + oat_table -set T {0 2200000} NTC 1 + oat_table -set Y {-0.5 3.5} NYC 128 + histmem loadconf + histmem fsrce INTERNAL + proc ::histogram_memory::pre_count {} {} +} - hmm configure read_data_period_number $i - save [expr $i] - } +publish SetHistoNormal user - clientput "Acquisition completed." +proc SetHistoOneShot {frq framenum } { + histmem stop + hmm astop + bat_table -set NO_BAT_ENTRIES $framenum NO_BAT_PERIODS $framenum + bat_table -set NO_REPEAT_ENTRY 1 NO_REPEAT_TABLE 1 NO_EXECUTE_TABLE 1 PERIOD_INDICES { 0 1 } + fat_table -set NOS_PERIODS $framenum + oat_table -set T {0 2200000} NTC 1 + oat_table -set Y {-0.5 15.5} NYC 16 + histmem freq $frq + + histmem loadconf + histmem fsrce INTERNAL + histmem mode unlimited } -Publish histmem_acquire_period_sequence User + + +publish SetHistoOneShot user diff --git a/site_ansto/instrument/hipd/config/motors/motor_configuration.tcl b/site_ansto/instrument/hipd/config/motors/motor_configuration.tcl index a6fac755..e3953a9f 100644 --- a/site_ansto/instrument/hipd/config/motors/motor_configuration.tcl +++ b/site_ansto/instrument/hipd/config/motors/motor_configuration.tcl @@ -345,8 +345,8 @@ Motor $sample_stage_rotate $motor_driver_type [params \ hardlowerlim -71\ hardupperlim 116\ maxSpeed 5\ - maxAccel 1\ - maxDecel 1\ + maxAccel 3\ + maxDecel 3\ stepsPerX 12500\ absEnc 1\ absEncHome $som_Home\ diff --git a/site_ansto/instrument/hipd/wombat_configuration.tcl b/site_ansto/instrument/hipd/wombat_configuration.tcl index 07290c1c..e92da140 100644 --- a/site_ansto/instrument/hipd/wombat_configuration.tcl +++ b/site_ansto/instrument/hipd/wombat_configuration.tcl @@ -56,12 +56,14 @@ fileeval $cfPath(environment)/magneticField/sct_oxford_labview.tcl fileeval $cfPath(environment)/magneticField/sct_oxford12tlv.tcl fileeval $cfPath(environment)/he3/sct_he3.tcl fileeval $cfPath(environment)/magneticField/sct_green_magnet.tcl +fileeval $cfPath(environment)/magneticField/sct_green_magnet_labview.tcl fileeval $cfPath(hmm)/hmm_configuration.tcl fileeval $cfPath(nexus)/nxscripts.tcl fileeval $cfPath(scan)/scan.tcl fileeval $cfPath(commands)/commands.tcl fileeval $cfPath(commands)/pulser.tcl fileeval $cfPath(commands)/hvcommands.tcl +fileeval $cfPath(commands)/vactex.tcl fileeval $cfPath(commands)/eulerscan.tcl fileeval $cfPath(anticollider)/anticollider.tcl fileeval $cfPath(hmm)/hmm_rapid.tcl @@ -81,7 +83,7 @@ SetVoltScale 2000.0 # Eurotherm # add_et2000 name IP PORT MODBUS_ADDR TOL # add_et2000 et2000 10.157.205.19 502 1 5 -# add tcf1 west400 10.157.205.19 502 +# add_west400 tcf1 157.205.25 502 # Using a Keithley 2700 mulitimeter to read pressure # add_k2700 pressure 137.157.201.86 4004 "\r"