beautypg.com

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

Page 25

background image

Universal Library Virtual Instruments (VIs)

Analog Input VIs

APretrFg.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 (refer to the hardware 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 on page 33 and board-specific information for details. This VI will
not return to your program until all of the requested data has been collected and returned to

DataArray

.

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

[U32] - 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:

DataArray

[U32] - Data array that stores A/D values

PretrigCount

[I32]- Actual 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

Arguments:

BoardNum

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

specified board must have an A/D.

LowChan/HighChan

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 (8
channels for differential, 16 for single-ended).

PretrigCount

Specifies the number of samples before the trigger that will be returned.

PretrigCount

must be less than

TotalCount

- 512. If the trigger occurs too early,

fewer than the requested number of pre-trigger samples will be collected. In that
case a

TOOFEW

error will occur. The

PretrigCount

will be set to indicate how many

samples were collected and the post trigger samples will still be collected.

TotalCount

The total number of samples that will be collected and stored in

DataArray

.

TotalCount

must be greater than or equal to

PretrigCount

+ 512. If the trigger

occurs too early then fewer than the requested number of samples will be collected.
In that case, a

TOOFEW

error will occur. The

TotalCount

will be set to indicate how

many samples were actually collected.

25