beautypg.com

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

Page 63

background image

Universal Library Virtual Instruments (VIs)

Counter VIs

CIn.VI

Reads the current count from a counter.

Summary:

Inputs:

BoardNum

[U32] - The board number assigned when installed with InstaCal. Can

be 0 to 100.

CounterNum

[I32] - Counter number to read

Outputs:

Count

[I32] - Count returned here

ErrCode

[I32] - 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 a counter.

CounterNum

The counter to read current count from. Valid values are 1 to 20, up to the number

of counters on the board.

1

Counter input to counter 1.

2 ...20 Counter inputs 2 through 20

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.

63