LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Peak Detection VI - Questions

These questions are regarding "Peak Detection and Display" VI in the LabView examples. Some of the questions are not related to the peak-detection algorithm per se.

  1. I don't understand what the Ramp Pattern is or does exactly. Does it perhaps provide the 'x' values that are bundled with the 'y' values that come from the case structure?
  2. I'm having some difficulties with the property node for the threshold cursors. What do the numerical constants (0 and 1) mean exactly and why are they wired to "ActCrsr"? I got further confused when I tried getting rid of the blue cursor; I couldn't get rid of it even though I deleted the two elements in this property node.
  3. The Build Array function that is wired to the plot: The second and third inputs are markers for the maximums and minimums. How about the first input? Is it a bundle of X and Y values and how are the X values created (this may be related to question 1)?
Thank you,
Alex



Message Edited by ap8888 on 07-02-2008 01:37 PM
0 Kudos
Message 1 of 7
(3,367 Views)
Also, I don't understand what kind of data is inputted into the Peak Detector function. It says "X is the array of input values that represents the signal to be analyzed", but how come I can't wire a cluster of doubles to X? If I have a series of x's and y's that I want to wire to Peak Detector, how do I do that?
0 Kudos
Message 2 of 7
(3,354 Views)
IIRC the peak detector VI assumes equidistant X-values so you're basically only inputting the Amplitude values.

If your data is not equidistant, then the peak detection algorithm will return skewed values.

A version allowing for non-equidistant X-values would be great.  I programmed my own version a few years ago......  I don't have it any more though (previous employer)

Shane.
0 Kudos
Message 3 of 7
(3,336 Views)
Thank you for your reply.

Can anyone offer any help with my other questions?
0 Kudos
Message 4 of 7
(3,310 Views)
Hi Alex,

The numerical constants refer to the index value of the cursor on the cursor legend.  You can delete or create a cursor by right-clicking the cursor legend on the front panel.  Deleting or removing the property node will not remove the cursor.  The property node simply references the cursors properties.

The first input of the array is a combination of the ramp pattern and the user selected waveform.  The ramp pattern produces a 1-dimensional array of values.  These values are bundled together with the user selected pattern.
Eric C.
Applications Engineer
National Instruments
Message 5 of 7
(3,268 Views)
Thank you for the help.

I still have 1 question:

1) I don't seem to understand how the Ramp pattern helps us here. Of course we need to bundle the Y values produced from the case structure with some X values to create a plot; but what kind of X values does the ramp pattern really make? I read that it basically creates an array of ever-increasing values, but that doesn't really help. Also, why do we put Length-1 into the END port in the ramp pattern function?

0 Kudos
Message 6 of 7
(3,241 Views)
Hi Alex,

A great way to determine what a function does if the help is not sufficient for you is to experiment with a simple program.  Check out the attached pictures for a simple program that can help you learn more about the ramp function.  The Ramp function creates a one-dimensional array of numbers that begin at the "start" value, end at the "end" value, and include as many equally spaced numbers in between as specified by the "samples" value.
Eric C.
Applications Engineer
National Instruments
Download All
Message 7 of 7
(3,211 Views)