Merging release 2.0 branch with CVS trunk
r2601 | ffr | 2008-05-30 10:26:57 +1000 (Fri, 30 May 2008) | 2 lines
This commit is contained in:
committed by
Douglas Clowes
parent
4a937e1608
commit
0749b0effa
@@ -1,9 +1,10 @@
|
||||
NO TE: QUOKKA - CONTROLLER 1
|
||||
NO TE:
|
||||
NO TE: $Revision: 1.8 $
|
||||
NO TE: $Date: 2007-09-24 01:10:59 $
|
||||
NO TE: $Revision: 1.9 $
|
||||
NO TE: $Name: not supported by cvs2svn $
|
||||
NO TE: $Date: 2008-05-30 00:26:57 $
|
||||
NO TE: Author: Dan Bartlett
|
||||
NO TE: Last revision by: $Author: dbx $
|
||||
NO TE: Last revision by: $Author: ffr $
|
||||
NO TE:
|
||||
NO TE: A-SAMPLE UPPER TILT
|
||||
NO TE: B-SAMPLE LOWER TILT
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
NO TE: QUOKKA - CONTROLLER 2
|
||||
NO TE:
|
||||
NO TE: $Revision: 1.5 $
|
||||
NO TE: $Date: 2007-09-24 01:10:59 $
|
||||
NO TE: $Revision: 1.6 $
|
||||
NO TE: $Name: not supported by cvs2svn $
|
||||
NO TE: $Date: 2008-05-30 00:26:57 $
|
||||
NO TE: Author: Dan Bartlett
|
||||
NO TE: Last revision by: $Author: dbx $
|
||||
NO TE: Last revision by: $Author: ffr $
|
||||
NO TE:
|
||||
NO TE: A-COLLIMATION OPTICS - CHAMBER 1
|
||||
NO TE: B-COLLIMATION OPTICS - CHAMBER 2
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
NO TE: QUOKKA - CONTROLLER 3
|
||||
NO TE:
|
||||
NO TE: $Revision: 1.5 $
|
||||
NO TE: $Date: 2007-09-24 01:10:59 $
|
||||
NO TE: $Revision: 1.6 $
|
||||
NO TE: $Name: not supported by cvs2svn $
|
||||
NO TE: $Date: 2008-05-30 00:26:57 $
|
||||
NO TE: Author: Dan Bartlett
|
||||
NO TE: Last revision by: $Author: dbx $
|
||||
NO TE: Last revision by: $Author: ffr $
|
||||
NO TE:
|
||||
NO TE: A-COLLIMATION OPTICS - CHAMBER 9
|
||||
NO TE: B-COLLIMATION OPTICS - CHAMBER 10
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
NO TE: QUOKKA - CONTROLLER 4
|
||||
NO TE:
|
||||
NO TE: $Revision: 1.7 $
|
||||
NO TE: $Date: 2007-09-24 01:10:59 $
|
||||
NO TE: $Revision: 1.8 $
|
||||
NO TE: $Name: not supported by cvs2svn $
|
||||
NO TE: $Date: 2008-05-30 00:26:57 $
|
||||
NO TE: Author: Dan Bartlett
|
||||
NO TE: Last revision by: $Author: dbx $
|
||||
NO TE: Last revision by: $Author: ffr $
|
||||
NO TE:
|
||||
NO TE: A-BEAM STOPS TRANS. X (ACCROSS BEAM) +VE=WEST
|
||||
NO TE: B-BEAM STOPS TRANSLATION - RAISE
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
quokka_configuration.tcl
|
||||
velsel.tcl
|
||||
sics_ports.tcl
|
||||
script_validator_ports.tcl
|
||||
extraconfig.tcl
|
||||
config
|
||||
util
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
config/anticollider/anticollider_common.tcl
|
||||
config/plc/plc_common_1.tcl
|
||||
config/counter/counter_common_1.tcl
|
||||
config/hipadaba/hipadaba_configuration_common.tcl
|
||||
@@ -8,3 +9,4 @@ config/hmm/anstohm_linked.xml
|
||||
config/scan/scan_common_1.hdd
|
||||
config/scan/scan_common_1.tcl
|
||||
config/nexus/nxscripts_common_1.tcl
|
||||
config/commands/commands_common.tcl
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# Forbid detector motion when the detector voltage is on
|
||||
forbid {-inf inf} for det when dhv1 in {20 inf}
|
||||
forbid {-inf inf} for detoff when dhv1 in {20 inf}
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
# $Revision: 1.2 $
|
||||
# $Date: 2008-05-30 00:26:57 $
|
||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||
# Last revision by: $Author: ffr $
|
||||
|
||||
source $cfPath(anticollider)/anticollider_common.tcl
|
||||
::anticollider::loadscript acscript.txt
|
||||
65
site_ansto/instrument/sans/config/commands/commands.tcl
Normal file
65
site_ansto/instrument/sans/config/commands/commands.tcl
Normal file
@@ -0,0 +1,65 @@
|
||||
source $cfPath(commands)/commands_common.tcl
|
||||
|
||||
namespace eval sample {
|
||||
command select {int=0:8 sampid} {
|
||||
SampleNum $sampid
|
||||
}
|
||||
}
|
||||
|
||||
namespace eval optics {
|
||||
VarMake ::optics::select::section text user
|
||||
VarMake ::optics::polarizer::in text user
|
||||
VarMake ::optics::lens::selection text user
|
||||
|
||||
command rotary_attenuator {int=0,15,45,90,180 angle} {
|
||||
AttRotDeg $angle
|
||||
}
|
||||
|
||||
command entrance_aperture {
|
||||
int=0,45,90,135,180,270 angle
|
||||
text=circ,squ,open,rect shape
|
||||
} {
|
||||
RotApDeg $angle
|
||||
RotApShape $shape
|
||||
}
|
||||
|
||||
command sample_aperture {
|
||||
int=25,50 size
|
||||
text=circ,squ,open,rect shape
|
||||
} {
|
||||
SApXmm $size
|
||||
SApZmm $size
|
||||
SApShape $shape
|
||||
}
|
||||
|
||||
##############################
|
||||
##
|
||||
# @brief set_guide uses a lookup table to setup the collimation system
|
||||
# @param row, selects a row from the guide configuration table
|
||||
#
|
||||
# eg\n
|
||||
# set_guide HIRES
|
||||
command guide "
|
||||
text=[join [array names ::optics::guide_configuration] , ] configuration
|
||||
" {
|
||||
|
||||
variable guide_configuration
|
||||
variable guide_configuration_columns
|
||||
|
||||
array set c1_map {G 1 MT 2 P 3}
|
||||
array set c2_map {MT 1 G 2 A 3}
|
||||
array set c3_map {MT 1 G 2 A 3}
|
||||
array set c4_map {MT 1 G 2 A 3}
|
||||
array set c5_map {MT 1 G 2 A 3}
|
||||
array set c6_map {MT 1 G 2 A 3}
|
||||
array set c7_map {MT 1 G 2 A 3}
|
||||
array set c8_map {MT 1 G 2 A 3}
|
||||
array set c9_map {LP 1 MT 2 G 3 A 4 L 5}
|
||||
|
||||
foreach el $guide_configuration($configuration) guide $guide_configuration_columns {
|
||||
lappend to_config $guide
|
||||
lappend to_config [set ${guide}_map($el)]
|
||||
}
|
||||
eval "drive $to_config"
|
||||
}
|
||||
}
|
||||
17
site_ansto/instrument/sans/config/hmm/detector.tcl
Normal file
17
site_ansto/instrument/sans/config/hmm/detector.tcl
Normal file
@@ -0,0 +1,17 @@
|
||||
# Detector voltage controller
|
||||
|
||||
set sim_mode [SplitReply [detector_simulation]]
|
||||
|
||||
if {$::sim_mode == "true"} {
|
||||
EvFactory new dhv1 sim
|
||||
} else {
|
||||
makeasyncqueue acq ORHVPS 137.157.202.85 4001
|
||||
evfactory new dhv1 orhvps acq
|
||||
dhv1 lowerlimit 0
|
||||
dhv1 upperlimit 2400
|
||||
dhv1 tolerance 19
|
||||
dhv1 max 2400
|
||||
dhv1 rate 10
|
||||
dhv1 lock
|
||||
}
|
||||
|
||||
@@ -1,41 +1,56 @@
|
||||
|
||||
source $cfPath(hmm)/hmm_configuration_common_1.tcl
|
||||
set sim_mode [SplitReply [hmm_simulation]]
|
||||
|
||||
proc ::histogram_memory::init_OAT_TABLE {} {
|
||||
if [ catch {
|
||||
# We don't need a MAX_CHAN parameter for time because the time channel
|
||||
# is scaled by calling the ::histogram_memory::clock_scale function
|
||||
OAT_TABLE X -setdata MAX_CHAN 128
|
||||
OAT_TABLE Y -setdata MAX_CHAN 128
|
||||
OAT_TABLE X -setdata BMIN -0.5
|
||||
OAT_TABLE X -setdata BMAX 127.5
|
||||
OAT_TABLE Y -setdata BMIN -0.5
|
||||
OAT_TABLE Y -setdata BMAX 127.5
|
||||
|
||||
OAT_TABLE -set X { 127.5 126.5 } NXC 128 Y { -0.5 0.5 } NYC 127 T { 0 2000 } NTC 1
|
||||
} message ] {
|
||||
if {$::errorCode=="NONE"} {return $message}
|
||||
return -code error $message
|
||||
}
|
||||
}
|
||||
proc ::histogram_memory::pre_count {} {}
|
||||
proc ::histogram_memory::post_count {} {}
|
||||
proc ::histogram_memory::initialize {} {
|
||||
::histogram_memory::_initialize
|
||||
if [ catch {
|
||||
if {$::sim_mode == "true"} {
|
||||
hmm configure oat_ntc_eff 1
|
||||
hmm configure oat_nyc_eff 127
|
||||
hmm configure oat_nxc_eff 127
|
||||
}
|
||||
BAT_TABLE -init
|
||||
CAT_TABLE -init
|
||||
SAT_TABLE -init
|
||||
OAT_TABLE -init
|
||||
FAT_TABLE -init
|
||||
::histogram_memory::_initialize
|
||||
|
||||
detector_active_height_mm 192
|
||||
detector_active_width_mm 192
|
||||
detector_active_height_mm 257.5
|
||||
detector_active_width_mm 500
|
||||
|
||||
set x_bb0 -0.5; set xbbmax 191.5
|
||||
set y_bb0 -0.5; set ybbmax 191.5
|
||||
hmm configure FAT_SIMULATED_EVENT_Y0 $y_bb0
|
||||
hmm configure FAT_SIMULATED_EVENT_Y1 $ybbmax
|
||||
hmm configure FAT_SIMULATED_EVENT_X0 $x_bb0
|
||||
hmm configure FAT_SIMULATED_EVENT_X1 $xbbmax
|
||||
set x_binwidth 1
|
||||
if {[expr {$xbbmax - $x_bb0}] > 0} {
|
||||
set x_bb1 [expr {$x_bb0+$x_binwidth}]
|
||||
} else {
|
||||
set x_bb1 [expr {$x_bb0-$x_binwidth}]
|
||||
# hmm configure FAT_SIMULATED_EVENT_Y0 $y_bb0
|
||||
# hmm configure FAT_SIMULATED_EVENT_Y1 $ybbmax
|
||||
# hmm configure FAT_SIMULATED_EVENT_X0 $x_bb0
|
||||
# hmm configure FAT_SIMULATED_EVENT_X1 $xbbmax
|
||||
::histogram_memory::init_OAT_TABLE
|
||||
::histogram_memory::upload_config Filler_defaults
|
||||
|
||||
::nexus::data alias ::histogram_memory::vertical_axis ::histogram_memory::y_bin
|
||||
::nexus::data alias ::histogram_memory::horizontal_axis ::histogram_memory::x_bin
|
||||
} message ] {
|
||||
if {$::errorCode=="NONE"} {return $message}
|
||||
return -code error $message
|
||||
}
|
||||
set y_binwidth 1
|
||||
if {[expr {$ybbmax - $y_bb0}] > 0} {
|
||||
set y_bb1 [expr {$y_bb0+$y_binwidth}]
|
||||
} else {
|
||||
set y_bb1 [expr {$y_bb0-$y_binwidth}]
|
||||
}
|
||||
OAT_TABLE -init X_MIN $x_bb0 X_MAX $xbbmax Y_MIN $y_bb0 Y_MAX $ybbmax
|
||||
# We default to one big bin for time
|
||||
set t_bb0 [OAT_TABLE -get T_MIN]
|
||||
set t_bb1 [OAT_TABLE -get T_MAX]
|
||||
OAT_TABLE X "$x_bb0 $x_bb1" Y "$y_bb0 $y_bb1" T "$t_bb0 $t_bb1"
|
||||
::histogram_memory::upload_config Filler_defaults
|
||||
|
||||
::nexus::data alias ::histogram_memory::vertical_axis ::histogram_memory::y_pixel_offset
|
||||
::nexus::data alias ::histogram_memory::horizontal_axis ::histogram_memory::x_pixel_offset
|
||||
}
|
||||
|
||||
proc histmem {cmd args} {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# $Revision: 1.15 $
|
||||
# $Date: 2008-02-19 04:27:19 $
|
||||
# $Revision: 1.16 $
|
||||
# $Date: 2008-05-30 00:26:57 $
|
||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||
# Last revision by: $Author: dcl $
|
||||
# Last revision by: $Author: ffr $
|
||||
|
||||
# START MOTOR CONFIGURATION
|
||||
|
||||
@@ -959,39 +959,3 @@ make_coll_motor_1 c8 section_8 pc9 $vc_units
|
||||
make_coll_motor_1 c9 section_9 pc10 $vc_units
|
||||
unset vc_units
|
||||
|
||||
namespace eval guide {
|
||||
VarMake ::guide::select::section text user
|
||||
VarMake ::guide::polarizer::in text user
|
||||
VarMake ::guide::lens::selection text user
|
||||
|
||||
#TODO Set aperture size variable.
|
||||
command select {int:0,1,2,3,4,5,6,7,8,9 section} {
|
||||
set empty {2 1 1 1 1 1 1 1 2}
|
||||
set aperture {2 3 3 3 3 3 3 3 4}
|
||||
set guide {1 2 2 2 2 2 2 2 3}
|
||||
array set lens {left 1 right 5 none 2}
|
||||
|
||||
set target $empty
|
||||
if {$section > 0} {
|
||||
set gr [lrange $guide 0 [expr $section -1]]
|
||||
set er [lrange $empty $section 8]
|
||||
set target [list $gr $er]
|
||||
if {[SplitReply [::guide::polarizer::in]] == "yes"} {
|
||||
lset target 0 3
|
||||
}
|
||||
} else {
|
||||
lset target 8 $lens([SplitReply [::guide::lens::selection]])
|
||||
}
|
||||
set fh [open junk.txt w]
|
||||
for {set i 1} {$i <= 9} {incr i} {
|
||||
puts $fh "run vc0$i [lindex target [expr {$i-1}]]"
|
||||
}
|
||||
close $fh
|
||||
}
|
||||
command polarizer {text:yes,no in} {
|
||||
::guide::polarizer::in $in
|
||||
}
|
||||
command lens {text:left,right,none selection} {
|
||||
::guide::lens::selection $selection
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,30 +10,30 @@ namespace eval optics {
|
||||
# configuration parameters
|
||||
# Rows can be of mixed type
|
||||
array set guide_configuration {
|
||||
GA {MT A A A A A A A A }
|
||||
MT {MT MT MT MT MT MT MT MT MT }
|
||||
LP {MT MT MT MT MT MT MT MT LP }
|
||||
LENS {MT MT MT MT MT MT MT MT L }
|
||||
P1 {P A MT MT MT MT MT MT MT }
|
||||
P1LP {P A MT MT MT MT MT MT LP }
|
||||
P1LENS {P A MT MT MT MT MT MT L }
|
||||
G1 {G A MT MT MT MT MT MT MT }
|
||||
P2 {P G A MT MT MT MT MT MT }
|
||||
G2 {G G A MT MT MT MT MT MT }
|
||||
P3 {P G G A MT MT MT MT MT }
|
||||
G3 {G G G A MT MT MT MT MT }
|
||||
P4 {P G G G A MT MT MT MT }
|
||||
G4 {G G G G A MT MT MT MT }
|
||||
P5 {P G G G G A MT MT MT }
|
||||
G5 {G G G G G A MT MT MT }
|
||||
P6 {P G G G G G A MT MT }
|
||||
G6 {G G G G G G A MT MT }
|
||||
P7 {P G G G G G G A MT }
|
||||
G7 {G G G G G G G A MT }
|
||||
P8 {P G G G G G G G A }
|
||||
G8 {G G G G G G G G A }
|
||||
P9 {P G G G G G G G G }
|
||||
G9 {G G G G G G G G G }
|
||||
ga {MT A A A A A A A A }
|
||||
mt {MT MT MT MT MT MT MT MT MT }
|
||||
lp {MT MT MT MT MT MT MT MT LP }
|
||||
lens {MT MT MT MT MT MT MT MT L }
|
||||
p1 {P A MT MT MT MT MT MT MT }
|
||||
p1lp {P A MT MT MT MT MT MT LP }
|
||||
p1lens {P A MT MT MT MT MT MT L }
|
||||
g1 {G A MT MT MT MT MT MT MT }
|
||||
p2 {P G A MT MT MT MT MT MT }
|
||||
g2 {G G A MT MT MT MT MT MT }
|
||||
p3 {P G G A MT MT MT MT MT }
|
||||
g3 {G G G A MT MT MT MT MT }
|
||||
p4 {P G G G A MT MT MT MT }
|
||||
g4 {G G G G A MT MT MT MT }
|
||||
p5 {P G G G G A MT MT MT }
|
||||
g5 {G G G G G A MT MT MT }
|
||||
p6 {P G G G G G A MT MT }
|
||||
g6 {G G G G G G A MT MT }
|
||||
p7 {P G G G G G G A MT }
|
||||
g7 {G G G G G G G A MT }
|
||||
p8 {P G G G G G G G A }
|
||||
g8 {G G G G G G G G A }
|
||||
p9 {P G G G G G G G G }
|
||||
g9 {G G G G G G G G G }
|
||||
}
|
||||
|
||||
# This list maps the motor names to columns of the
|
||||
@@ -49,32 +49,3 @@ namespace eval optics {
|
||||
variable guide_configuration_columns
|
||||
namespace export set_guide
|
||||
}
|
||||
##
|
||||
# @brief set_guide uses a lookup table to setup the collimation system
|
||||
# @param row, selects a row from the guide configuration table
|
||||
#
|
||||
# eg\n
|
||||
# set_guide HIRES
|
||||
proc ::optics::set_guide {row} {
|
||||
variable guide_configuration
|
||||
variable guide_configuration_columns
|
||||
|
||||
array set c1_map {G 1 MT 2 P 3}
|
||||
array set c2_map {MT 1 G 2 A 3}
|
||||
array set c3_map {MT 1 G 2 A 3}
|
||||
array set c4_map {MT 1 G 2 A 3}
|
||||
array set c5_map {MT 1 G 2 A 3}
|
||||
array set c6_map {MT 1 G 2 A 3}
|
||||
array set c7_map {MT 1 G 2 A 3}
|
||||
array set c8_map {MT 1 G 2 A 3}
|
||||
array set c9_map {LP 1 MT 2 G 3 A 4 L 5}
|
||||
|
||||
foreach el $guide_configuration($row) guide $guide_configuration_columns {
|
||||
lappend to_config $guide
|
||||
lappend to_config [set ${guide}_map($el)]
|
||||
}
|
||||
eval "drive $to_config"
|
||||
}
|
||||
namespace import ::optics::set_guide
|
||||
|
||||
publish set_guide user
|
||||
|
||||
294
site_ansto/instrument/sans/config/parameters/parameters.tcl
Normal file
294
site_ansto/instrument/sans/config/parameters/parameters.tcl
Normal file
@@ -0,0 +1,294 @@
|
||||
##
|
||||
# @brief We can't change the coordinate scheme at runtime because this would require
|
||||
# restructuring the hdb tree, but we should save it.
|
||||
foreach {var nxname} {
|
||||
VelSelCoordScheme coordinate_scheme
|
||||
SApCoordScheme coordinate_scheme
|
||||
EApCoordScheme coordinate_scheme
|
||||
SampleCoordScheme coordinate_scheme
|
||||
DetCoordScheme coordinate_scheme
|
||||
BeamstopCoordScheme coordinate_scheme
|
||||
CollCoordScheme coordinate_scheme
|
||||
} {
|
||||
::utility::mkVar $var text readonly $nxname true @none false true
|
||||
$var Cartesian
|
||||
$var lock
|
||||
}
|
||||
|
||||
##
|
||||
# @brief User privilege text variables
|
||||
#
|
||||
# TODO SICS-117 Redo as get/set macros like the "kind=command" macros but kind=getset and it is saveable
|
||||
# The set parameter will have a domain. If the param is readonly then the hdb privilege is readonly
|
||||
# Pros, GumTree will know the data type of the parameter (text params will have a list of valid values).
|
||||
# Cons, There is no "instant" feedback, macros are polled on the hdb tree.
|
||||
foreach {var nxname priv} {
|
||||
EApShape shape user
|
||||
RotApshape shape readonly
|
||||
SApShape shape readonly
|
||||
BSShape shape user
|
||||
} {
|
||||
::utility::mkVar $var text $priv $nxname true @none true true
|
||||
}
|
||||
|
||||
# The velocity selector position is used as the reference for other instrument
|
||||
# component positions. For simplicity we set it as the origin x=y=z=0.
|
||||
foreach {var nxname units} {
|
||||
VelSelPosXmm x mm
|
||||
VelSelPosYmm y mm
|
||||
VelSelPosZmm z mm
|
||||
EndFacePosYmm y mm
|
||||
RotApPosYmm y mm
|
||||
} {
|
||||
::utility::mkVar $var float readonly $nxname true @none true true
|
||||
if {$units != 1} {
|
||||
sicslist setatt $var units $units
|
||||
}
|
||||
}
|
||||
|
||||
::utility::mkVar SampleNum int readonly changer_position true sample true true
|
||||
|
||||
foreach {var nxname units priv} {
|
||||
LambdaA wavelength nm user
|
||||
LambdaResFWHM% wavelength_spread 1 user
|
||||
VSdeg twist degrees user
|
||||
VSrpm rotation_speed rpm user
|
||||
AttRotDeg AttRotDeg degrees readonly
|
||||
PleXmm x mm user
|
||||
RotApXmm x mm user
|
||||
RotApZmm z mm user
|
||||
RotApDeg RotApDeg degrees readonly
|
||||
EApXmm x mm user
|
||||
EApYmm y mm user
|
||||
EApZmm z mm user
|
||||
EApPosYmm y mm user
|
||||
SApXmm x mm readonly
|
||||
SApZmm z mm readonly
|
||||
SApPosXmm x mm user
|
||||
SApPosYmm y mm user
|
||||
SApPosZmm z mm user
|
||||
SamplePosXmm x mm user
|
||||
SamplePosYmm y mm user
|
||||
SamplePosZmm z mm user
|
||||
SampleRotDeg SampleRotDeg degrees user
|
||||
SampleTiltXdeg SampleTiltXdeg degrees user
|
||||
SampleTiltYdeg SampleTiltYdeg degrees user
|
||||
DetPosYOffsetmm detposyoffset mm user
|
||||
BSXmm x mm user
|
||||
BSZmm z mm user
|
||||
} {
|
||||
::utility::mkVar $var float $priv $nxname true @none true true
|
||||
if {$units != 1} {
|
||||
sicslist setatt $var units $units
|
||||
}
|
||||
}
|
||||
|
||||
proc sicsmsgfmt {args} {return "[info level -1] = $args"}
|
||||
::utility::macro::getset float L1mm {} {
|
||||
set efpy [SplitReply [EndFacePosYmm]]
|
||||
set sapy [SplitReply [SApPosYmm]]
|
||||
set eapy [SplitReply [EApPosYmm]]
|
||||
return [sicsmsgfmt [expr {$efpy + $sapy - $eapy}]]
|
||||
}
|
||||
sicslist setatt L1mm klass sample
|
||||
sicslist setatt L1mm long_name eap_sap_dist
|
||||
sicslist setatt L1mm units mm
|
||||
|
||||
::utility::macro::getset float L2mm {} {
|
||||
set detpy [SplitReply [DetPosYmm]]
|
||||
set detpyos [SplitReply [DetPosYOffsetmm]]
|
||||
set sapy [SplitReply [SApPosYmm]]
|
||||
return [sicsmsgfmt [expr {$detpyos + $detpyos - $sapy}]]
|
||||
}
|
||||
sicslist setatt L2mm klass detector
|
||||
sicslist setatt L2mm long_name sample_det_dist
|
||||
sicslist setatt L2mm units mm
|
||||
|
||||
foreach {pname motor hdbname units} {
|
||||
DetPosXmm detoff x mm
|
||||
DetPosYmm det y mm
|
||||
BSPosXmm bsx x mm
|
||||
BSPosZmm bsz z mm
|
||||
} {
|
||||
::utility::macro::getset float $pname {} [subst -nocommands {
|
||||
return [sicsmsgfmt [SplitReply [$motor]]]
|
||||
}]
|
||||
sicslist setatt $pname units $units
|
||||
sicslist setatt $pname long_name $hdbname
|
||||
}
|
||||
|
||||
################################################################################
|
||||
##
|
||||
# @brief This is the position of the velocity selector bunker face. It is used
|
||||
# as the reference for other positions. x=y=z=0.
|
||||
::hdb::MakeVelocity_Selector velocity_selector {
|
||||
wavelength LambdaA
|
||||
wavelength_spread LambdaResFWHM%
|
||||
coordinate_scheme VelSelCoordScheme
|
||||
position {VelSelPosXmm VelSelPosYmm VelSelPosZmm}
|
||||
}
|
||||
|
||||
::hdb::MakeAperture sample_aperture {
|
||||
shape SApShape
|
||||
size {SApXmm SApZmm}
|
||||
coordinate_scheme SApCoordScheme
|
||||
position {SApPosXmm SApPosYmm SApPosZmm}
|
||||
refpos {VelSelPosXmm EndFacePosYmm VelSelPosZmm}
|
||||
}
|
||||
|
||||
::hdb::MakeAperture entrance_aperture {
|
||||
shape EApShape
|
||||
size {EApXmm EApYmm EApZmm}
|
||||
coordinate_scheme EApCoordScheme
|
||||
position EApPosYmm
|
||||
refpos VelSelPosYmm
|
||||
}
|
||||
|
||||
::hdb::MakeAperture rotary_aperture {
|
||||
shape RotApShape
|
||||
size {RotApXmm RotApZmm}
|
||||
position RotApPosYmm
|
||||
orientation RotApDeg
|
||||
refpos VelSelPosYmm
|
||||
}
|
||||
|
||||
::hdb::MakeGeometry sample_geometry sample {
|
||||
coordinate_scheme SampleCoordScheme
|
||||
position {SamplePosXmm SamplePosYmm SamplePosZmm}
|
||||
orientation {SampleTiltXdeg SampleTiltYdeg SampleRotDeg}
|
||||
refpos {VelSelPosXmm EndFacePosYmm VelSelPosZmm}
|
||||
}
|
||||
|
||||
::hdb::MakeGeometry detector_geometry detector {
|
||||
coordinate_scheme DetCoordScheme
|
||||
position {DetPosXmm DetPosYmm}
|
||||
offset DetPosYOffsetmm
|
||||
refpos {VelSelPosXmm EndFacePosYmm}
|
||||
}
|
||||
|
||||
::hdb::MakeGeometry collimator_geometry collimator {
|
||||
coordinate_scheme CollCoordScheme
|
||||
position EndFacePosYmm
|
||||
refpos VelSelPosYmm
|
||||
}
|
||||
|
||||
::hdb::MakeGeometry beamstop_geometry beam_stop {
|
||||
shape BSShape
|
||||
position {BSPosXmm BSPosZmm}
|
||||
size {BSXmm BSZmm}
|
||||
}
|
||||
|
||||
# INITIALISE PARAMETERS
|
||||
# The collimation system aperture positions
|
||||
# Reference position is outer wall of velocity selector bunker, ie VelSelPosYmm
|
||||
array set collapposmm {
|
||||
inputguide 633
|
||||
apwheel 675
|
||||
ap1 4929
|
||||
ap2 6934
|
||||
ap3 8949
|
||||
ap4 10955
|
||||
ap5 12943
|
||||
ap6 14970
|
||||
ap7 16971
|
||||
ap9 19925
|
||||
}
|
||||
|
||||
VelSelPosXmm 0.0
|
||||
VelSelPosYmm 0.0
|
||||
VelSelPosZmm 0.0
|
||||
EndFacePosYmm 20095
|
||||
RotApPosYmm 675
|
||||
|
||||
################################################################################
|
||||
# Check Config
|
||||
|
||||
##
|
||||
# @brief List undefined parameters
|
||||
proc missingparams {} {
|
||||
set paramlist {
|
||||
AttFactor
|
||||
AttRotDeg
|
||||
BS1
|
||||
BS2
|
||||
BS3
|
||||
BS4
|
||||
BS5
|
||||
BSPosXmm
|
||||
BSPosZmm
|
||||
BSShape
|
||||
BSXmm
|
||||
BSZmm
|
||||
C1
|
||||
C2
|
||||
C3
|
||||
C4
|
||||
C5
|
||||
C6
|
||||
C7
|
||||
C8
|
||||
C9
|
||||
DetPosXmm
|
||||
DetPosYmm
|
||||
DetPosYmm
|
||||
DetPosYOffsetmm
|
||||
EApPosYmm
|
||||
EApShape
|
||||
EApXmm
|
||||
EApYmm
|
||||
EApZmm
|
||||
EndFacePosYmm
|
||||
L1mm
|
||||
L2mm
|
||||
LambdaA
|
||||
LambdaResFWHM%
|
||||
Pent
|
||||
Plexmm
|
||||
RotApDeg
|
||||
RotApShape
|
||||
RotApXmm
|
||||
RotApZmm
|
||||
SampleAttributes
|
||||
SampleComments
|
||||
SampleName
|
||||
SampleNum
|
||||
SamplePosXmm
|
||||
SamplePosYmm
|
||||
SamplePosYmm
|
||||
SamplePosZmm
|
||||
SampleRotDeg
|
||||
SampleTiltXDeg
|
||||
SampleTiltYDeg
|
||||
SampleTitle
|
||||
SApPosXmm
|
||||
SApPosYmm
|
||||
SApPosYmm
|
||||
SApPosZmm
|
||||
SApShape
|
||||
SApXmm
|
||||
SApZmm
|
||||
VSdeg
|
||||
VSrpm
|
||||
}
|
||||
set num 0
|
||||
foreach param $paramlist {
|
||||
if {[sicslist match $param] == " "} {
|
||||
clientput $param
|
||||
incr num
|
||||
}
|
||||
}
|
||||
if {$num > 0} {
|
||||
clientput "There are $num missing parameters"
|
||||
}
|
||||
}
|
||||
|
||||
##
|
||||
# @brief Check list
|
||||
proc check {args} {
|
||||
switch $args {
|
||||
"missing" {
|
||||
missingparams
|
||||
}
|
||||
}
|
||||
}
|
||||
publish check user
|
||||
@@ -1,11 +1,3 @@
|
||||
makeasyncqueue acq ORHVPS 137.157.202.85 4001
|
||||
evfactory new dhv1 orhvps acq
|
||||
dhv1 lowerlimit 0
|
||||
dhv1 upperlimit 2400
|
||||
dhv1 tolerance 19
|
||||
dhv1 max 2400
|
||||
dhv1 rate 10
|
||||
|
||||
proc TrimReply { str } {
|
||||
set reply [string trim $str " :"]
|
||||
return $reply
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# $Revision: 1.6 $
|
||||
# $Date: 2007-10-23 02:42:52 $
|
||||
# $Revision: 1.7 $
|
||||
# $Date: 2008-05-30 00:26:56 $
|
||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||
# Last revision by: $Author: ffr $
|
||||
|
||||
@@ -17,26 +17,38 @@ source server_config.tcl
|
||||
########################################
|
||||
# INSTRUMENT SPECIFIC CONFIGURATION
|
||||
|
||||
source $cfPath(hipadaba)/hipadaba_configuration.tcl
|
||||
fileeval $cfPath(nexus)/nxscripts.tcl
|
||||
fileeval $cfPath(parameters)/parameters.tcl
|
||||
fileeval $cfPath(velsel)/velsel.tcl
|
||||
fileeval $cfPath(motors)/motor_configuration.tcl
|
||||
|
||||
########
|
||||
# Parameters set above the restore command will be clobbered by
|
||||
# the values in the status.tcl file
|
||||
restore
|
||||
|
||||
fileeval $cfPath(plc)/plc.tcl
|
||||
fileeval $cfPath(optics)/optics.tcl
|
||||
fileeval $cfPath(counter)/counter.tcl
|
||||
fileeval $cfPath(hmm)/hmm_configuration.tcl
|
||||
fileeval $cfPath(nexus)/nxscripts.tcl
|
||||
fileeval $cfPath(hmm)/detector.tcl
|
||||
fileeval $cfPath(scan)/scan.tcl
|
||||
source $cfPath(hipadaba)/hipadaba_configuration.tcl
|
||||
fileeval $cfPath(commands)/commands.tcl
|
||||
fileeval $cfPath(anticollider)/anticollider.tcl
|
||||
source gumxml.tcl
|
||||
|
||||
|
||||
########
|
||||
# Parameters set above the restore command will be clobbered by
|
||||
# the values in the status.tcl file
|
||||
# BIG WARNING: DON'T PUT 'restore' IN A CATCH BLOCK BECAUSE IT RETURNS
|
||||
# AN ERROR IF THERE IS NO ../log/status.tcl FILE.
|
||||
restore
|
||||
|
||||
::histogram_memory::initialize
|
||||
|
||||
MakeStateMon hmscan
|
||||
fileeval extraconfig.tcl
|
||||
if [file exists extraconfig.tcl] {
|
||||
fileeval extraconfig.tcl
|
||||
} else {
|
||||
clientput "extraconfig.tcl not found. continueing"
|
||||
}
|
||||
|
||||
::anticollider::init
|
||||
server_set_sobj_attributes
|
||||
buildHDB instrument_dictionary
|
||||
|
||||
4
site_ansto/instrument/sans/script_validator_ports.tcl
Normal file
4
site_ansto/instrument/sans/script_validator_ports.tcl
Normal file
@@ -0,0 +1,4 @@
|
||||
set quieckport quieck-val-quokka
|
||||
set serverport server-val-quokka
|
||||
set interruptport interrupt-val-quokka
|
||||
set telnetport telnet-val-quokka
|
||||
Reference in New Issue
Block a user