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

Page 23

Advertising
background image

Universal Library Virtual Instruments (VIs)

Analog Input VIs

APretrBg.VI

Waits for a trigger to occur and then returns a specified number of analog samples before and after the trigger
occurred. If only 'polled gate' triggering is supported, the trigger input line (see board user's manual) must be
at TTL low before this VI is called or a

TRIGSTATE

error will occur. The trigger occurs when the trigger

condition is met. See SetTrig.VI and board-specific information. After this VI is called, execution will return
immediately to the next point in your program and the data collection —from the A/D into the

Data

portion of

the

Context

cluster—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 or after it has completed its
function.

Summary:

Inputs:

BoardNum

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

be 0 to 100.

LowChan

[I32] - First A/D channel of scan

HighChan

[I32] - Last A/D channel of scan

PretrigCount

[I32] - Number of pre-trigger A/D samples to collect

TotalCount

[I32] - Total number of A/D samples to collect

Rate

[I32] - Sample rate in scans per second

Range

[I32] - A/D Range code or 0

ConvertData

[TF] - Convert data option (Boolean)

DTConnect

[TF] - DT connect option (Boolean)

ExtMemory

[TF] - External memory option (Boolean)

Outputs:

Context

[cluster] - Output data structure.

PretrigCount

[I32] - Number of pre-trigger A/D samples collected

TotalCount

[I32] - Total number of A/D samples collected

Rate

[U32] - Actual sample rate in scans per second

ErrCode

[I32] - Error code. See ErrMsg.VI on page 97.

Arguments:

BoardNum

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

specified board must have an A/D.

LowChan

First A/D channel of scan.

HighChan

Last A/D channel of scan.

Low/High Channel

#: The maximum allowable channel depends on which type of

A/D board is being used. For boards that have both single-ended and differential
inputs, the maximum allowable channel number also depends on how the board is
configured. For example, a PCI-DAS6025 has 8 channels for differential, 16 for
single-ended mode.

23

Advertising