Measurement Computing UL for NI LabVIEW User Manual
Page 102
Universal Library Virtual Instruments (VIs)
Miscellaneous VIs
CurCount
Specifies how many points have been input or output. It can be used to gauge how
far along the operation is towards completion. Generally the
CurCount
will return
the total number of samples collected at the time of the call to
cbGetStatus()
.
However, in cases where
CONTINUOUS
and
BACKGROUND
options are both set, the
way that
CurCount
behaves will depend on board type and transfer mode. This
value may recycle as the circular buffer recycles, or may continuously increment
with the number of counts transferred. Also,
CurCount
may not update on each
sample. For example, when running in
BLOCKIO
mode,
CurCount
will update after
each packet of data has been transferred. The packet size is board dependent. Refer
to board-specific information for details.
CurIndex
This is an index into the data buffer that points at the start of the last completed
channel scan. This can be used to provide a real- time display for a background
operation.
Data
[
CurIndex
] points to the start of the last complete channel scan that
was put in or taken out of the buffer. You should expect
CurIndex
to increment by
the number of channels in the scan as well. If no points in the buffer have been
accessed yet then
CurIndex
will equal -1. This value can also behave differently in
cases where
CONTINUOUS
and
BACKGROUND
options are both set (see
CurCount
description). Refer to board-specific information for details.
If you use the
CONVERTDATA
option with either the
CONTINUOUS
option or with pre-
triggering functions then
CurIndex
will return the index of the last A/D sample,
rather than the start of the last completed channel scan.
For many background operations
CurCount
=
CurIndex
. For pre-trigger inputs
though, they are different. If the hardware allows background trigger operations,
CurCount
indicates how many points of the
TotalCount
have been collected.
CurCount
will rise to
PreTrigCount
, stop until the trigger occurs then rise to
TotalCount
.
CurIndex
though will constantly increase and reset as it goes around
and around the circular buffer while waiting for the trigger to occur.
Data
Array of acquired data or output data, depending on the background operation.
CurCount
and
CurIndex
refer to this array.
ErrCode
Error code returned from the Universal Library. Zero if no error occurred. Use the
ErrMsg VI to convert
ErrCod
e into a readable string.
102