Atrigger.vi – Measurement Computing UL for NI LabVIEW User Manual
Page 27

Universal Library Virtual Instruments (VIs)
Analog Input VIs
ATrigger.VI
Waits for a specified analog input channel to go above or below a specified value. This VI continuously reads
the specified channel and compares its value to
TrigValue
. Depending on whether
TrigType
is ABOVE or
BELOW it waits for the first A/D sample that is above or below TrigValue. It returns the first sample that
meets the trigger criteria to DataValue.
Summary:
Inputs:
BoardNum
[U32] - The board number assigned when installed with InstaCal. Can
be 0 to 100.
Channel
[I32] - A/D channel number
TrigType
[TF] -
TRIGABOVE
(True) or
TRIGBELOW
(False) - Specifies whether to wait
for the analog input to be above or below the specified trigger value.
TrigValue
[I32] - The threshold value that all A/D values are compared to
Outputs:
DataValue
[U16] - The value of the first A/D sample that met the trigger criteria is
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 an A/D.
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.
TrigType
Specifies whether to wait for the analog input to be ABOVE or BELOW the
specified trigger value.
TRIGABOVE - Wait for analog input to be above the specified trigger value.
TRIGBELOW - Wait for analog input to be below the specified trigger value.
TrigValue
Must be in the range 0 to 4095 for 12-bit A/D boards, or 0 to 65,535 for 16-bit
A/D boards.
Use this VI with caution in Windows programs. All active windows will be locked
on the screen until the trigger condition is satisfied. All keyboard and mouse
actions will also be locked until the trigger condition is satisfied.
DataValue
First sample that meets trigger criteria. Use ToEng.VI to convert from binary
counts to engineering units (volts or milliamps).
ErrCode
Error code returned from the Universal Library. Zero if no error occurred. Use the
ErrMsg VI to convert
ErrCode
into a readable string.
27