# This is the channel BaseLine register which is register 0x1n64 for {set i 0} {$i < $NumChans} {incr i} { variable Ch$i.BaseLine 0 } proc GetBaseLine {} { variable NumChans for {set i 0} {$i < $NumChans} {incr i} { variable Ch$i.BaseLine set Ch$i.BaseLine [ReadRegister Ch$i.BaseLine] } } proc SetBaseLine {w} { variable NumChans for {set i 0} {$i < $NumChans} {incr i} { if {$w < $NumChans && $w != $i} {continue} variable Ch$i.BaseLine WriteRegister Ch$i.BaseLine [set Ch$i.BaseLine] } } proc SaveBaseLine {} { variable NumChans for {set i 0} {$i < $NumChans} {incr i} { DBSetValue Ch$i.BaseLine [ReadRegister Ch$i.BaseLine] } } proc RestBaseLine {} { variable NumChans variable Name for {set i 0} {$i < $NumChans} {incr i} { set value [DBGetValue Ch$i.BaseLine] if {$value == "Error!"} { InsertLog "Unable to restore value for Ch$i.BaseLine" } else { variable Ch$i.BaseLine set Ch$i.BaseLine $value set rc [catch {WriteRegister Ch$i.BaseLine $value} m] if {$rc != 0} {InsertLog "Unable to restore value for Ch$i.BaseLine"} } } } proc DrawBaseLine {} { variable NumChans variable Name variable SliderDelay set html "" append html "

" append html "" append html "" append html "" append html "" append html "" for {set i 0} {$i < $NumChans} {incr i} { append html "" append html "" append html "" append html "" } append html "
ChannelChannel n BaseLine
$i
 
" append html "" append html "

" return $html }