notify client when file has been updated
write scan step to file r1391 | ffr | 2007-01-10 09:26:44 +1100 (Wed, 10 Jan 2007) | 3 lines
This commit is contained in:
committed by
Douglas Clowes
parent
9b3e21f04f
commit
087efbe552
@@ -3,9 +3,22 @@ MakeNXScript
|
||||
proc getVal {msg} {
|
||||
return [string trim [lindex [split $msg =] 1 ] ]
|
||||
}
|
||||
|
||||
proc nxreopenfile {} {
|
||||
global dataFileName;
|
||||
global dataFileName nxFileOpen;
|
||||
nxscript reopen $dataFileName echidna.dic;
|
||||
set nxFileOpen true;
|
||||
}
|
||||
|
||||
proc nxclosefile {} {
|
||||
global dataFileName nxFileOpen;
|
||||
if {$nxFileOpen == true} {
|
||||
nxscript close;
|
||||
set nxFileOpen false;
|
||||
set flist [split $dataFileName "/"];
|
||||
set fname [lindex $flist [expr [llength $flist] - 1] ];
|
||||
clientput "$fname updated" "event";
|
||||
}
|
||||
}
|
||||
|
||||
set dradius 1.25
|
||||
@@ -15,7 +28,7 @@ set pi 3.1415926
|
||||
#set angsep [expr $tubedia/$dradius *(180/$pi)]
|
||||
set angsep 1.25
|
||||
# stthmin = (180 - (1.25*127))/2
|
||||
proc addnxentry {nxobj entryname scanVariable scanVarPos } {
|
||||
proc addnxentry {nxobj entryname scanVariable scanVarPos scanVarStep} {
|
||||
global dradius ndect angsep;
|
||||
putcommon $nxobj $entryname $scanVariable
|
||||
putcrystal $nxobj
|
||||
@@ -39,10 +52,11 @@ putsample $nxobj
|
||||
$nxobj makelink scandata dcounts
|
||||
$nxobj makelink scandata dtheta
|
||||
$nxobj makelink scanvar $scanVariable
|
||||
$nxobj putfloat scanstep $scanVarStep
|
||||
|
||||
}
|
||||
|
||||
proc bm_addnxentry {nxobj entryname scanVariable scanVarPos } {
|
||||
proc bm_addnxentry {nxobj entryname scanVariable scanVarPos scanVarStep} {
|
||||
global dradius ndect angsep;
|
||||
putcommon $nxobj $entryname $scanVariable
|
||||
putcrystal $nxobj
|
||||
@@ -57,6 +71,7 @@ putsample $nxobj
|
||||
$nxobj puttext dlayout point
|
||||
$nxobj makelink scandata mdata
|
||||
$nxobj makelink scanvar $scanVariable
|
||||
$nxobj putfloat scanstep $scanVarStep
|
||||
|
||||
}
|
||||
|
||||
@@ -64,22 +79,20 @@ proc putmonitor {nxobj} {
|
||||
$nxobj puttext mmode [string trim [lindex [split [bm getmode] =] 1]]
|
||||
$nxobj putfloat mpreset [string trim [lindex [split [bm getpreset] =] 1]]
|
||||
$nxobj putint mdata [string trim [lindex [split [bm getcounts] =] 1]]
|
||||
$nxobj putfloat mdistance [getVal [bm_distance]]
|
||||
$nxobj putfloat mdistance [getVal [sics_bm_distance]]
|
||||
}
|
||||
|
||||
proc putsample {nxobj} {
|
||||
$nxobj puttext saname [getVal [Sample]]
|
||||
}
|
||||
proc putcrystal {nxobj} {
|
||||
$nxobj puttext ctype "Ge "
|
||||
$nxobj puttext ctype [sics_mono_crystal]
|
||||
}
|
||||
proc putcommon {nxobj entryName scanVariable} {
|
||||
$nxobj updatedictvar entryName $entryName
|
||||
$nxobj updatedictvar scan_variable $scanVariable
|
||||
$nxobj puttext etitle [getVal [title]]
|
||||
$nxobj puttext estart [sicstime]
|
||||
$nxobj puttext eend [sicstime]
|
||||
$nxobj puttext iname [getVal [instrument]]
|
||||
$nxobj puttext etitle [getVal [Title]]
|
||||
$nxobj puttext iname [getVal [Instrument]]
|
||||
|
||||
# NXsource
|
||||
$nxobj puttext sname OPAL
|
||||
|
||||
Reference in New Issue
Block a user