Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Pulse Measurements (Not in Base Package)

LabVIEW 8.2 Help
August 2006

NI Part Number:
371361B-01

»View Product Info

Accepts a periodic waveform or an array of periodic waveforms and returns the period, pulse duration (pulse width), duty cycle (duty factor), and pulse center of a selected pulse and period. The data type you wire to the signal in input determines the polymorphic instance to use. Example

Use the pull-down menu to select an instance of this VI.

Pulse Measurements 1 chan

pulse number specifies which pulse of polarity, high or low, is measured. For pulse number n with polarity low, the VI measures the pulse duration and center of the nth low pulse. The VI measures the period and duty cycle of the period that begins with the (2n – 1)th mid ref level crossing.
signal in is the waveform to measure. The waveform is required to contain at least pulse number complete cycles, where a cycle is defined as the interval between two consecutive mid ref level crossings in the same direction.
polarity defines a pulse as high (default) or low. A high pulse consists of the interval between a rising mid ref level crossing and the next falling mid ref level crossing.
reference levels specifies the high, middle, and low reference levels of a waveform. The reference levels are used to define the measurement interval of one complete cycle.
high ref level specifies the high reference level of the waveform in percent (default) or absolute units. After the signal crosses the mid ref level in the rising direction, it must cross the high ref level before the next falling mid ref level crossing can be counted.
mid ref level specifies the middle reference level in percent (default) or absolute units. The interval between consecutive rising mid ref level crossings defines one cycle, or period, of the waveform. At least one high/low reference level crossing must separate each mid ref level crossing.
low ref level specifies the low reference level of the waveform in percent (default) or absolute units. After the signal crosses the mid ref level in the falling direction, it must cross the low ref level before the next rising mid ref level crossing can be counted.
ref units specifies whether the high ref level, mid ref level, and low ref level inputs are interpreted as a percentage (default) of the full range of the waveform or as absolute levels.
error in describes error conditions that occur before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.
status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.
code is the error or warning code. The default is 0. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.
source specifies the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.
percent level settings specifies the method used to determine the high and low state levels of a waveform. percent level settings determines the reference levels when percent ref units is selected, otherwise this input is ignored.
method specifies how the high and low state levels of the waveform are computed.

0Histogram—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 waveform's peak-to-peak range.
1Peak—Searches the entire waveform for its maximum and minimum levels.
2Auto select—(Default) Determines if the histogram bins corresponding to the high and low state levels each have over 5% of the total hits. If so, it returns those results, otherwise, it 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).
histogram size specifies the number of bins in the histogram used to determine the high and low state levels of the waveform. histogram size is ignored if the peak method is selected.
histogram method specifies how the high and low state levels of the waveform are computed. Currently, mode is the only histogram method available.

0Mode
reserved is reserved for future use.
period returns the time between adjacent mid ref level crossings in the same direction in seconds. The reciprocal of this value is the signal frequency. The measurement interval includes the pulse specified by pulse number.
pulse duration is the time difference in seconds between the first two mid ref level crossings of the specified pulse number. pulse duration is also known as pulse width.
duty cycle is a fraction of a period. duty cycle is also known as duty factor and is calculated by the following equation.

In this equation, pulse duration can refer to the high or low portion of the period, depending on whether polarity is selected as high pulse or low pulse.

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.
status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.
code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.
source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning.
measurement info returns the pulse-center time of the selected pulse and the absolute reference levels used to define the measurement cycle.
pulse center specifies the time instant of the midpoint of the selected pulse number. pulse center for a polarity of high pulse is given by the following equation.

where tc is the pulse center time, tf is the time instant of the falling mid ref level crossing, and tr is the time instant of the preceding rising mid ref level crossing.

ref levels returns the three user-defined reference levels of the waveform in absolute units. The reference levels are used to define the one cycle measurement interval.
high ref level returns the high reference level.
mid ref level returns the middle reference level.
low ref level returns the low reference level.
ref units is always absolute in measurement info.

Pulse Measurements N chan

pulse number specifies which pulse of polarity, high or low, is measured. For pulse number n with polarity low, the VI measures the pulse duration and center of the nth low pulse. The VI measures the period and duty cycle of the period that begins with the (2n – 1)th mid ref level crossing.
signal(s) in is the array of waveforms to measure. The waveform is required to contain at least pulse number complete cycles, where a cycle is defined as the interval between two consecutive mid ref level crossings in the same direction.
polarity defines a pulse as high (default) or low. A high pulse consists of the interval between a rising mid ref level crossing and the next falling mid ref level crossing.
reference levels specifies the high, middle, and low reference levels of a waveform. The reference levels are used to define the measurement interval of one complete cycle.
high ref level specifies the high reference level of the waveform in percent (default) or absolute units. After the signal crosses the mid ref level in the rising direction, it must cross the high ref level before the next falling mid ref level crossing can be counted.
mid ref level specifies the middle reference level in percent (default) or absolute units. The interval between consecutive rising mid ref level crossings defines one cycle, or period, of the waveform. At least one high/low reference level crossing must separate each mid ref level crossing.
low ref level specifies the low reference level of the waveform in percent (default) or absolute units. After the signal crosses the mid ref level in the falling direction, it must cross the low ref level before the next rising mid ref level crossing can be counted.
ref units specifies whether the high ref level, mid ref level, and low ref level inputs are interpreted as a percentage (default) of the full range of the waveform or as absolute levels.
error in describes error conditions that occur before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.
status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.
code is the error or warning code. The default is 0. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.
source specifies the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.
percent level settings specifies the method used to determine the high and low state levels of a waveform. percent level settings determines the reference levels when percent ref units is selected, otherwise this input is ignored.
method specifies how the high and low state levels of the waveform are computed.

0Histogram—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 waveform's peak-to-peak range.
1Peak—Searches the entire waveform for its maximum and minimum levels.
2Auto select—(Default) Determines if the histogram bins corresponding to the high and low state levels each have over 5% of the total hits. If so, it returns those results, otherwise, it 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).
histogram size specifies the number of bins in the histogram used to determine the high and low state levels of the waveform. histogram size is ignored if the peak method is selected.
histogram method specifies how the high and low state levels of the waveform are computed. Currently, mode is the only histogram method available.

0Mode
reserved is reserved for future use.
period is an array containing the period for each waveform in signal(s) in. period returns the time between adjacent mid ref level crossings in the same direction in seconds. The reciprocal of this value is the signal frequency. The measurement interval includes the pulse specified by pulse number.
pulse duration is an array containing the pulse duration for each waveform in signal(s) in. pulse duration is the time difference in seconds between the first two mid ref level crossings of the specified pulse number. pulse duration is also known as pulse width.
duty cycle is an array containing the duty cycle for each waveform in signal(s) in. duty cycle is also known as duty factor and is calculated by the following equation.

In this equation, pulse duration can refer to the high or low portion of the period, depending on whether polarity is selected as high pulse or low pulse.

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.
status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.
code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.
source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning.
measurement info is an array of clusters that returns the pulse center time of the selected pulse and the absolute reference levels used to define the measurement cycle for each input waveform.
pulse center specifies the time instant of the midpoint of the selected pulse number. pulse center for a polarity of high pulse is given by the following equation.

where tc is the pulse center time, tf is the time instant of the falling mid ref level crossing, and tr is the time instant of the preceding rising mid ref level crossing.

ref levels returns the three user-defined reference levels of the waveform in absolute units. The reference levels are used to define the one cycle measurement interval.
high ref level returns the high reference level.
mid ref level returns the middle reference level.
low ref level returns the low reference level.
ref units is always absolute in measurement info.

Example

Refer to the Pulse and Transition Measurements VI in the labview\examples\measure\maxmpl.llb for an example of using the Pulse Measurements VI.

 


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit