diff --git a/mcstas/dmc/DataNumber b/mcstas/dmc/DataNumber index df9508e5..6a90ab30 100644 --- a/mcstas/dmc/DataNumber +++ b/mcstas/dmc/DataNumber @@ -1,3 +1,3 @@ - 225 + 227 NEVER, EVER modify or delete this file You'll risk eternal damnation and a reincarnation as a cockroach!|n \ No newline at end of file diff --git a/mcstas/dmc/gumibatch.tcl b/mcstas/dmc/gumibatch.tcl index 2f2bcf84..050ff63c 100644 --- a/mcstas/dmc/gumibatch.tcl +++ b/mcstas/dmc/gumibatch.tcl @@ -76,6 +76,7 @@ proc treatcscan {scanpath command out} { #---------------------------------------------------------------- proc translateCommand {command out} { set drivelist [list drive dr run] + set textList [list for while source if] # clientput "Translating: $command" set command [string trim $command] if {[string length $command] < 2} { @@ -85,16 +86,30 @@ proc translateCommand {command out} { set obj [string trim [lindex $l 0]] #------- check for drive commands set idx [lsearch $drivelist $obj] - if {$idx > 0} { + if {$idx >= 0} { set dev [lindex $l 1] set path [searchPathForDrivable $dev] if {[string compare $path NONE] != 0} { + set realTxt [hgetprop $path sicsdev] + set realL [split $realTxt =] + set realDev [lindex $realL 1] + set mapList [list $dev $realDev] + set newCom [string map $mapList $command] puts $out "\#NODE: $path" puts $out "clientput BatchPos = 1" - puts $out $command + puts $out $newCom return } } +#------ check for well known broken commands + set idx [lsearch $textList $obj] + if {$idx >= 0} { + puts $out "\#NODE: /batch/commandtext" + puts $out "clientput BatchPos = 1" + set buffer [string map {\n @nl@} $command] + puts $out "hset /batch/commandtext $buffer" + return + } #--------- check for simple commands set path [searchForCommand $command] if {[string compare $path NONE] != 0} { diff --git a/mcstas/dmc/vdmc.tcl b/mcstas/dmc/vdmc.tcl index 10c35d49..56fb7f62 100644 --- a/mcstas/dmc/vdmc.tcl +++ b/mcstas/dmc/vdmc.tcl @@ -357,7 +357,7 @@ proc makeQuickPar {name path} { } hmake /quickview spy none -makeQuickPar title /instrument/title +makeQuickPar title /instrument/experiment/title makeQuickPar sample /instrument/sample/name makeQuickPar lambda /instrument/monochromator/wavelength makeQuickPar two-theta /instrument/detector/two_theta diff --git a/mcstas/dmc/vdmccom.tcl b/mcstas/dmc/vdmccom.tcl index 02ab385c..00c2b020 100644 --- a/mcstas/dmc/vdmccom.tcl +++ b/mcstas/dmc/vdmccom.tcl @@ -22,6 +22,7 @@ if { [info exists vdmcinit] == 0 } { Publish hdbprepare User Publish hdbcollect User Publish mgbatch Spy + Publish loadmgbatch Spy Publish listbatchfiles Spy } source $home/log.tcl diff --git a/mcstas/dmc/vdmcstatus.tcl b/mcstas/dmc/vdmcstatus.tcl index 9178c7e4..e79da773 100644 --- a/mcstas/dmc/vdmcstatus.tcl +++ b/mcstas/dmc/vdmcstatus.tcl @@ -1,4 +1,4 @@ -exe batchpath ./ +exe batchpath tmp exe syspath ./ #--- BEGIN (commands producing errors on last restore) @@ -257,7 +257,7 @@ comment2 UNKNOWN comment2 setAccess 2 comment3 UNKNOWN comment3 setAccess 2 -starttime 2008-03-03 11:10:28 +starttime 2008-03-07 15:24:52 starttime setAccess 2 adress 2223 Luketown, 33 Luke Drive adress setAccess 2 @@ -269,7 +269,7 @@ email Luke@luke.ch email setAccess 2 sample_mur 0.000000 sample_mur setAccess 2 -lastdatafile /afs/psi.ch/user/k/koennecke/src/workspace/sics/mcstas/dmc/000/vdmc2008n000225.xml +lastdatafile /afs/psi.ch/user/k/koennecke/src/workspace/sics/mcstas/dmc/000/vdmc2008n000226.xml lastdatafile setAccess 2 lastscancommand unknown scan lastscancommand setAccess 2