Detecting the peak-to-peak value

Hi all,
I just start learning LabView for less than 3 months. With a help from a friend, I did some experiments to measure displacement of a polymer when voltage is applied. The output is given in the form of sine signal (peak-to-peak). When I got this output file (in .lvm format), I will use Microsoft Excel to generate the graph and manually I will calculate the peak to peak value, average them and get the displacement.
My question is, can I do the calculation in Labview? Can Labview detect the value of every peak (positive and negative peak)? I have dozens of data and it time consuming to finish calculating all of them manually. I attached here an example of my excel file so that you can see clearly what I'm saying. I can't attached the .lvm file because it is not a valid extension for attachment in this discussion board.
Many thanks for your help.
Thank you.
Amila
Attachments:
labview calculation.xls ‏377 KB

You can do almost any calculation in LabVIEW.  It has a huge set of analysis functions and you can always write anything it does not have.  If you can not find what you need in LabVIEW, check these forums and the LAVA forums; chances are good someone has done it already.
What version of LabVIEW are you using?  There is a VI, Amplitude and Levels, which does exactly what you want.  However, it only exists in the Full and Pro versions.  It was introduced about 7.0 or 7.1, so if your version is 7.1 or newer, you should be good.  Make sure you understand how it works so you can set the inputs correctly for your application.
If you do not have the Full/Pro version, you can write this yourself more easily in LabVIEW than can be done in Excel (assuming you were equally skilled in both).  There are a variety of algorithms, from a simple max/min (use Array Max & Min) to Fourier analysis, peak/valley find, and non-linear fitting.  LabVIEW can do it all.  So can Excel, but Excel gets unwieldy when your data sets get larger than about 2000 points.
This account is no longer active. Contact ShadesOfGray for current posts and information.

Similar Messages

  • To measure and hold the peak value of voltage while measuriong using an accelerometer

    i would like to measure and hold the peak value of voltage while measuring using an accelerometer,when the voltage goes above certain range . also save highest 5 values.

    You could have a shift register on your acquisition loop that is initialized to hold an array of 5 values. Start with all 5 element holding something less than the expected normal input value.
    Now each time through the loop, test the new reading to see if it's greater than the minimum value in the 5-element array. If not just go on and repeat the loop.
    If the new reading is greater than the minimum value in the 5-element array, append the new reading to the array, sort it in decending order and drop the last element (the old minimum value).
    The array will hold the 5 greatest values and the max of the array will be the peak value.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How to see the peak values in a chart?

    I have the following situation: I am applying the FFt to an acceleration signal. In the FFT-peak graph I see different peak frequencies. However I would like to know how much are those peak values and either display them in the chart on top of the peaks or extract them in numerical indicators. Is any of these solutions possible in LabView?
    I guess the question stands for any kind of graph or chart where you want to extract and see only certain or peak values. Any suggestions?
    Thank you.
    Radu

    OK. Attached is a VI which allows you to move cursors 0 and 1 to select any section of a graph, and then click a button to get the maximum of that particular section. It also places the third cursor (red) at the location of the maximum it finds. It is all done using property nodes of the graphs.
    This VI is based on an exercise of the LabVIEW Basics II course, which I took a long time ago, but the manual of which is still very useful.
    Hope this helps.
    Alejandro
    Attachments:
    GetMaxiumumExample.vi ‏81 KB

  • Movable cursor that is able to detect the peak automatically

    Hi i am facing a troble with my labview program and i really need help! I was trying to link my peak detector threshold to my graph cursor in order to find my peak point. But when i move my cursor towards my graph starts getting "cut off". But when i open the peak detector example vi, their peak detector was able to locate all the graph peak without "cutting off" their graph. Why is that so? plz help me! thanx. Here is my vi.
    Attachments:
    leads.vi ‏271 KB
    New Folder (2).zip ‏51 KB

    The peak detector graphs the amplitudes vs locations in an xy graph. You only graph the amplitudes in a waveform graph. Whatever you are doing is completely different.
    Graph the data AND the detected peaks in an xy graph, for example.
    You might also want to throttle your code a little bit. At the moment, it uses 100% CPU doing the some old calculations and displays over and over. The loop only needs to spin if something changes.
    LabVIEW Champion . Do more with less code and in less time .

  • Acquiring a sine wave of 1KHz riding on a DC and Detecting its peak value through compact rio

    Dear LabView Programmers,
    We are trying to acquire a sine wave input through cRIO-9004 using I/O module cRIO-9215 which is a 16-bit ADC.
    We are able to acquire sine wave below 100Hz faithfully but not higher frequencies, the higher frequencies(1Khz) get distorted. How to acquire this sine wave of 1Khz faithfully through the above mentioned hardware.
    Regards
    LabView Lovers  

    Using LabVIEW 8.0, you will need to place the data from the 9215 into a dmaFIFO buffer, such that you do not need to poll the 9215.  It is the polled or the interrupt process that reduces the sample rate. 
    Hope this helps. 
    Preston Johnson
    Principal Sales Engineer
    Condition Monitoring Systems
    Vibration Analyst III - www.vibinst.org, www.mobiusinstitute.com
    National Instruments
    [email protected]
    www.ni.com/mcm
    www.ni.com/soundandvibration
    www.ni.com/biganalogdata
    512-683-5444

  • How do hold the peak ponits or valley?

    Dear All,
    I have a sampled wave, then I want detect the peak points (or valley points) and hold the point until next peak points (or valley points) appears.
    Now I can use the example "Peak Detector.vi" to get the points I want.
    But I don't know how to put the data to the graph. The attached picture shows the idea I want.
    If you need more detail to solve my problem, plz tell me, thank you so much!!
    Solved!
    Go to Solution.

    hello,
    here is one way 
    detecting all pics index to build parts of array with each min/max value then assembling them
    tell if it works
    Regards
    Tinnitus 
    CLAD / Labview 2011, Win Xp
    Mission d'une semaine- à plusieurs mois laissez moi un MP...
    RP et Midi-pyrénées .Km+++ si possibilité de télétravail
    Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
    Don't forget to valid a good answer / pensez à valider une réponse correcte
    Attachments:
    hold_val.vi ‏20 KB

  • What does the location of the peak detector mean

    i would like to know what the locations of the peak detector refer to? what does the value of the location of the peak detector tell? does it tell the location of the peak and if so, what unit is it in? also, if i set a threshold value, does it mean that only one peak would be detected or any value higher than that threshold would also be detected? if i were to set the sampling rate for my peak detection to be 400 per millisecond, do i expect to see an array of values or one absolute peak value after one cycle?

    Greetings!
    The peak value VI gives you four outputs, actually: positive and negative peak values and the positive and negative peak "horizontal" locations. The locations are in data points, not actual time. To get the time, you have to calculate it from your sample rate. Also, the vi does indeed give you the absolute peak of a waveform, which, as you can guess, requires that the entire waveform is sampled BEFORE the calculation is made. This can slow down real-time sampling, since there is considerable processing involved in calculating the peak value...you need to keep this in mind when designing your application. To answer your last question, you will obtain ONE reading per trigger.
    Hope this helps!
    Eric
    Eric P. Nichols
    P.O. Box 56235
    North Pole, AK 99705

  • How can I get peak value? Thanx

    I have a labview program which can get signals from my system and draw
    some waveform. The waveform has two peaks with some distance. Then how
    can I let labview give me the peaks' values? thanx a lot!

    Hi,
    You can use Analyze>Signal Processing>Time Domain>Peak Detector.vi or
    Threshold Peak Detector.vi
    I'm not sure if it's in the normal LabVIEW version, I'm using Full
    Development...
    For every peak detector you'll have to think very hard what you consider a
    peak. E.g. a peak caused by noise might be of interrest (or the only
    interrest) for one application, and not of any interrest for another. I've
    done several peak detection applications, on network analysers, freq.
    analysers, oscilloscoops, even vision applications... It's one of the
    hardest things to program.
    Olso, there might be several solutions, including Artificial Neural
    Networks, Genetic Algorithms, Fuzzy Logic... If possible, go the easy way
    and use the VI's mentioned above.
    Regards,
    Wiebe Walstra.
    "t
    ao" wrote in message
    news:[email protected]..
    > I have a labview program which can get signals from my system and draw
    > some waveform. The waveform has two peaks with some distance. Then how
    > can I let labview give me the peaks' values? thanx a lot!

  • How to get peak values from SM52?

    Hello
    I am trying to optimize my VMC since it has a high load compared to the hardware it runs on. To do that I need the peak values of those figures shown in SM52. Do any of you know how to get those?
    I have NW 7, CRM 5.0 and SP13. All I get in SM52 is "Used/Allocated" with one exeption; the number of vmc containers and that show me this: "Minimum / peak / maximum number of VMs".
    Thank you!
    Best Regards, Linus Hellsing

    Hello Jothivenkatesh M
    Thank you for your answer. My problem, however, is that I need the maximum values of the other values.
    Global Classes   210 MB / 10 %   (Used/Allocated 55.979.280 / 220.200.960 Bytes, 25 %) 
    Global Programs   64 MB / 3 %   (Used/Allocated 24.356.400 / 67.108.864 Bytes, 36 %) 
    Global Data   1.300 MB / 62 %   (Used/Allocated 755.387.792 / 1.362.748.332 Bytes, 55 %) 
    Global Copy-Only Data   507 MB / 24 %   (Used/Allocated 109.891.968 / 532.101.872 Bytes, 21 %) 
    Global Admin Data   3 MB / 0 %   (Used/Allocated 85.008 / 3.608.576 Bytes, 2 %) 
    Other Global Data   14 MB / 0 %   (Used/Allocated 4.615.760 / 14.842.083 Bytes, 31 %) 
    Total   2.099 MB   (Used/Allocated 950.316.208 / 2.200.610.687 Bytes, 43 %) 
    Errors occurred   0  
    Here : http://help.sap.com/saphelp_nw70ehp1/helpdata/en/11/45cf94a60c41c1a172dc1e30dad2f8/frameset.htm
    SAP writes:
    The standard settings represent a minimum configuration. You normally have to change these settings for productive operation of the VM Container. Configure the system following the settings in SAP Note1020539.
    A quote from sapnote 1020539 regarding Global Copy-Only Data :
    "Later, you can adjust the value to the peak value from transaction SM52."
    Br Linus Hellsing

  • Peak value over a given time period?

    Hello.
    We are a group of students who are looking for a way to use our blood pressure measurements in labview.
    What we want to do is to have labview display the peak value when our curve tops the first time, then hold this value for some seconds.Then show the new peak value
    and hold this a few seconds and so on.
    Right now we can get it to show the peak value but it updates all the time. 
    We have tried different approaches but none of them seem to work. 
    we have attached our project as it is right now. maybe someone can help.
    Thank you.
    Solved!
    Go to Solution.
    Attachments:
    Max min.vi ‏185 KB

    After reading your post a little more closely and looking at the other suggestion on how to solve your problem I think this is what you want to solve your problem.
    Tim
    Johnson Controls
    Holland Michigan
    Attachments:
    Max min.vi ‏192 KB

  • Finding peak value on graph

    I am trying to create a program for students (young kids 6-12) where they would be able to strike a copper pipe of various length then the sound would be taken and plotted by labview. From the plot I am having a hard time to find a way to record the peak value; is there anyway that labview displays the peak value?

    I have attached an updated VI. I am trying to set the program up to where a sound is taken, when a pipe is struck, and plotted in the frequency domain. From which it can be determined the max (peak frequency) when i get that all sorted out I will add or let hem use excel to plot peak frequency of 5 or more pipes vs length and set a best fit line to find a function that will allow them to find the length of the pipe knowing the frequency needed.
    Attachments:
    windchime.vi ‏104 KB

  • Extract arrays according the number of consecutive values

    Hello I would need some help on one problem to search the
    number of consecutive values in an array. I am using Labview 8.1
    First I have a 2D array with 3 columns: Col (A)  Col (B) 
    Col (C). I would like to plot points from Col( B)=f(ColC) at Constant
    value in Column A. The problem is that in Column A the values changes. My
    problem is to extract arrays when the values in column A are the same and when
    the number of values is higher than a number that I can choose. In my case I
    chosse this number by the threshold function on the peak detector.
    Let ‘s take an exemple:
    Col (A)            Col(B)              Col(
    C)
    12                    343                  45
    654                  65                    33                               
    121                  65                    65                   
    18                    31                    45                   
    12                    456                  98       
    787                  361                  787
    121                  156                  123     
    12                    32                    545
    Let ‘s say I want to plot Col(B)=f( Col(C)) at constant value in
    Column A when I have more than 2 constant values in Column A
    The aim would be to have different arrays to plot 2
    different graphs for different constant value in Col( A).
    Col (A)            Col
    (B) Col( C)                        Col (A)            Col(B)              Col(C)
    12                    343                  45                       121                  65                    65       
    12                    456                  98           &          121                  156                  123
    12                    32                    545
     What I do with the VI is:
    1)      sort
     the 2D arrays accordind the values in
    the Col (A) and extract Col(A)
    2)      Search
    the index of elements in Column A when they I do not have consecutive values
    3)      Subtract
    each new indexes indexes 2 by 2: this gives me the number of consecutive values
    in a new array.
    4)      Detect
    the indexes of the peak (number of consecutive values) that I want (in the
    exemple= 2)
    My problem is now to come back in
    the initial array and extract the arrays that has more than n  consecutive values
    (n=2 in the exemple) according to the index found by the peak values.
     I am sure that there is a simpler
    and better way to do this (maybe by a for loop or by using an histogram);
    Thank in advance for the help
    Olivier
    Attachments:
    extract values.vi ‏33 KB

    First, I wanted to thank you, Kumar for the quick answer: 5
    stars for the answer, this is exactly what I was looking for. I would not have
    found it by myself.
    I have an other problem to plot now Col( B)=f (Col( C))
    What I would like to do is plot Col (B)=Col (C) with
    different plots (colour) on a same graph when the value in column A changes.
    I managed to have 2 arrays (thanks to the forum with some
    modifications):
    -One to tell me each first indexes when the value changes
    -One to tell me each last indexes when the values changes
    My idea would be to use theses indexes to split the initial
    array by  a loop when the value in Column
    A changes and then in an other loop  (or
    in the same) connect the XY graph to the build arrays.
    The only problem is that before running Labview I do not
    know how many different values in column A I have so I do not know how many
    arrays will be created when I will try to split the initial array.
    Is someone know if this solution is possible?
    Thank you in advance for the help.
    Olivier

  • Does anyone know why the waveform peak detect function provides accurately the position of the peaks but not the value?

    Does anyone know why the waveform peak detect function provides accurately the position of the peaks but not the value?
    I have been looking at my data at the position indicated by the function as a peak, and it is correct at that place the wave has its peak, but the value provided by the function is higher than the actual value at that point.
    Attachments:
    Test.jpg ‏53 KB

    The help makes it clear that the VI will make a quadratic fit to the data, so the locations are not integers (i.e. not aligned with you exact data). From that analysis, the peak is between two of your points, and slightly above the neighboring data.
    See the coercion dot. Make the "locations" array DBL (Why did you change it to I64, that makes no sense at all!)
    Quote from the help:
    "Locations contains the index locations of all peaks or valleys detected in the current block of data. Because the peak detection algorithm uses a quadratic fit to find the peaks, it actually interpolates between the data points. Therefore, the indexes are not integers. In other words, the peaks found are not necessarily actual points in the input data but may be at fractions of an index and at amplitudes not found in the input array."
    All clear?
    LabVIEW Champion . Do more with less code and in less time .

  • Find out the peaks and check them against a value

    Hi
    I am currently aquiring a bunch of signals (4 to be exact) through a 6120 card. This works as expected.
    Now I'd like to check all 4 signals if any value (up to 80 000 samples / waveform) has it's lowest level above -0,8 V and it's highest level below 0,8 V.
    I tried this with the Express VI (Level and Amplitude Measurements). I check both for the peaks and if one of them (OR) is above/below that value, a Boolean value should change.
    So I have my 1D - Waveform Array as Input  to the Express VI. I then get the Positive/Negative Peak. I wire those to smaller/grater sign. and when I try to wire the two outputs of the smaller/greater signs to an "OR", LabView won't let me
    It says: Source is Dynamic Data, Sink is Boolean.
    What am I doing wrong ?

    It would have worked, if you had converted the dynamic-data to a double before you pass it to the > / < operators.
    If you pass two different data types to a function, the "lower" is converted to the higher (e.g.: sgl -> dbl) which is why the dynamic data is passed on to the or-operator.
    Just see this example.
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...
    Attachments:
    CompareMaxMin.vi ‏169 KB

  • Deleting peak values detected by peak detector vi

    Hi,
    I m using the peak detector vi to detect peaks every 100 samples, if the difference between two consecutive peaks is greater than 15 i want to delete the peak with the higher amplitude only. This data set, should be plotted again on another waveform. I m able to detect peaks that have amplitudes greater than 15, but I dont kn ow how to delete only these peaks.
    Attached is the waveform, with a single peak with high amplitude which I want to delete.
    Any help would be appreciated.
    Thank you.
    Regards.
    Attachments:
    peak_detection.doc ‏88 KB

    Hi Prakruthi,
    please have a look at this forum thread:
    http://forums.ni.com/ni/board/message?board.id=170​&message.id=69416&requireLogin=False
    It contains a complete VI for deleting peaks. You only have to insert one more condition to deal with the "only peaks with difference > 15" requirement.
    Regards,
    Johannes Bauer

Maybe you are looking for

  • Ssl vpn and soft phone

    Does the ASA or IOS support an SSL VPN that includes the Cisco softphone like it does say RDP, SSH, etc?  I'm trying to determine if I can have a user connect a soft phone to our parent company's SSL VPN so they can use their Cisco phone system, whil

  • How to fix "NotAllowedError" with the mailForm method (javascript) in adobe reader 9.3?

    Hi! I want to know if it exist a way to use the mailForm method (this is javascript) in adobe reader 9.3? Or, are there any equivalent method? I want to send by email a FDF with my PDF. When I run my javascript, I got the following error: "NotAllowed

  • Passwords are not being saved

    Firefox doesn't remember passwords. I do see a window which asks me if I want to save the password, but when I click ''Remember'' nothing happens. I can click on it countles times, but Firefox just doesn't respond.

  • Will iTunes Load When Switching From Windows to Mac?

    I am fed up with living in the "Windows" world; I just bought a new PC and already it is giving me problems. Everyone I talk to says Mac is the way to go; my main concern is importing my already existing iTunes library...I have created a back up of m

  • Shutting down Server from command line in WebLogic 5.1

    Cannot shut down the WebLogic Server using the command line: java weblogic.Admin URL SHUTDOWN system password Errors out saying: java.io.InvalidClassException: weblogic.security.acl.internal.AuthenticatedUser; Local class not compatible: stream class