LabWindows/CVI

Content Type
Programming Language
Current manual
Table of Contents

TriggerDetection2D

Advanced Analysis Library Only

AnalysisLibErrType TriggerDetection2D (void *inputArray, ssize_t numberOfRows, ssize_t numberOfColumns, double threshold[], double hysteresis[], int slope[], int initialize, ssize_t *index, int *triggered);

Purpose

Finds the first level-crossing location in multiple channel waveforms.

Parameters

Input
Name Type Description
inputArray void * Input array. The size of inputArray is numberOfRows * numberOfColumns. Every numberOfColumns elements in inputArray represents one channel signal.
numberOfRows ssize_t Number of rows in inputArray, which specifies the number of channels.
numberOfColumns ssize_t Number of columns in inputArray, which specifies the signal size of each channel.
threshold double [] Threshold value that each signal in inputArray must cross before a trigger is detected.
hysteresis double [] Value above or below threshold through which the input signal must pass before a trigger level crossing is detected.

When slope[i] = 0 (SLOPE_FALLING_EDGE), the signal of channel i must pass above threshold + hysteresis before a trigger level crossing is detected.

When slope[i] = 1 (SLOPE_RISING_EDGE), the signal of channel i must pass below thresholdhysteresis before a trigger level crossing is detected.
slope int [] Specifies whether a trigger is detected on a rising edge or a falling edge for each channel.

Constant Value Description
SLOPE_FALLING_EDGE 0 Detects a trigger on the falling edge, or negative slope.
SLOPE_RISING_EDGE 1 Detects a trigger on the rising edge, or positive slope.
initialize int Specifies whether to initialize the trigger detection.

Specify a nonzero value or select Yes in the function panel to initialize the trigger detection.

Specify 0 or select No in the function panel to resume the trigger detection that treats the signal as a continuous part of the previous input signal.
Output
Name Type Description
index ssize_t Index of inputArray at which the trigger is detected for each channel.

The size of index is equal to number of channels.
triggered int Indicates whether a valid trigger is detected for each channel.

The size of index is equal to numberOfColumns.

When triggered[i] = 0, no valid trigger was detected for channel i. When triggered[i] = 1, at least one valid trigger was detected for channel i.

Return Value

Name Type Description
status AnalysisLibErrType A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants.

Additional Information

Library: Advanced Analysis Library

Include file: analysis.h

LabWindows/CVI compatibility: LabWindows/CVI 2012 and later

Was this information helpful?

Log in to get a better experience

Tariff Impact Update Learn more

Help us improve your future ni.com experience.

Did you find the documentation you were looking for?

Submit