# This is the register Channel n Status 0x1n88 (read only) for {set i 0} {$i < 8} {incr i} { variable Ch$i.Status 0 variable Ch$i.Status.BufferFreeErr 0 variable Ch$i.Status.DACBusy 0 variable Ch$i.Status.MemEmpty 0 variable Ch$i.Status.MemFull 0 } proc GetChStatus {} { for {set i 0} {$i < 8} {incr i} { variable Ch$i.Status variable Ch$i.Status.BufferFreeErr variable Ch$i.Status.DACBusy variable Ch$i.Status.MemEmpty variable Ch$i.Status.MemFull set Ch$i.Status [ReadRegister Ch$i.Status] set Ch$i.Status.BufferFreeErr [expr ([set Ch$i.Status] >> 5) & 1] set Ch$i.Status.DACBusy [expr ([set Ch$i.Status] >> 2) & 1] set Ch$i.Status.MemEmpty [expr ([set Ch$i.Status] >> 1) & 1] set Ch$i.Status.MemFull [expr [set Ch$i.Status] & 1] } } proc DrawChStatus {} { set html "" append html "

" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" for {set i 0} {$i < 8} {incr i} { append html "" append html "" append html "" append html "" append html "" append html "" append html "" } append html "
ChannelBuffer free errorChannel n DAC BusyMemory emptyMemory full
$i" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "
" append html "

" return $html }