# This is the group TR DC Offset register 0x1ndc for {set i 0} {$i < 4} {incr i} { variable Grp$i.TRDCOffset 0 } proc GetTRDCOffset {} { for {set i 0} {$i < 4} {incr i} { variable Grp$i.TRDCOffset set Grp$i.TRDCOffset [expr [ReadRegister Grp$i.TRDCOffset] & 0x0000ffff] } } proc SetTRDCOffset {w} { for {set i 0} {$i < 4} {incr i} { if {$w < 4 && $w != $i} {continue} variable Grp$i.TRDCOffset WriteRegister Grp$i.TRDCOffset [set Grp$i.TRDCOffset] } } proc SaveTRDCOffset {} { for {set i 0} {$i < 4} {incr i} { DBSetValue Grp$i.TRDCOffset [ReadRegister Grp$i.TRDCOffset] } } proc RestTRDCOffset {} { for {set i 0} {$i < 4} {incr i} { variable Grp$i.TRDCOffset set Grp$i.TRDCOffset [DBGetValue Grp$i.TRDCOffset] WriteRegister Grp$i.TRDCOffset [DBGetValue Grp$i.TRDCOffset] } } proc DrawTRDCOffset {} { set html "" append html "
" append html "
| Group | " append html "Group n TR DC Offset | " append html "
| $i | " append html "" append html " |