Cstatus.vi – Measurement Computing UL for NI LabVIEW User Manual
Page 67
Universal Library Virtual Instruments (VIs)
Counter VIs
CStatus.VI
Returns status information about the specified counter (7266 counters only)
Summary:
Inputs:
BoardNum
[U32] - The board number assigned when installed with InstaCal. Can
be 0 to 100.
CounterNum
[I32] - Counter number (1 - n) to read.
Outputs:
StatusBits
[U32] - Status information is returned here.
ErrCode
[U32] - Error code. See ErrMsg.VI.
Arguments:
BoardNum
The board number associated with a board when it was installed with InstaCal. The
specified board must have an LS7266 counter.
CounterNum
The counter to read current count from. Valid values are 1 to n, where n is the
number of counters on the board.
StatusBits
Current status from selected counter is returned here. The status consists of
individual bits that indicate various conditions within the counter. The currently
defined status bits are:
C_UNDERFLOW
- Is set to 1 whenever the count decrements past 0. Is cleared to 0
whenever CStatus.VI is called.
C_OVERFLOW
- Is set to 1 whenever the count increments past it’s upper limit. Is
cleared to 0 whenever CStatus.VI is called.
C_COMPARE
- Is set to 1 whenever the count matches the preset register. Is cleared to
0 whenever CStatus.VI is called.
C_SIGN
- Is set to 1 when the MSB of the count is 1. Is cleared to 0 whenever the
MSB of the count is set to 0.
C_ERROR
- Is set to 1 whenever an error occurs due to excessive noise on the input.
Is cleared to 0 by calling C7266Config.VI.
C_UP_DOWN
- Is set to 1 when counting up. Cleared to 0 when counting down
C_INDEX
- Is set to 1 when index is valid. Cleared to 0 when index is not valid.
ErrCode
Error code returned from the Universal Library. Zero if no error occurred. Use the
ErrMsg VI to convert
ErrCode
into a readable string.
67