TriggerDetection
- Updated2023-02-21
- 2 minute(s) read
Advanced Analysis Library Only
AnalysisLibErrType TriggerDetection (double inputArray[], ssize_t numberOfElements, double threshold, double hysteresis, int slope, int initialize, ssize_t *index, int *triggered);
Purpose
Finds the first level-crossing location in a waveform.
Parameters
Input | |||||||||||
Name | Type | Description | |||||||||
inputArray | double [] | Input array. | |||||||||
numberOfElements | ssize_t | Number of elements in inputArray. | |||||||||
threshold | double | Threshold value 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 = 0 (SLOPE_FALLING_EDGE), the signal must pass above threshold + hysteresis before a trigger level crossing is detected. When slope = 1 (SLOPE_RISING_EDGE), the signal 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.
|
|||||||||
initialize | int | Specifies whether the history, or internal state, of the function has to be reset. 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. | |||||||||
triggered | int | Indicates whether a valid trigger is detected. When triggered = 0, no valid trigger was detected. When triggered = 1, at least one valid trigger was detected. |
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