beautypg.com

Cin32.vi – Measurement Computing UL for NI LabVIEW User Manual

Page 64

background image

Universal Library Virtual Instruments (VIs)

Counter VIs

CIn32.VI

Reads the current count from a counter and returns it as a 32-bit integer.

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:

Count

[I32] - Current count is returned here

ErrCode

[I32] - Error code. See ErrMsg.VI

Arguments:

BoardNum

The board number associated with a board when it was installed. The specified

board must have a 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.

Count

Current count value from selected counter is returned here.

ErrCode

Error code returned from the Universal Library. Zero if no error occurred. Use the

ErrMsg VI to convert

ErrCode

into a readable string.

Notes:

CIn.VI() vs. CIn32.VI: Although the CIn.VI and CIn32.VI perform the same operation, CIn32.VI is the
preferred function to use.

The only difference between the two is that CIn.VI returns a 16-bit count value and CIn32.VI returns a 32-bit
value. Both CIn.VI and CIn32.VI can be used, but CIn32.VI is required whenever you need to read count
values greater than 16 bits (counts > 65535). For instance, LS7266 based counters are 24-bit counters and can
return values larger than a 16-bit value.

64