# This is the module register Acquisition Status 0x8104 (read only) variable AcqStatus 0 variable AcqStatus.B16 0 variable AcqStatus.B15 0 variable AcqStatus.B8 0 variable AcqStatus.B7 0 variable AcqStatus.B6 0 variable AcqStatus.B5 0 variable AcqStatus.B4 0 variable AcqStatus.B3 0 variable AcqStatus.B2 0 proc GetAcqStatus {} { variable AcqStatus variable AcqStatus.B16 variable AcqStatus.B15 variable AcqStatus.B8 variable AcqStatus.B7 variable AcqStatus.B6 variable AcqStatus.B5 variable AcqStatus.B4 variable AcqStatus.B3 variable AcqStatus.B2 set AcqStatus [ReadRegister AcqStatus] set AcqStatus.B2 [expr ($AcqStatus >> 2) & 1] set AcqStatus.B3 [expr ($AcqStatus >> 3) & 1] set AcqStatus.B4 [expr ($AcqStatus >> 4) & 1] set AcqStatus.B5 [expr ($AcqStatus >> 5) & 1] set AcqStatus.B6 [expr ($AcqStatus >> 6) & 1] set AcqStatus.B7 [expr ($AcqStatus >> 7) & 1] set AcqStatus.B8 [expr ($AcqStatus >> 8) & 1] set AcqStatus.B15 [expr ($AcqStatus >> 15) & 1] set AcqStatus.B16 [expr ($AcqStatus >> 16) & 1] } proc DrawAcqStatus {} { variable Name set html "" append html "
" append html "
| TRG-IN level | " append html "S-IN level | " append html "Ready State | " append html "PLL State | " append html "PLL Bypass Mode | " append html "Clock Source | " append html "Event Full | " append html "Event Ready | " append html "RUN State | " append html "
| " append html "" append html " | " # Bit 15: append html "" append html "" append html " | " # Bit 8: append html "" append html "" append html " | " # Bit 7: append html "" append html "" append html " | " # Bit 6 append html "" append html "" append html " | " # Bit 5 append html "" append html "" append html " | " # Bit 4 append html "" append html "" append html " | " # Bit 3 append html "" append html "" append html " | " # Bit 2: append html "" append html "" append html " | " append html "