TriggerDetection2D
- Updated2023-02-21
- 2 minute(s) read
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 threshold – hysteresis 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.
|
|||||||||
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