Merge from Wombat, except sics_config.ini

Conflicts:
	sics/site_ansto/instrument/config/environment/magneticField/sct_green_magnet.tcl
	sics/site_ansto/instrument/config/environment/temperature/sct_lakeshore_336.tcl
	sics/site_ansto/instrument/config/environment/temperature/sct_oxford_mercury.tcl
	sics/site_ansto/instrument/config/hmm/hmm_object.tcl
	sics/site_ansto/instrument/hipd/config/commands/eulerscan.tcl
	sics/site_ansto/instrument/hipd/config/motors/motor_configuration.tcl
	sics/site_ansto/instrument/hipd/util/sics_config.ini
	sics/site_ansto/instrument/server_config.tcl
This commit is contained in:
Douglas Clowes
2014-06-24 17:20:27 +10:00
parent 3f8f5fcba7
commit 648c8003b7
6 changed files with 179 additions and 126 deletions

View File

@@ -1,107 +1,130 @@
# Euler cradle scan commands for texture runs
# Euler cradle scan commands for texture runs # AJS Dec 2010
# AJS Dec 2010
# SetHistoSync: sets the histogram to receive $framenum worth of frames on receiving
# 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
# TTL pulse in frame sync input. Note: Framebuffer should be set to OFF for long runs
proc SetHistoSync {framenum} {
proc SetHistoSync {framenum} { histmem stop
histmem stop bat_table -set NO_BAT_ENTRIES $framenum NO_BAT_PERIODS $framenum
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 }
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
fat_table -set NOS_PERIODS $framenum oat_table -set T {0 2200000} NTC 1
oat_table -set T {0 2200000} NTC 1 histmem loadconf
histmem loadconf histmem fsrce EXTERNAL
histmem fsrce EXTERNAL }
}
publish SetHistoSync user
publish SetHistoSync user
# SetHistoNormal: resets the histo for standard operation
# SetHistoNormal: resets the histo for standard operation
proc SetHistoNormal {} {
proc SetHistoNormal {} { histmem stop
histmem stop bat_table -set NO_BAT_ENTRIES 1 NO_BAT_PERIODS 1
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}
bat_table -set NO_REPEAT_ENTRY 0 NO_REPEAT_TABLE 0 NO_EXECUTE_TABLE 0 PERIOD_INDICES { 0} fat_table -set NOS_PERIODS 1
fat_table -set NOS_PERIODS 1 oat_table -set T {0 2200000} NTC 1
oat_table -set T {0 2200000} NTC 1 oat_table -set Y {-0.5 3.5} NYC 128
histmem loadconf histmem loadconf
histmem fsrce INTERNAL histmem fsrce INTERNAL
proc ::histogram_memory::pre_count {} {} proc ::histogram_memory::pre_count {} {}
} }
# continous scan for EPHI- the euler cradle phi stage (innermost axis) publish SetHistoNormal user
# note make sure controller 2 has the PHISCAN code in it
proc SetHistoOneShot {frq framenum } {
publish SetHistoNormal user histmem stop
oct speed 0.25
oct accel 0.25
proc EphiCtsScan {start step range steptime} { oct decel 0.25
drive oct 0
# magic number: steps per rotation for phi bat_table -set NO_BAT_ENTRIES $framenum NO_BAT_PERIODS $framenum
set ephisteps -12500 bat_table -set NO_REPEAT_ENTRY 1 NO_REPEAT_TABLE 1 NO_EXECUTE_TABLE 1 PERIOD_INDICES { 0 1 }
set ephispeed [expr {($step*1.0)/$steptime}] fat_table -set NOS_PERIODS $framenum
set numsteps [expr {round($range/$step)}] oat_table -set T {0 2200000} NTC 1
# broadcast $omspeed $numsteps oat_table -set Y {-0.5 15.5} NYC 16
histmem freq $frq
# run ephi to start angle -1 so that first pulse signals as ephi crosses 0 angle
# at correct velocity histmem loadconf
ephi accel 1 histmem fsrce INTERNAL
ephi decel 1 histmem mode unlimited
ephi speed 3
drive ephi [expr {$start-1}] }
ephi speed $ephispeed
ephi accel [expr {$ephispeed*1.2}]
publish SetHistoOneShot user
# now set ephi parameters to galil and clear the bit
# continous scan for EPHI- the euler cradle phi stage (innermost axis)
set scval [expr {($range+2.2)*$ephisteps}] # note make sure controller 2 has the PHISCAN code in it
set stval [expr {$ephisteps * $step}]
broadcast $scval $stval
som send CTLEN=$scval
som send CTSTEP=$stval proc EphiCtsScan {start step range steptime} {
# som send OMN = [expr {$numsteps+1}]
som send CB5 # magic number: steps per rotation for phi
set ephisteps -12500
proc ::histogram_memory::pre_count {} { set ephispeed [expr {($step*1.0)/$steptime}]
ephi send "XQ #EPHSCAN,2" set numsteps [expr {round($range/$step)}]
} # broadcast $omspeed $numsteps
histmem mode unlimited # run ephi to start angle -1 so that first pulse signals as ephi crosses 0 angle
histmem start block # at correct velocity
ephi accel 1
newfile HISTOPERIOD_XY ephi decel 1
for {set i 0} {$i<$numsteps} {incr i} {save $i} ephi speed 3
ephi speed 1 drive ephi [expr {$start-1}]
ephi speed $ephispeed
ephi accel [expr {$ephispeed*1.2}]
# this we needed when it didn't work properly
# proc ::histogram_memory::pre_count {} {} # now set ephi parameters to galil and clear the bit
# ephi send SHC
# ephi send SPC=25000 set scval [expr {($range+2.2)*$ephisteps}]
# ephi send BCG set stval [expr {$ephisteps * $step}]
# wait 3 broadcast $scval $stval
# ephi send "XQ #THREAD0,0" som send CTLEN=$scval
# wait 3 som send CTSTEP=$stval
# ephi reset # som send OMN = [expr {$numsteps+1}]
} som send CB5
publish EphiCtsScan user
proc ::histogram_memory::pre_count {} {
proc EulerCtsScan {range step steptime} { ephi send "XQ #EPHSCAN,2"
set numsteps [expr {round($range/$step)}] }
SetHistoSync $numsteps
foreach chi {0 15 30 45 60 75 90} { histmem mode unlimited
drive echi $chi histmem start block
EphiCtsScan [expr {-$range/2}] $step $range $steptime
} newfile HISTOPERIOD_XY
# SetHistoNormal for {set i 0} {$i<$numsteps} {incr i} {save $i}
} ephi speed 1
publish EulerCtsScan user
# this we needed when it didn't work properly
proc KillEphi {} { # proc ::histogram_memory::pre_count {} {}
ephi send HX2 # ephi send SHC
ephi send STC # ephi send SPC=25000
ephi reset # ephi send BCG
} # wait 3
# ephi send "XQ #THREAD0,0"
# wait 3
# ephi reset
}
publish EphiCtsScan user
proc EulerCtsScan {range step steptime} {
set numsteps [expr {round($range/$step)}]
SetHistoSync $numsteps
foreach chi {0 15 30 45 60 75 90} {
drive echi $chi
EphiCtsScan [expr {-$range/2}] $step $range $steptime
}
# SetHistoNormal
}
publish EulerCtsScan user
proc KillEphi {} {
ephi send HX2
ephi send STC
ephi reset
}

View File

@@ -27,6 +27,9 @@ proc ::histogram_memory::init_OAT_TABLE {args} {
hmm configure fat_frame_frequency $freq hmm configure fat_frame_frequency $freq
hmm configure fat_frame_source INTERNAL hmm configure fat_frame_source INTERNAL
# set resolution "double_x"
switch $resolution { switch $resolution {
"hires" { "hires" {
FAT_TABLE -set MULTI_HOST_HISTO_STITCH_OVERLAP 32 MULTI_HOST_HISTO_JOIN_STITCH_ORDER INVERTED FAT_TABLE -set MULTI_HOST_HISTO_STITCH_OVERLAP 32 MULTI_HOST_HISTO_JOIN_STITCH_ORDER INVERTED
@@ -36,10 +39,19 @@ proc ::histogram_memory::init_OAT_TABLE {args} {
FAT_TABLE -set MULTI_HOST_HISTO_STITCH_OVERLAP 8 MULTI_HOST_HISTO_JOIN_STITCH_ORDER INVERTED FAT_TABLE -set MULTI_HOST_HISTO_STITCH_OVERLAP 8 MULTI_HOST_HISTO_JOIN_STITCH_ORDER INVERTED
OAT_TABLE -set X { 991.5 987.5 } NXC 248 Y { -0.5 3.5 } NYC 128 T { 0 20000 } NTC 1 OAT_TABLE -set X { 991.5 987.5 } NXC 248 Y { -0.5 3.5 } NYC 128 T { 0 20000 } NTC 1
} }
"double_x" {
FAT_TABLE -set MULTI_HOST_HISTO_SWITCH_OVERLAP 16 MULTI_HOST_HISTO_JOIN_STITCH_ORDER INVERTED
OAT_TABLE -set X { 991.5 989.5 } NXC 496 Y { -0.5 3.5 } NYC 128 T { 0 20000 } NTC 1
}
"double_y_968x128" { "double_y_968x128" {
FAT_TABLE -set MULTI_HOST_HISTO_STITCH_OVERLAP 8 MULTI_HOST_HISTO_JOIN_STITCH_ORDER INVERTED BNL_STATUS_MASK_MULTI_Y 1000h FAT_TABLE -set MULTI_HOST_HISTO_STITCH_OVERLAP 8 MULTI_HOST_HISTO_JOIN_STITCH_ORDER INVERTED BNL_STATUS_MASK_MULTI_Y 1000h
OAT_TABLE -set X { 991.5 987.5 } NXC 248 Y { -0.5 3.5 } NYC 256 T { 0 20000 } NTC 1 OAT_TABLE -set X { 991.5 987.5 } NXC 248 Y { -0.5 1.5 } NYC 256 T { 0 20000 } NTC 1
} }
"lores_484x64" {
FAT_TABLE -set MULTI_HOST_HISTO_STITCH_OVERLAP 4 MULTI_HOST_HISTO_JOIN_STITCH_ORDER INVERTED
OAT_TABLE -set X { 991.5 983.5 } NXC 124 Y { -0.5 7.5 } NYC 64 T { 0 20000 } NTC 1
}
default { default {
# Default to std_968x128 # Default to std_968x128
FAT_TABLE -set MULTI_HOST_HISTO_STITCH_OVERLAP 8 MULTI_HOST_HISTO_JOIN_STITCH_ORDER INVERTED FAT_TABLE -set MULTI_HOST_HISTO_STITCH_OVERLAP 8 MULTI_HOST_HISTO_JOIN_STITCH_ORDER INVERTED
@@ -135,6 +147,8 @@ proc ::histogram_memory::isc_initialize {} {
detector_radius_mm lock detector_radius_mm lock
::histogram_memory::init_OAT_TABLE res "std_968x128" ::histogram_memory::init_OAT_TABLE res "std_968x128"
# ::histogram_memory::init_OAT_TABLE res "double_x"
::histogram_memory::upload_config Filler_defaults ::histogram_memory::upload_config Filler_defaults
set ::histogram_memory::histmem_axes(HOR) /instrument/detector/x_pixel_angular_offset set ::histogram_memory::histmem_axes(HOR) /instrument/detector/x_pixel_angular_offset

View File

@@ -57,15 +57,20 @@ Publish histmem_period_single User
# #
#} #}
proc histmem_period_sequence {Np} { proc histmem_period_sequence {Np Nt} {
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
BAT_TABLE -set PERIOD_INDICES { 0 } NO_BAT_ENTRIES 1 NO_BAT_PERIODS 1 NO_REPEAT_ENTRY 1 NO_REPEAT_TABLE 1 NO_EXECUTE_TABLE $Np #BAT_TABLE -set PERIOD_INDICES { 0 1} NO_BAT_ENTRIES $Np NO_BAT_PERIODS $Np NO_REPEAT_ENTRY 1 NO_REPEAT_TABLE 1 NO_EXECUTE_TABLE 1
OAT_TABLE -set T {0 $Nt} NTC $Np
FAT_TABLE -set FRAME_BUFFER DISABLE
histmem clockscale 1000000
histmem loadconf histmem loadconf
histset_XYperiod # newfile HISTOGRAM_XYT
} }
proc histmem_period_sequence_off {} { proc histmem_period_sequence_off {} {
global n_periods global n_periods
set n_periods $Np set n_periods $Np

View File

@@ -1,8 +1,9 @@
# This must be loaded by motor_configuration.tcl # This must be loaded by motor_configuration.tcl
set ephi_Home 26575217 set ephi_Home 26575217
set echi_Home 24224381 #set echi_Home 24224381
#set echi_Home 8919294 #set echi_Home 8919294
set echi_Home 24207159
set eom_Home 23165482 set eom_Home 23165482
# Sample Tilt 1, euler omega stage # Sample Tilt 1, euler omega stage
@@ -32,7 +33,7 @@ Motor echi $motor_driver_type [params \
axis B\ axis B\
units degrees\ units degrees\
hardlowerlim -45\ hardlowerlim -45\
hardupperlim 100\ hardupperlim 120\
maxSpeed 2\ maxSpeed 2\
maxAccel 2\ maxAccel 2\
maxDecel 2\ maxDecel 2\
@@ -42,7 +43,7 @@ Motor echi $motor_driver_type [params \
cntsPerX 8192] cntsPerX 8192]
setHomeandRange -motor echi -home 0 -lowrange 10 -uprange 95 setHomeandRange -motor echi -home 0 -lowrange 10 -uprange 95
echi softlowerlim -10 echi softlowerlim -10
echi softupperlim 99 echi softupperlim 120
echi home 0 echi home 0
echi speed 1 echi speed 1
echi movecount $move_count echi movecount $move_count
@@ -53,7 +54,7 @@ echi long_name euler_chi
# Sample Trans 1, upper, y # Sample Trans 1, upper, y
Motor ephi $motor_driver_type [params \ Motor ephi $motor_driver_type [params \
asyncqueue mc2\ asyncqueue mc2\
axis D\ axis C\
units degrees\ units degrees\
hardlowerlim -185\ hardlowerlim -185\
hardupperlim 185\ hardupperlim 185\

View File

@@ -38,7 +38,10 @@ set my_Home 8378212
set som_Home 17214054 set som_Home 17214054
set stth_Home 1036498 set stth_Home 1036498
#set stth_Home 32855991 #set stth_Home 32855991
set oct_Home 7743768 #set oct_Home 7743534
set oct_Home 7741090
#Measured or computed slit motor steps per millimetre #Measured or computed slit motor steps per millimetre
# 125 steps * 161:1 gears = 20125 # 125 steps * 161:1 gears = 20125
@@ -274,7 +277,7 @@ Motor mom $motor_driver_type [params \
axis E\ axis E\
units degrees\ units degrees\
hardlowerlim -5\ hardlowerlim -5\
hardupperlim 173\ hardupperlim 183\
maxSpeed 1\ maxSpeed 1\
maxAccel 1\ maxAccel 1\
maxDecel 1\ maxDecel 1\
@@ -334,7 +337,7 @@ Motor $sample_stage_rotate $motor_driver_type [params \
axis E\ axis E\
units degrees\ units degrees\
hardlowerlim -71\ hardlowerlim -71\
hardupperlim 111\ hardupperlim 116\
maxSpeed 5\ maxSpeed 5\
maxAccel 1\ maxAccel 1\
maxDecel 1\ maxDecel 1\
@@ -342,7 +345,7 @@ Motor $sample_stage_rotate $motor_driver_type [params \
absEnc 1\ absEnc 1\
absEncHome $som_Home\ absEncHome $som_Home\
cntsPerX 4096] cntsPerX 4096]
setHomeandRange -motor $sample_stage_rotate -home 0 -lowrange -70 -uprange 110 setHomeandRange -motor $sample_stage_rotate -home 0 -lowrange -70 -uprange 116
$sample_stage_rotate speed 1 $sample_stage_rotate speed 1
$sample_stage_rotate precision 0.02 $sample_stage_rotate precision 0.02
$sample_stage_rotate part sample $sample_stage_rotate part sample
@@ -381,7 +384,7 @@ Motor oct $motor_driver_type [params \
axis G\ axis G\
units degrees\ units degrees\
hardlowerlim -1.5\ hardlowerlim -1.5\
hardupperlim 2.5\ hardupperlim 8.5\
maxSpeed 2.0\ maxSpeed 2.0\
maxAccel 5.0\ maxAccel 5.0\
maxDecel 5.0\ maxDecel 5.0\
@@ -390,7 +393,7 @@ Motor oct $motor_driver_type [params \
absEncHome $oct_Home\ absEncHome $oct_Home\
cntsPerX -465] cntsPerX -465]
oct softlowerlim -1.4 oct softlowerlim -1.4
oct softupperlim 2.4 oct softupperlim 8.4
oct home 0 oct home 0
oct speed 0.5 oct speed 0.5
oct precision 0.02 oct precision 0.02

View File

@@ -37,8 +37,8 @@ fileeval $cfPath(environment)/temperature/sct_qlink.tcl
fileeval $cfPath(environment)/temperature/west400.tcl fileeval $cfPath(environment)/temperature/west400.tcl
fileeval $cfPath(environment)/temperature/sct_oxford_mercury.tcl fileeval $cfPath(environment)/temperature/sct_oxford_mercury.tcl
fileeval $cfPath(environment)/magneticField/sct_oxford_labview.tcl fileeval $cfPath(environment)/magneticField/sct_oxford_labview.tcl
#fileeval $cfPath(environment)/he3/sct_he3.tcl fileeval $cfPath(environment)/he3/sct_he3.tcl
#fileeval $cfPath(environment)/he3/sct_hmp_power.tcl fileeval $cfPath(environment)/he3/sct_hmp_power.tcl
fileeval $cfPath(environment)/magneticField/sct_green_magnet.tcl fileeval $cfPath(environment)/magneticField/sct_green_magnet.tcl
fileeval $cfPath(hmm)/hmm_configuration.tcl fileeval $cfPath(hmm)/hmm_configuration.tcl
fileeval $cfPath(nexus)/nxscripts.tcl fileeval $cfPath(nexus)/nxscripts.tcl
@@ -65,13 +65,20 @@ 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
# 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"
# Lakeshore 370 Resistance Bridge # Lakeshore 370 Resistance Bridge
# add_lakeshore_370 ls370 137.157.201.86 4002 2.0 # add_lakeshore_370 ls370 137.157.201.86 4001 2.0
# stabdard cf8
# LS336 01 at 205.28
# LS336 02 at 205.29
add_sct_ls336 tc2 10.157.205.30 7777 "\r\n" 1.0 1.0
add_sct_ls336 tc1 10.157.205.31 7777 "\r\n" 1.0 1.0
add_sct_ls340 tc3 137.157.201.86 4001 "\r\n" 1.0 1.0
server_init server_init
########################################### ###########################################