Modifications for new util, config directory structure.
r1498 | ffr | 2007-02-16 16:43:59 +1100 (Fri, 16 Feb 2007) | 2 lines
This commit is contained in:
committed by
Douglas Clowes
parent
4654c4c9c7
commit
d5cde7c4f6
@@ -0,0 +1,63 @@
|
||||
# Defines hashes which map SICS device object names to hipadaba paths
|
||||
InstallHdb
|
||||
hmake /graphics spy none
|
||||
hsetprop /graphics type graphset
|
||||
hmake /commands spy none
|
||||
hsetprop /commands type commandset
|
||||
|
||||
#TODO change this to hparts.tcl
|
||||
source $cfPath(hipadaba)/hpaths.tcl
|
||||
set instrument echidna
|
||||
hmake /$instrument spy none
|
||||
hsetprop /$instrument type instrument
|
||||
|
||||
# Generate hipadaba nodes for the paths in the hpaths file
|
||||
foreach hp $hpaths {
|
||||
hmake /$instrument/$hp spy none;
|
||||
hsetprop /$instrument/$hp type part;
|
||||
}
|
||||
|
||||
#--- admin
|
||||
hattach /$instrument title title
|
||||
hattach /$instrument/experiment sample description
|
||||
hmake /$instrument/user spy none
|
||||
hsetprop /$instrument/user type part
|
||||
hattach /$instrument/user user name
|
||||
hattach /$instrument/user email email
|
||||
hattach /$instrument/user phone phone
|
||||
|
||||
#--- Motors
|
||||
foreach {obj name part} $motor_hpath {
|
||||
hattach /$instrument/$part $obj $name
|
||||
#TODO Only ignore node deletion errors for simulated motors
|
||||
if [ catch {hdel /$instrument/$part/$name/axis} ] {}
|
||||
if [ catch {hdel /$instrument/$part/$name/units} ] {}
|
||||
}
|
||||
|
||||
#--- Configurable Virtual Motors
|
||||
foreach {obj name part master_obj} $cvirtmotor_hpath {
|
||||
set path /$instrument/$part
|
||||
# hattach /$instrument/$part $obj $name
|
||||
hattach $path $obj $name
|
||||
hchain $path/$name $path/$master_obj
|
||||
}
|
||||
|
||||
#------------- scan command
|
||||
hsetprop /commands type part
|
||||
hcommand /commands/scan hdb_hmscan
|
||||
hsetprop /commands/scan type command
|
||||
hsetprop /commands/scan priv user
|
||||
hmake /commands/scan/scan_variable user text
|
||||
hsetprop /commands/scan/scan_variable argtype drivable
|
||||
hmake /commands/scan/scan_start user float
|
||||
hsetprop /commands/scan/scan_start argtype float
|
||||
hmake /commands/scan/scan_increment user float
|
||||
hsetprop /commands/scan/scan_increment argtype float
|
||||
hmake /commands/scan/NP user int
|
||||
hsetprop /commands/scan/NP argtype int
|
||||
hmake /commands/scan/mode user text
|
||||
hsetprop /commands/scan/mode argtype text
|
||||
hsetprop /commands/scan/mode values monitor,timer
|
||||
hmake /commands/scan/preset user float
|
||||
hsetprop /commands/scan/preset argtype float
|
||||
|
||||
48
site_ansto/instrument/hrpd/config/hipadaba/hpaths.tcl
Normal file
48
site_ansto/instrument/hrpd/config/hipadaba/hpaths.tcl
Normal file
@@ -0,0 +1,48 @@
|
||||
set hpaths [list \
|
||||
experiment sample monochromator slits \
|
||||
slits/1 slits/2 detector detector/monitor detector/histmem ]
|
||||
|
||||
# Maps devices (eg motors) to hipadaba paths.
|
||||
# obj name path
|
||||
set motor_hpath [list \
|
||||
ss1u top /slits/1 \
|
||||
ss1d bottom /slits/1 \
|
||||
ss1l left /slits/1 \
|
||||
ss1r right /slits/1 \
|
||||
ss2u ss2u /slits/2 \
|
||||
ss2d ss2d /slits/2 \
|
||||
ss2l ss2l /slits/2 \
|
||||
ss2r ss2r /slits/2 \
|
||||
som rotate /sample \
|
||||
schi chi /sample \
|
||||
sphi phi /sample \
|
||||
sx translate_x /sample \
|
||||
sy translate_y /sample \
|
||||
stth detector_rotate /sample \
|
||||
pcx pcx /monochromator \
|
||||
pcr pcr /monochromator \
|
||||
mom mom /monochromator \
|
||||
mchi mchi /monochromator \
|
||||
mphi mphi /monochromator \
|
||||
mx mx /monochromator \
|
||||
my my /monochromator \
|
||||
mtth mtth /monochromator ]
|
||||
|
||||
# Configurable virtual motors
|
||||
# obj name path master_obj
|
||||
set cvirtmotor_hpath [list \
|
||||
ss1vg ss1vg /slits/1 top\
|
||||
ss1vo ss1vo /slits/1 top\
|
||||
ss1hg ss1hg /slits/1 right\
|
||||
ss1ho ss1ho /slits/1 right\
|
||||
ss2vg ss2vg /slits/2 ss2u\
|
||||
ss2vo ss2vo /slits/2 ss2u\
|
||||
ss2hg ss2hg /slits/2 ss2r\
|
||||
ss2ho ss2ho /slits/2 ss2r\
|
||||
sth sth /sample detector_rotate\
|
||||
mth mth /monochromator mtth]
|
||||
|
||||
array set counter_hpath [ list \
|
||||
hm hm /detector/histmem \
|
||||
counter counter /detector/monitor ]
|
||||
|
||||
Reference in New Issue
Block a user