Changeset 141 for sans/utils/bt5/prepare
- Timestamp:
- Aug 6, 2007 2:27:44 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/utils/bt5/prepare/prepare
r120 r141 20 20 # Mar 2004 Change packing of GUI to permit expansion of buf list 21 21 # Fix buffer copy bug - KOD 22 # Mar 2006 Change range of increment scans for BT1 reflecting 23 # changes to monochromators at instrument - NCM 22 24 # May 2006 Change contents of I-Buffer list to show relevant 23 25 # motors for BT5 - AJJ 24 set version {$Id: prepare.tcl,v 1. 47 2005/08/11 19:55:25nickm Exp $}26 set version {$Id: prepare.tcl,v 1.53 2007/07/23 16:34:14 nickm Exp $} 25 27 # set tcl_precision 12 26 28 #set config(root) $env(HOME) … … 241 243 set config(pola_state) disabled 242 244 set config(mode) 0 243 set config(mono_list) {Ge311 Cu311 Si531}245 set config(mono_list) {Ge311 Cu311 Ge733} 244 246 set config(instr_list) {} 245 247 … … 256 258 set config(cps-Ge311-15') 2100 257 259 set config(cps-Cu311-15') 1100 258 set config(cps- Si531-15') 600260 set config(cps-Ge733-15') 600 259 261 set config(cps-Ge311-7') 1050 260 262 set config(cps-Cu311-7') 550 261 set config(cps- Si531-7') 300263 set config(cps-Ge733-7') 300 262 264 # Instrument scientist values for monitor rates 263 265 if {[catch {source $config(root)/cfg/bt1-mrat.dat} errmsg]} { … … 321 323 set config(qbuf_state) normal 322 324 set config(bbuf_state) normal 325 set config(dbuf_state) normal 323 326 set config(mono_list) {Si111 PG002} 324 327 } … … 346 349 set config(pola_state) disabled 347 350 set config(mono_list) {PG002} 351 } 352 -11 { 353 set config(default_buf) increment 354 set config(qbuf_state) disabled 355 set config(bbuf_state) disabled 356 set config(tbuf_state) disabled 357 set config(rbuf_state) disabled 358 set config(dbuf_state) normal 348 359 } 349 360 } … … 437 448 # Get current instrument configuration 438 449 switch -glob $monobt1 { 439 G *{ set config(mono) Ge311 }440 S* { set config(mono) Si311}450 GE311 { set config(mono) Ge311 } 451 GE733 { set config(mono) Ge733 } 441 452 default { 442 453 set config(mono) Cu311 … … 462 473 1 { 463 474 switch -glob $config(instr) { 464 G e*{ set config(mono) Ge311 }465 Si* { set config(mono) Si531}475 G*311 { set config(mono) Ge311 } 476 G*733 { set config(mono) Ge733 } 466 477 default { 467 478 set config(mono) Cu311 … … 501 512 label $parent.bufnolabel -textvariable ibufdisp(label) 502 513 label $parent.commentlabel -text "Comment:" 503 entry $parent.comment -width 35 -textvariable ibufdisp(comment) 514 entry $parent.comment -width 35 -textvariable ibufdisp(comment) 504 515 if $text_only { 505 516 grid $parent.bufnolabel -row 0 -column 0 -sticky w … … 663 674 bind $parent.pts.val <Return> IBufCalcAngles 664 675 bind $parent.pts.val <FocusOut> IBufCalcAngles 676 bind $parent.comment <Return> IBufCommentBinding 677 bind $parent.comment <FocusOut> IBufCommentBinding 678 665 679 666 680 return $parent … … 1034 1048 entry .field.initentry -textvariable ibufdisp(hf) -width 10 1035 1049 entry .field.increntry -textvariable ibufdisp(ihf) -width 10 1036 entry .field.waitentry -textvariable ibufdisp( ihw) -width 101050 entry .field.waitentry -textvariable ibufdisp(hfw) -width 10 1037 1051 label .field.t1 -text "(Wait used in non-persistent mode on SC only)" 1038 1052 label .field.t2 -text "(Reply 0 to get default optimum wait times)" … … 1239 1253 } 1240 1254 1255 proc IBufCommentBinding { } { 1256 global ibufdisp 1257 1258 if {[string length $ibufdisp(comment)] > 50} { 1259 set ibufdisp(comment) [string range $ibufdisp(comment) 0 49] 1260 } 1261 } 1262 1241 1263 # Special rules for BT1 1242 1264 proc IBufCalcBT1 {} { … … 1248 1270 if {$config(mono) == "Ge311"} { 1249 1271 lappend varlist a4beg a4end 1250 lappend vallist 1. 3 11.31272 lappend vallist 1.8 11.8 1251 1273 } else { 1252 1274 lappend varlist a4beg a4end 1253 lappend vallist 3.0 13.01275 lappend vallist 2.8 12.8 1254 1276 } 1255 1277 if {$config(mode) == 0} { … … 1803 1825 entry .field_q.initentry -textvariable qbufdisp(hf) -width 10 1804 1826 entry .field_q.increntry -textvariable qbufdisp(ihf) -width 10 1805 entry .field_q.waitentry -textvariable qbufdisp( ihw) -width 101827 entry .field_q.waitentry -textvariable qbufdisp(hfw) -width 10 1806 1828 label .field_q.t1 -text "(Wait used in non-persistent mode on SC only)" 1807 1829 label .field_q.t2 -text "(Reply 0 to get default optimum wait times)" … … 2039 2061 label $p.temp.th0label -text "Hld0:" 2040 2062 entry $p.temp.th0 -textvariable bbufdisp(th0) -width 6 2041 button $p.temp.field -text FIELD -command QBufFieldDialog2063 button $p.temp.field -text FIELD -command BBufFieldDialog 2042 2064 pack $p.temp.t0label $p.temp.t0 $p.temp.tinclabel $p.temp.tinc \ 2043 2065 $p.temp.twlabel $p.temp.tw $p.temp.terlabel $p.temp.ter \ … … 2379 2401 entry .field_b.initentry -textvariable bbufdisp(hf) -width 10 2380 2402 entry .field_b.increntry -textvariable bbufdisp(ihf) -width 10 2381 entry .field_b.waitentry -textvariable bbufdisp( ihw) -width 102403 entry .field_b.waitentry -textvariable bbufdisp(hfw) -width 10 2382 2404 label .field_b.t1 -text "(Wait used in non-persistent mode on SC only)" 2383 2405 label .field_b.t2 -text "(Reply 0 to get default optimum wait times)" … … 4092 4114 foreach i $anglist { 4093 4115 if [catch {expr $dbufdisp(lpn_$i) * 1} dbufdisp(lpn_$i)] { 4094 set dbufdisp(lp ts_$i) "------"4116 set dbufdisp(lpn_$i) 1 4095 4117 return 4096 4118 } … … 4104 4126 if {$dbufdisp(lpn_$i) > 6} { set dbufdisp(lpn_$i) 6 } 4105 4127 set iloop $dbufdisp(lpn_$i) 4128 # Probably not good enough 4129 if {$iloop > $maxloop} { set maxloop $iloop } 4130 # 4106 4131 if { $ploop(pts_$iloop) == 0 } { 4107 set ploop(pts_$i loop) $dbufdisp(lpts_$i)4132 set ploop(pts_$i) $dbufdisp(lpts_$i) 4108 4133 } else { 4109 4134 set dbufdisp(lpts_$i) $ploop(pts_$iloop) … … 4112 4137 4113 4138 set pts 0 4114 for each i $anglist{4139 for {set i 1} {$i <= $maxloop} {incr i} { 4115 4140 if { $ploop(pts_$i) > 0 } { 4116 4141 if {$pts == 0} {
Note: See TracChangeset
for help on using the changeset viewer.