Admin Production ni-theme
Current Publication

TransMeas

LabWindows/CVI

TransMeas

Advanced Analysis Library Only

AnalysisLibErrType TransMeas (double waveform[], ssize_t waveformSize, int polarity, ssize_t edgeNumber, double highRefLevel, double midRefLevel, double lowRefLevel, int referenceUnits, int method, ssize_t histogramBins, double *slope, double *duration, double *startTime, double *endTime, double *lowRefValue, double *midRefValue, double *highRefValue, double *preUndershoot, double *preOvershoot, double *postUndershoot, double *postOvershoot);

Purpose

Calculates the slope, transition duration, undershoot, and overshoot at pre-transition and over-transition region in one user-defined cycle.
The distance between the midRefLevel and the highRefLevel must equal the distance between the lowRefLevel and the midRefLevel. If the two distances are not equal, LabWindows/CVI adjusts either the highRefLevel or the lowRefLevel to match the smaller of the two distances. For example, if you specify a highRefLevel of 90%, a midRefLevel of 50%, and a lowRefLevel of 20%, LabWindows/CVI uses 80% instead of 90% for the highRefLevel.

Parameters

Input
Name Type Description
waveform double [] The waveform to measure.
waveformSize ssize_t The size of waveform x.
polarity int The type of a selected transition.

Specify a nonzero value or ANALYSIS_HIGH or select High in the function panel to specify a high pulse.

Specify 0 or ANALYSIS_LOW or select Low in the function panel to specify a low pulse.
edgeNumber ssize_t The transition to measure according to the polarity.
highRefLevel double The high reference level of the waveform in percent or absolute units.
midRefLevel double The mid reference level of the waveform in percent or absolute units.
lowRefLevel double The low reference level of the waveform in percent or absolute units.
referenceUnits int Specifies whether LabWindows/CVI interprets the highRefLevel, midRefLevel, and lowRefLevel as a percentage of the full range of the waveform or as absolute levels. Specify one of the following values:

  • ABSOLUTE_LEVEL - The values you pass to highRefLevel, midRefLevel, and lowRefLevel are interpreted as absolute values.
  • PERCENTAGE_LEVEL - The values you pass to highRefLevel, midRefLevel, and lowRefLevel are interpreted as percentages of the full range of the waveform.
method int The method of calculating high and low state level of waveform.
  • Histogram method - Returns the levels of the histogram bins with the maximum number of hits in the upper and lower regions of the waveform. The upper and lower regions of the waveform include the upper and lower 40%, respectively, of the peak-to-peak range of the waveform.
  • Peak method - Searches the entire waveform for its maximum and minimum levels.
  • Auto Select method - Determines whether the histogram bins that correspond to the high and low state levels each have over 5% of the total hits. If so, LabWindows/CVI returns those results. Otherwise, LabWindows/CVI uses the Peak method. This ensures a reasonable answer for either a square wave (ignoring the overshoot and preshoot) or a triangle wave (where a histogram fails).
histogramBins ssize_t The number of bins in the Histogram method that LabWindows/CVI uses to determine the high and low state levels of the waveform.
LabWindows/CVI ignores histogramBins if you select Peak method as method.
Output
Name Type Description
slope double A measure of the rate of change of the signal in a transition region between highRefValue and lowRefValue.
duration double The time span from when the waveform crosses the lowRefValue until it crosses the highRefValue in seconds for a rising transition polarity.
startTime double The time of the rising midRefValue crossing that defines the start of the measurement interval.
endTime double The time of the rising midRefValue crossing that defines the end of the measurement interval.
lowRefValue double The returned low reference level of the waveform in absolute units.
midRefValue double The returned middle reference level of the waveform in absolute units.
highRefValue double The returned high reference level of the waveform in absolute units.
preUndershoot double The undershoot in the pre-transition aberration region of user-defined transition.
preOvershoot double The overshoot in the pre-transition aberration region of user-defined transition.
postUndershoot double The undershoot in the post-transition aberration region of user-defined transition.
postOvershoot double The overshoot in the post-transition aberration region of user-defined transition.

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 8.5 and later