# This is the channel Short Gate register 0x1n54 for {set i 0} {$i < $NumChans} {incr i} { variable Ch$i.ShortGate 0 } proc GetShortGate {} { variable NumChans for {set i 0} {$i < $NumChans} {incr i} { variable Ch$i.ShortGate set Ch$i.ShortGate [ReadRegister Ch$i.ShortGate] } } proc SetShortGate {w} { variable NumChans for {set i 0} {$i < $NumChans} {incr i} { if {$w < 8 && $w != $i} {continue} variable Ch$i.ShortGate WriteRegister Ch$i.ShortGate [set Ch$i.ShortGate] } } proc SaveShortGate {} { variable NumChans for {set i 0} {$i < $NumChans} {incr i} { DBSetValue Ch$i.ShortGate [ReadRegister Ch$i.ShortGate] } } proc RestShortGate {} { variable NumChans for {set i 0} {$i < $NumChans} {incr i} { variable Ch$i.ShortGate set Ch$i.ShortGate [DBGetValue Ch$i.ShortGate] WriteRegister Ch$i.ShortGate [DBGetValue Ch$i.ShortGate] } } proc DrawShortGate {} { variable NumChans variable Name set html "" append html "
" append html "
| Channel | " append html "Channel n Short Gate | " append html "
| $i | " append html "" append html " |