Pulse Measurements

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. You can use this polymorphic VI to measure a waveform or an array of waveforms. The data type you wire to the signal in input determines the polymorphic instance to use.

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 be measured. 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 level crossing and the next falling mid 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, mid, 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 occurs 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 non-zero 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. The default is an empty string.
percent level settings specify the method used to determine the high and low state levels of a waveform. percent level settings determine 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. Available methods are auto select (default), histogram, and peak.

auto selectdetermines 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 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.
peaksearches the entire waveform for its maximum and minimum levels.
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.
period returns the time between adjacent mid reference 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 reference level crossings of the specified pulse number. pulse duration is also known as pulse width.
duty cycle is a percentage. duty cycle is also known as duty factor and is calculated as follows:

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 indicator on the front panel 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 non-zero 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 is given by (for a polarity of high pulse):

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

reference 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 be measured. Each 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 level crossing and the next falling mid 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, mid, 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 occurs 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 non-zero 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. The default is an empty string.
percent level settings specify the method used to determine the high and low state levels of a waveform. percent level settings determine 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. Available methods are auto select (default), histogram, and peak.

auto selectdetermines 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 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.
peaksearches the entire waveform for its maximum and minimum levels.
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.
period is an array that returns the time between adjacent mid reference level crossings in the same direction in seconds for each waveform. The measurement interval includes the pulse specified by pulse number. The reciprocal of this value is the signal frequency.
pulse duration is an array that returns the time difference in seconds between the first two mid reference level crossings of the specified pulse number for each waveform. pulse duration is also known as pulse width.
duty cycle is an array that returns a percent value for each waveform. duty cycle is also known as duty factor and is calculated as follows:

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 indicator on the front panel 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 non-zero 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 is given by (for a polarity of high pulse):

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

reference 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.