Changes pulled back from Wombat 2014-09-09

This commit is contained in:
Douglas Clowes
2014-09-09 14:52:47 +10:00
parent c2a73720e9
commit c8057a89aa
4 changed files with 56 additions and 101 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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\