- Fixed state monitor eclipse commit problems. Siiiiiiiggggghhhhhh!

This commit is contained in:
koennecke
2007-01-30 03:19:43 +00:00
parent d61fbe0869
commit e4929d512c
11 changed files with 8655 additions and 26 deletions

8436
mcstas/dmc/dmcafter.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -6,13 +6,13 @@
#---------------------------------------------------------------------------
# O P T I O N S
# wwwMode = 1 when running for the WWW-VDMC application
set wwwMode 1
set wwwMode 0
if {$wwwMode == 1} {
set home /home/lnswww/vinstrument/mcstas/dmc
set datahome /home/lnswww/www/vinstrument
} else {
set home $env(HOME)/src/workspace/sics/mcstas/dmc
set home $env(HOME)/psi/workspace/sics/mcstas/dmc
}
#--------------------------------- first all the server options are set
#ServerOption RedirectFile $home/stdcdmc
@ -147,7 +147,6 @@ commandlog auto
commandlog intervall 5
#----------- enable sycamore
#InstallProtocolHandler
#InstallSinfox
#source sycFormat.tcl
#source /usr/lib/tcllib1.6.1/stooop/stooop.tcl
@ -155,3 +154,95 @@ commandlog intervall 5
#source sinfo.tcl
#source sycamore.tcl
#Publish sinfo Spy
#==================== install Hipadaba
proc hdbReadOnly {} {
error "Parameter is READ ONLY"
}
#------------------------------------
proc maketwotheta {} {
set txt [TwoThetaD]
set l [split $txt =]
set start [string trim [lindex $l 1]]
for {set i 0} {$i < 400} {incr i } {
append result [expr $start + $i * .2] " "
}
return $result
}
#-------------------------------------
InstallProtocolHandler
InstallHdb
MakeStateMon
hmake /dmc spy none
hsetprop /dmc type instrument
#-------- experiment
hmake /dmc/experiment spy none
hattach /dmc/experiment title title
hattach /dmc/experiment user user
hattach /dmc/experiment starttime starttime
hattach /dmc/experiment user user
hattach /dmc/experiment/user adress address
hattach /dmc/experiment/user phone phone
hattach /dmc/experiment/user email email
hattach /dmc/experiment comment1 comment1
hattach /dmc/experiment comment2 comment2
hattach /dmc/experiment comment3 comment3
#------- SINQ
hmake /dmc/sinq spy none
hmakescript /dmc/sinq/proton_monitor "counter getmonitor 4" hdbReadOnly int
sicspoll /dmc/sinq/proton_monitor hdb 10
#-------- monochromator
hmake /dmc/monochromator spy none
hattach /dmc/monochromator lambda wavelength
hattach /dmc/monochromator OmegaM theta
hattach /dmc/monochromator TwoThetaM two_theta
hattach /dmc/monochromator MonoX x_translation
hattach /dmc/monochromator MonoY y_translation
hattach /dmc/monochromator MonoChi chi
hattach /dmc/monochromator MonoPhi phi
hattach /dmc/monochromator CurveM vertical_focusing
hmakescript /dmc/monochromator/d_value "mono dd" "mono dd" float
hsetprop /dmc/monochromator/d_value priv manager
hmakescript /dmc/monochromator/scattering_sense "mono ss" "mono ss" int
hsetprop /dmc/monochromator/scattering_sense priv manager
#----------- sample
hmake /dmc/sample spy none
hmakescript /dmc/sample/name sample sample Text
hattach /dmc/sample Table rotation
hmakescript /dmc/sample/monitor "counter getmonitor 1" hdbReadOnly int
hsetprop /dmc/sample/monitor priv internal
#---------- detector
hmake /dmc/detector spy none
hattach /dmc/detector TwoThetaD two_theta
hmakescript /dmc/detector/preset "counter getpreset" hdbReadOnly float
hsetprop /dmc/detector/preset priv internal
hmakescript /dmc/detector/countmode "counter getmode" hdbReadOnly text
hsetprop /dmc/detector/countmode priv internal
sicspoll add /dmc/detector/preset hdb 30
sicspoll add /dmc/detector/countmode hdb 30
#------------ commands
hmake /commands spy none
hcommand /commands/count count
hsetprop /commands/count type command
hmake /commands/count/mode user text
hmake /commands/count/preset user float
hset /commands/count/preset 5
hset /commands/count/mode timer
#---------------- graphics
hmake /Graphics spy none
hmake /Graphics/powder_diagram spy none
hsetprop /Graphics/powder_diagram type graphdata
hsetprop /Graphics/powder_diagram viewer default
hmake /Graphics/powder_diagram/rank internal int
hset /Graphics/powder_diagram/rank 1
hmake /Graphics/powder_diagram/dim internal intar 1
hset /Graphics/powder_diagram/dim 400
hmakescript /Graphics/powder_diagram/two_theta maketwotheta hdbReadOnly floatar 400
sicspoll add /Graphics/powder_diagram/two_theta hdb 30
hsetprop /Graphics/powder_diagram/two_theta type axis
hsetprop /Graphics/powder_diagram/two_theta dim 0
hattach /Graphics/powder_diagram banana counts
hsetprop /Graphics/powder_diagram/counts type data
hsetprop /Graphics/powder_diagram/counts priv internal
sicspoll add /Graphics/powder_diagram/counts hdb 60

View File

@ -164,6 +164,7 @@ proc rundmcoptsim {mode preset } {
} else {
return $msg
}
wait 5
}
#------------------------------------------------------------------------
proc copydmcdataold { } {