Merge branch 'RELEASE-3_1' into RELEASE-3_2

Conflicts:
	sics/site_ansto/instrument/bilby/config/chopper/sct_astrium_chopper.tcl
	sics/site_ansto/instrument/bilby/config/motors/shutters_sct.tcl
	sics/site_ansto/instrument/bilby/config/motors/tank_sct.tcl
	sics/site_ansto/instrument/bilby/util/sics_config.ini
	sics/site_ansto/instrument/config/environment/hiden_xcs_sct.tcl
	sics/site_ansto/instrument/config/environment/huber_pilot_sct.tcl
	sics/site_ansto/instrument/config/environment/isotech_ps_sct.tcl
	sics/site_ansto/instrument/config/environment/keithley_m2700_sct.tcl
	sics/site_ansto/instrument/config/environment/magneticField/oxford12tlv_sct.tcl
	sics/site_ansto/instrument/config/environment/magneticField/tsi_smc_sct.tcl
	sics/site_ansto/instrument/config/environment/nhq_200_sct.tcl
	sics/site_ansto/instrument/config/environment/omron_hldc_sct.tcl
	sics/site_ansto/instrument/config/environment/protekmm_sct.tcl
	sics/site_ansto/instrument/config/environment/temperature/eurotherm_m2000_sct.tcl
	sics/site_ansto/instrument/config/environment/temperature/julabo_lh45_gen_sct.tcl
	sics/site_ansto/instrument/config/environment/temperature/lakeshore_218_sct.tcl
	sics/site_ansto/instrument/config/environment/temperature/ls336_sct.tcl
	sics/site_ansto/instrument/config/environment/temperature/ls340_sct.tcl
	sics/site_ansto/instrument/config/environment/temperature/mercury_base_sct.tcl
	sics/site_ansto/instrument/config/environment/temperature/mercury_level_sct.tcl
	sics/site_ansto/instrument/config/environment/temperature/mercury_pres_sct.tcl
	sics/site_ansto/instrument/config/environment/temperature/mercury_scpi_sct.tcl
	sics/site_ansto/instrument/config/environment/temperature/mercury_temp_sct.tcl
	sics/site_ansto/instrument/config/environment/temperature/mercury_valve_sct.tcl
	sics/site_ansto/instrument/config/environment/temperature/nprvasm2_sct.tcl
	sics/site_ansto/instrument/config/environment/temperature/pfeiffer_hg_sct.tcl
	sics/site_ansto/instrument/config/environment/temperature/watlow_mpm_sct.tcl
	sics/site_ansto/instrument/config/environment/temperature/watlow_mrm_sct.tcl
	sics/site_ansto/instrument/config/environment/temperature/watlow_mst4_sct.tcl
	sics/site_ansto/instrument/config/environment/temperature/west_6100.sct
	sics/site_ansto/instrument/config/source/reactor_status_sct.tcl
	sics/site_ansto/instrument/hrpd/echidna_configuration.tcl
	sics/site_ansto/instrument/sans/quokka_configuration.tcl
	sics/site_ansto/instrument/tas/config/motors/motor_configuration.tcl
	sics/site_ansto/instrument/util/gen_sct.py
	sics/site_ansto/instrument/util/motor_utility.tcl
This commit is contained in:
Douglas Clowes
2014-09-26 17:04:19 +10:00
75 changed files with 5146 additions and 540 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

@@ -0,0 +1,108 @@
#vactex
set currentoct 0
set somdir 1
set somstart 0
set somend 0
set octrange 0
proc SetUpVacTex {_somstart _somend} {
global currentoct somdir somstart somend octrange
set somstart $_somstart
set somend $_somend
# set octrange $_octrange
set currentrun 0
set somdir 1
# set currentoct [expr $octrange/2.0]
oct accel 2
# oct speed 0.5
oct decel 2
som accel 3
som decel 3
som speed 3
drive som $somstart
som speed 3
}
publish SetUpVacTex user
proc VacTex {somstep} {
global currentoct somdir somstart somend octrange
# set octspeed [expr {$octrange*1.0/$somtime}]
# oct speed $octspeed
set i_bool 0
if {$somdir == 1} {
set currentsom $somstart
set i 0
} else {
set currentsom $somend
set i [expr {int(($somend-$somstart)/$somstep)}]
}
histmem mode unlimited
newfile HISTOGRAM_XY
while {$i_bool==0} {
set currentoct [expr {$currentoct *-1}]
drive som $currentsom
# run oct $currentoct
oct oscillate_count 1
oct oscillate start
hmm countblock
save $i
broadcast $i $currentsom $currentoct
if {($somdir > 0)} {
set currentsom [expr {$currentsom + $somstep}]
if {$currentsom > $somend} {set i_bool 1}
incr i
} else {
set currentsom [expr {$currentsom - $somstep}]
if {$currentsom < $somstart} {set i_bool 1}
incr i -1
}
}
set somdir [expr {(-1*$somdir)}]
}
publish VacTex user
proc VacRamp {temp rate somstep} {
set tstart [SplitReply [tc1 setpoint]]
set tim1 [clock seconds]
set tlength [expr abs($tstart-$temp)/($rate/3600.0)]
tc1 ramprate $rate
tc1 setpoint $temp
set bool 0
# RadCollOn $oscno
while {$bool==0} {
VacTex $somstep
set tim2 [expr [clock seconds]-$tim1]
if {$tim2>$tlength} {set bool 1}
}
}
publish VacRamp user
proc VacRun {tmins somstep} {
set tim1 [clock seconds]
set tlength [expr {$tmins * 60}]
set bool 0
# RadCollOn $oscno
while {$bool==0} {
VacTex $somstep
set tim2 [expr [clock seconds]-$tim1]
if {$tim2>$tlength} {set bool 1}
}
}
publish VacRun user

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\