Dinscbg.vi – Measurement Computing UL for NI LabVIEW User Manual
Page 76

Universal Library Virtual Instruments (VIs)
Digital I/O VIs
DInScBg.VI
Performs multiple reads of digital input port of a high speed digital port on a board with a pacer clock such as
the CIO-PDMA16.
When this VI is used, control will return immediately to the next point in your program and the transfer from
the digital input port to the array in the Context will continue in the background. Use GetStatus.VI to check on
the status of the background operation. Use StopBg.VI to terminate the background process before it has
completed. StopBg.VI should be used after any background operation to clear variables and flags.
Summary:
Inputs:
BoardNum
[U32] - The board number assigned when installed with InstaCal. Can
be 0 to 100.
PortNum
[I32] - Specifies which digital I/O port to read.
Count
[I32] - Number of times to read digital input.
Rate
[I32] - Number of times per second (Hz) to read.
Continuous
[TF] - Continuous or single
ExtClock
[TF] - External or internal clock
WordXfer
[TF] - Word or byte transfer
Outputs:
Context
[cluster] - Output data structure.
Rate
[I32]- Actual rate returned here
ErrCode
[I32] - Error code. See ErrMsg.VI
Arguments:
BoardNum
The board number associated with a board when it was installed with InstaCal.
PortNum
If the port type is not
AUXPORT
, the specified port must be configured for input.
For many boards, AUXPORT is not configurable. However, some later boards do
require that the AUXPORT be configured using DCfgPort.VI or DCfgBit.VI.
Please see board details for more information.
Count
The number of times to read digital input.
Rate
Number of times per second (Hz) to read the port. The actual sampling rate in
some cases will vary a small amount from the requested rate. The actual rate will
be returned to the
Rate
output argument.
Continuous
This option (if True) puts the VI in an endless loop. After it transfers the required
number of bytes it resets to the start of the input array and begins again. The only
way to stop this operation is with StopBg.VI (a single execution is False).
ExtClock
If this option is used (True) then transfers will be controlled by the signal on the
trigger input line rather than by the internal pacer clock. Each transfer will be
triggered on the appropriate edge of the trigger input signal (see board-specific
info). When this option is used, the
Rate
argument is ignored. The transfer rate is
dependent on the trigger signal. The default is
TIMED
(False).
WordXfer
Normally (default is False) this VI reads a single (byte) port (
BYTEXFER
). If
WORDXFER
is specified, it will read two adjacent ports on each read and store the
value of both ports together as the low and high byte of a single array element in
the input array.
Rate
(output)
Actual sampling rate in samples per second.
76