Index: trunk/3DEES/UserInterface.tcl
===================================================================
--- trunk/3DEES/UserInterface.tcl	(revision 183)
+++ trunk/3DEES/UserInterface.tcl	(revision 184)
@@ -46,22 +46,26 @@
         {1_0} 0
         {1_1} 6
+        {1_2} 7
+        {1_3} 8
         {2_0} 1
-        {2_1} 7
+        {2_1} 9
+        {2_2} 10
+        {2_3} 11
         {3_0} 2
-        {3_1} 8
-        {3_2} 9
-        {3_3} 10
+        {3_1} 12
+        {3_2} 13
+        {3_3} 14
         {4_0} 3
-        {4_1} 11
-        {4_2} 12
-        {4_3} 13
+        {4_1} 15
+        {4_2} 16
+        {4_3} 17
         {5_0} 4
-        {5_1} 14
-        {5_2} 15
-        {5_3} 16
+        {5_1} 18
+        {5_2} 19
+        {5_3} 20
         {6_0} 5
-        {6_1} 17
-        {6_2} 18
-        {6_3} 19
+        {6_1} 21
+        {6_2} 22
+        {6_3} 23
     }
 # -------------------------------------------------------------------------
@@ -69,24 +73,28 @@
     variable cfgThrs
     array set cfgThrs {
-        0  8
-        6  50
-        1  8
-        7  50
-        2  10
-        8  31
-        9  52
-        10 79
-        3  60
-        11 135
-        12 171
-        13 233
-        4  249
-        14 348
-        15 495
-        16 693
-        5  505
-        17 606
-        18 707
-        19 808
+        0     8
+        6   150
+        7   200
+        8  3000
+        1     8
+        9   150
+        10  200
+        11 3000
+        2    10
+        12   31
+        13   52
+        14   79
+        3    60
+        15  135
+        16  171
+        17  233
+        4   249
+        18  348
+        19  495
+        20  693
+        5   505
+        21  606
+        22  707
+        23  808
     }
 
@@ -334,5 +342,4 @@
 
         set thrs [frame ${master}.thrs]
-        set bins [frame ${master}.bins]
         set clip [frame ${master}.clip]
 
@@ -340,5 +347,5 @@
 
         set column 0
-        foreach {input} [list "ADC" "noise thrs" "e/p thrs"] {
+        foreach {input} [list "ADC" "thrs 1" "thrs 2" "thrs 3" "thrs 4"] {
             label ${config(thrs)}.label_${column} -text "${input}"
             grid ${config(thrs)}.label_${column} -row 0 -column ${column} -sticky ew -padx 5 -pady 7
@@ -346,8 +353,8 @@
         }
 
-        foreach {ch id} [array get adcCodes {[1-2]}] {
+        foreach {ch id} [array get adcCodes] {
             label ${config(thrs)}.chan_${ch} -text "${id} "
             grid ${config(thrs)}.chan_${ch} -row ${ch} -column 0 -sticky ew -padx 5 -pady 7
-            foreach {num} [list 0 1] {
+            foreach {num} [list 0 1 2 3] {
                 set column [expr {$num + 1}]
                 set value $cfgCodes(${ch}_${num})
@@ -360,28 +367,4 @@
 
         grid $config(thrs) -row 0 -column 0 -sticky news -padx 10
-
-        set config(bins) [labelframe ${bins}.frame -borderwidth 1 -relief sunken -text {Thresholds}]
-
-        set column 0
-        foreach {input} [list "ADC" "thrs 1" "thrs 2" "thrs 3" "thrs 4"] {
-            label ${config(bins)}.label_${column} -text "${input}"
-            grid ${config(bins)}.label_${column} -row 0 -column ${column} -sticky ew -padx 5 -pady 7
-            incr column
-        }
-
-        foreach {ch id} [array get adcCodes {[3-6]}] {
-            label ${config(bins)}.chan_${ch} -text "${id} "
-            grid ${config(bins)}.chan_${ch} -row ${ch} -column 0 -sticky ew -padx 5 -pady 7
-            foreach {num} [list 0 1 2 3] {
-                set column [expr {$num + 1}]
-                set value $cfgCodes(${ch}_${num})
-                spinbox ${config(bins)}.thrs_${value} -from 0 -to 4095 \
-                  -increment 10 -width 10 -textvariable [myvar thrs($value)] \
-                  -validate all -vcmd {::mca::validate 4095 4 %P}
-                grid ${config(bins)}.thrs_${value} -row ${ch} -column ${column} -sticky w -padx 5 -pady 7
-            }
-        }
-
-        grid $config(bins) -row 0 -column 0 -sticky news -padx 10
 
         set config(clip) [labelframe ${clip}.frame -borderwidth 1 -relief sunken -text {Signal clipping}]
@@ -409,15 +392,12 @@
         grid $config(clip) -row 0 -column 0 -sticky news -padx 10
 
-        grid ${thrs} -row 0 -column 2 -sticky news
-        grid ${bins} -row 0 -column 1 -sticky news
+        grid ${thrs} -row 0 -column 1 -sticky news
         grid ${clip} -row 0 -column 0 -sticky news
 
         grid columnconfigure ${master} 0 -weight 1
         grid columnconfigure ${master} 1 -weight 1
-        grid columnconfigure ${master} 2 -weight 1
         grid rowconfigure ${master} 0 -weight 1
 
         grid rowconfigure ${thrs} 0 -weight 0
-        grid rowconfigure ${bins} 0 -weight 0
         grid rowconfigure ${clip} 0 -weight 0
     }
@@ -433,5 +413,5 @@
             set b $decay($i).0
             set value [expr int(exp(-${a}/${b})*1024*20)]
-            append command [format {000200%02x0004%04x} [expr {30 + 2 * (${i} - 1)}] $value]
+            append command [format {000200%02x0004%04x} [expr {34 + 2 * (${i} - 1)}] $value]
         }
 
@@ -446,5 +426,5 @@
         set command {}
         for {set i 1} {$i <= 6} {incr i} {
-            append command [format {000200%02x0004%04x} [expr {31 + 2 * (${i} - 1)}] $delay($i)]
+            append command [format {000200%02x0004%04x} [expr {35 + 2 * (${i} - 1)}] $delay($i)]
         }
 
@@ -460,5 +440,5 @@
 
         set command {}
-        for {set i 0} {$i <= 19} {incr i} {
+        for {set i 0} {$i <= 23} {incr i} {
             append command [format {000200%02x0004%04x} [expr {10 + ${i}}] $thrs($i)]
         }
