Changes pulled back from Wombat 2014-09-09
This commit is contained in:
@ -2,58 +2,6 @@
|
|||||||
# AJS Dec 2010
|
# 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)
|
# continous scan for EPHI- the euler cradle phi stage (innermost axis)
|
||||||
# note make sure controller 2 has the PHISCAN code in it
|
# note make sure controller 2 has the PHISCAN code in it
|
||||||
|
@ -29,6 +29,7 @@ proc histset_XYTperiod {} {
|
|||||||
proc histmem_period_single { } {
|
proc histmem_period_single { } {
|
||||||
# Because bugs may not yet have been corrected in hmm_configuration_common_1.tcl,
|
# Because bugs may not yet have been corrected in hmm_configuration_common_1.tcl,
|
||||||
# apply the default settings before attempting del/clear.
|
# apply the default settings before attempting del/clear.
|
||||||
|
histmem astop
|
||||||
global n_periods
|
global n_periods
|
||||||
set n_periods 1
|
set n_periods 1
|
||||||
FAT_TABLE -set NOS_PERIODS 1
|
FAT_TABLE -set NOS_PERIODS 1
|
||||||
@ -41,23 +42,9 @@ proc histmem_period_single { } {
|
|||||||
}
|
}
|
||||||
Publish histmem_period_single User
|
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} {
|
proc histmem_period_sequence {Np Nt} {
|
||||||
|
histmem stop
|
||||||
|
hmm astop
|
||||||
global n_periods
|
global n_periods
|
||||||
set n_periods $Np
|
set n_periods $Np
|
||||||
#FAT_TABLE -set NOS_PERIODS $Np
|
#FAT_TABLE -set NOS_PERIODS $Np
|
||||||
@ -69,9 +56,12 @@ proc histmem_period_sequence {Np Nt} {
|
|||||||
# newfile HISTOGRAM_XYT
|
# newfile HISTOGRAM_XYT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Publish histmem_period_sequence User
|
||||||
|
|
||||||
|
|
||||||
proc histmem_period_sequence_off {} {
|
proc histmem_period_sequence_off {} {
|
||||||
|
histmem stop
|
||||||
|
hmm astop
|
||||||
global n_periods
|
global n_periods
|
||||||
set n_periods $Np
|
set n_periods $Np
|
||||||
FAT_TABLE -set NOS_PERIODS 1
|
FAT_TABLE -set NOS_PERIODS 1
|
||||||
@ -79,7 +69,7 @@ proc histmem_period_sequence_off {} {
|
|||||||
histmem loadconf
|
histmem loadconf
|
||||||
histset_XYperiod
|
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
|
Publish histmem_save_period_sequence User
|
||||||
|
|
||||||
proc histmem_period_strobo {Freq Bins} {
|
proc histmem_period_strobo {Freq Bins} {
|
||||||
|
histmem stop
|
||||||
|
hmm astop
|
||||||
global nos_bins
|
global nos_bins
|
||||||
set nos_bins $Bins
|
set nos_bins $Bins
|
||||||
set bintime [expr int(1000000./($Freq*$Bins))]
|
set bintime [expr int(1000000./($Freq*$Bins))]
|
||||||
@ -108,6 +100,7 @@ proc histmem_period_strobo {Freq Bins} {
|
|||||||
Publish histmem_period_strobo User
|
Publish histmem_period_strobo User
|
||||||
|
|
||||||
proc histmem_strobo_off {} {
|
proc histmem_strobo_off {} {
|
||||||
|
hmm astop
|
||||||
histmem fsrce INTERNAL
|
histmem fsrce INTERNAL
|
||||||
OAT_TABLE -set T { 0 200000 } NTC 1
|
OAT_TABLE -set T { 0 200000 } NTC 1
|
||||||
histmem loadconf
|
histmem loadconf
|
||||||
@ -115,44 +108,56 @@ proc histmem_strobo_off {} {
|
|||||||
}
|
}
|
||||||
Publish histmem_strobo_off User
|
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 SetHistoSync {framenum} {
|
||||||
proc histmem_acquire_period_sequence { Np Nf } {
|
|
||||||
|
|
||||||
newfile HISTOGRAM_XYT
|
|
||||||
|
|
||||||
histmem stop
|
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 loadconf
|
||||||
histmem start
|
histmem fsrce EXTERNAL
|
||||||
|
}
|
||||||
|
|
||||||
set dlytime [ expr int( 1000 * $Nf / 50. ) ]
|
publish SetHistoSync user
|
||||||
# clientput "Waiting for" $dlytime "ms..."
|
|
||||||
after $dlytime
|
|
||||||
|
|
||||||
# clientput "tc1 reading is: " [tc1 get]
|
# SetHistoNormal: resets the histo for standard operation
|
||||||
|
|
||||||
global n_periods
|
proc SetHistoNormal {} {
|
||||||
for { set i 0 } { $i < $n_periods } { incr i } {
|
histmem stop
|
||||||
# after $dlytime
|
hmm astop
|
||||||
# set current_period -1
|
bat_table -set NO_BAT_ENTRIES 1 NO_BAT_PERIODS 1
|
||||||
# while { $current_period < $i } {
|
bat_table -set NO_REPEAT_ENTRY 0 NO_REPEAT_TABLE 0 NO_EXECUTE_TABLE 0 PERIOD_INDICES { 0}
|
||||||
# update
|
fat_table -set NOS_PERIODS 1
|
||||||
# after 500
|
oat_table -set T {0 2200000} NTC 1
|
||||||
# # hmm count
|
oat_table -set Y {-0.5 3.5} NYC 128
|
||||||
# # hmm init 2
|
histmem loadconf
|
||||||
# clientput [hmm configure current_period]
|
histmem fsrce INTERNAL
|
||||||
# set current_period [lindex [split [hmm configure current_period] " "] 2]
|
proc ::histogram_memory::pre_count {} {}
|
||||||
# clientput "i = " $i " and the current period is " $current_period
|
}
|
||||||
# }
|
|
||||||
|
|
||||||
hmm configure read_data_period_number $i
|
publish SetHistoNormal user
|
||||||
save [expr $i]
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
|
|
||||||
|
@ -345,8 +345,8 @@ Motor $sample_stage_rotate $motor_driver_type [params \
|
|||||||
hardlowerlim -71\
|
hardlowerlim -71\
|
||||||
hardupperlim 116\
|
hardupperlim 116\
|
||||||
maxSpeed 5\
|
maxSpeed 5\
|
||||||
maxAccel 1\
|
maxAccel 3\
|
||||||
maxDecel 1\
|
maxDecel 3\
|
||||||
stepsPerX 12500\
|
stepsPerX 12500\
|
||||||
absEnc 1\
|
absEnc 1\
|
||||||
absEncHome $som_Home\
|
absEncHome $som_Home\
|
||||||
|
@ -56,12 +56,14 @@ fileeval $cfPath(environment)/magneticField/sct_oxford_labview.tcl
|
|||||||
fileeval $cfPath(environment)/magneticField/sct_oxford12tlv.tcl
|
fileeval $cfPath(environment)/magneticField/sct_oxford12tlv.tcl
|
||||||
fileeval $cfPath(environment)/he3/sct_he3.tcl
|
fileeval $cfPath(environment)/he3/sct_he3.tcl
|
||||||
fileeval $cfPath(environment)/magneticField/sct_green_magnet.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(hmm)/hmm_configuration.tcl
|
||||||
fileeval $cfPath(nexus)/nxscripts.tcl
|
fileeval $cfPath(nexus)/nxscripts.tcl
|
||||||
fileeval $cfPath(scan)/scan.tcl
|
fileeval $cfPath(scan)/scan.tcl
|
||||||
fileeval $cfPath(commands)/commands.tcl
|
fileeval $cfPath(commands)/commands.tcl
|
||||||
fileeval $cfPath(commands)/pulser.tcl
|
fileeval $cfPath(commands)/pulser.tcl
|
||||||
fileeval $cfPath(commands)/hvcommands.tcl
|
fileeval $cfPath(commands)/hvcommands.tcl
|
||||||
|
fileeval $cfPath(commands)/vactex.tcl
|
||||||
fileeval $cfPath(commands)/eulerscan.tcl
|
fileeval $cfPath(commands)/eulerscan.tcl
|
||||||
fileeval $cfPath(anticollider)/anticollider.tcl
|
fileeval $cfPath(anticollider)/anticollider.tcl
|
||||||
fileeval $cfPath(hmm)/hmm_rapid.tcl
|
fileeval $cfPath(hmm)/hmm_rapid.tcl
|
||||||
@ -81,7 +83,7 @@ SetVoltScale 2000.0
|
|||||||
# Eurotherm
|
# Eurotherm
|
||||||
# add_et2000 name IP PORT MODBUS_ADDR TOL
|
# add_et2000 name IP PORT MODBUS_ADDR TOL
|
||||||
# add_et2000 et2000 10.157.205.19 502 1 5
|
# 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
|
# Using a Keithley 2700 mulitimeter to read pressure
|
||||||
# add_k2700 pressure 137.157.201.86 4004 "\r"
|
# add_k2700 pressure 137.157.201.86 4004 "\r"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user