Regrading peak detection Vi input

I would like to use this peak detection but i would like to remove the signal source and use my own input instead. Could anyone teach me how to do it? thanks^^
Attachments:
Peak Detection and Display1.vi ‏37 KB

The input to the peak detector VI is a simple DBL array.  I would recommend you use Peak Detector.vi instead of the unexposed subVI in your code (from the biomed toolkit?).
Where are you getting your data?  How you get from there to the peak detector will depend on this, since your data type could be dynamic data type, waveform, or simple array.  When in doubt, search the LabVIEW help first.
This account is no longer active. Contact ShadesOfGray for current posts and information.

Similar Messages

  • Calculating BPM using either Peak Detection point by point or FFT

    Hi Guys
    Im new to Labview and have absolutely no idea on programming and stuff. Im doing a project on Heart Rate monitor.
    I'm using labview to read the analog input to an Arduino Mini. In my attached VI im using Peak Detection Point by point to calculate the BPM but it doesnt seem to work. I took references from several VIs to arrive at my VI. 
    My instructor told me I could try using FFT to calculate the BPM as well but Im not sure how to carry it out in Labview.
    Hope you guys can help me with this.
    Thanks alot!
    Attachments:
    heart signal.jpg ‏43 KB
    Heart Monitor.vi ‏24 KB

    Ok, we have some problems here.
    1.  The Data Bits property is the number bits for a single character that is being transmitted.  You should not use that.  Since you are using an Arduino, it should be sending the termination character.  So just tell the VISA Read to read maximum number of bytes you expect from a single message or just some large number (like 25).  The VISA Read will stop reading the port when it encounters the termination character.
    2. The String Subset is not doing anything.  Just remove it.
    3.  You should move your  Wait to be outside of the case structure.  As is currently written, if you are not taking readings you will use up all of your CPU.
    4.  You should have labels for all of your controls and indicators.
    5.  Your time calculation is completely wrong.  You want to subtract the time of the previous peak from the current peak.  I recommend you use a Feedback Node to do this.
    Here's a slightly cleaned up version of your code.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    Heart Monitor_BD.png ‏42 KB

  • Peak Detection and Display of TDMS file of 4 channels

    The Peak Detection and Display sample VI in the NI Example finder is exactly what I am looking for but I would like to use a recoded TDMS file as its input. The TDMS file is a 4 channel data file.
    Does someone have an example code on how to do this?
    ERB 

    Hi
    I found an example in exampler finder called Read Channel Groups (TDMS).vi, which seems to plot data for four channels written in a TDMS file.
    Its also attached.
    Kind Regards, 
    Kind Regards
    James Hillman
    Applications Engineer 2008 to 2009 National Instruments UK & Ireland
    Loughborough University UK - 2006 to 2011
    Remember Kudos those who help!
    Attachments:
    Read Channel Groups (TDMS) forum.vi ‏20 KB

  • Fetch and peak detection all channels of PXI-5105 with 4M record... HELP!

    Dear collegaues!
    Please help me to improve performance my application, see attachment, and sorry for my English.
    So, my task is to fetch and peak detection all (eight) channels of PXI-5105 with 4M record and sample rate 4M with loop 1 sec...
    Inputs of all my channels are wiring to NaI detectors with 0,5...1 microsec of pulse width (really) and freq from 0 kHz to no more than 40 kHz.
    Why I've selected 4M record and 4M sample rate namely? Answer is that I've tested PXI-5105 previously by generator 40 kHz and 0,5 microsec width pulse. It is working fine and peak detection indicate for me 40000 pulses/sec. If I set lower than 4M record and 4M sample rate it is no working. In my honest opinion 4M record and 4M sample rate are very min settings.
    In the present time peak detection working only 6 channels... When I've connected to diagram more than 6 "peak detector.vi" - I see the error "...out of memory...".
    Please advise me, what is to be done for that is all working fine.
    Solved!
    Go to Solution.
    Attachments:
    consumer-producer7.vi ‏44 KB

    What you are running into is an out of memory error in LabVIEW.  You have enough onboard memory to capture 4M samples per channel on the digitizer.  The issue is with fetching and manipulating that data in your LabVIEW application.  You will want to step back and take a look at how you are handling your data to understand why that is happening.
    1) 4M samples/ch = 4M Samples x 2Bytes/sample/ch = 8M Bytes/ch
    2) Expanding to 8 channels creates 64M Bytes of data in the raw binary format
    3) You are scaling your data by fetching in a 1D WDT format.  This stores each sample in a 32 bit double, expanding the memory to 256M Bytes (in addition to timing information)
    4) By splitting up the array of waveforms and branching data it you can easily create copies of this data, and if your consumer loop is not completed with the last data, you may be trying to capture a whole new set, creating yet another copy.
    So you can see that while you have 1.5GB of controller memory, when dealing with large arrays of data you can easily eat up that memory.  There are several things you can try to make your application more efficient.  You could work with an unscaled binary data format, you can wire the array of waveform directly to the peak detect vi (instead of creating 8 copies, you will have a single copy with arrays of output) or you could revisit the record size you have chosen (experimenting with your threshold and width settings might help you to get the results you want with smaller record lengths).
    -Jennifer O.

  • Peak detection in a xy graph

    Hi,
    I have plotted the spectral data in XY graph indicator using a .txt file. Now I need to detect the peaks present in this spectrum, their locations and amplitude. I have used Peak Detector .vi in the code. However, it is not generating relevant peaks but displaying approximated values with wrong locations(x values). Is there a better and accurate way to detect the peaks? Please refer attachments for the code.
    Let me know.
    Thank you.
    Attachments:
    data1.txt ‏28 KB
    read_spectrum_1.vi ‏62 KB

    Have you read the LabVIEW Help file (when looking at the BD, type Ctrl-H, then go to the "Detailed help" at the bottom of the popup) about the peak detection function?
    "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.
    To view the locations in terms of time, use the following equation.
    Time Locations[i] = t0 + dt*Locations[i] ...
    ... This Peak Detector VI is based on an algorithm that fits a quadratic polynomial to sequential groups of data points. The number of data points used in the fit is specified by width."
    Your input data is so noisy that getting as results the actual points from this function that visually seem to be "peaks" is virtually impossible. Not to mention that there is such an offset at the begining of the data that you are getting gazillions of false positives here. You really need to clean things up before you let LabVIEW loose (at least the Peak Detector VI) on it if you want meaningful answers.
    BTW, setting "the threshold slightly below [7379.18]" would not necessarily result in a peak depending on your definition of "slightly," because your data has no points below 180.041, making the highest possible peak 7199.139.
    Cameron
    To err is human, but to really foul it up requires a computer.
    The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
    Profanity is the one language all programmers know best.
    An expert is someone who has made all the possible mistakes.
    To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):
    LabVIEW Unit 1 - Getting Started
    Learn to Use LabVIEW with MyDAQ

  • Peak detection in C

    Hi All,
    I am looking at implementing or using the peak detection function in C. I require the same in C since, I would be later porting this application on microcontroller.
    However, the function implemented in LabVIEW calls the lvanlys.dll for performing the peak or valley detection. Hence, I would not be in position to use the same and later port it on the controller.
    Essentially I am looking for similar function inputs (threshold and width) implemented in C.
    Thanks in advance.
    Regards.

    http://www.nr.com/
    http://en.wikipedia.org/wiki/Numerical_Recipes
    Numerical Recipes in C. The Art of Scientific Computing, 2nd Edition, 1992, ISBN 0-521-43108-5.
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

  • Peak Detect

    Hello,
    I am trying to make a heart rate monitor using LabVIEW and arduino. The basic hardware uses an LED and a photocell. You place your finger on the LED, with the photocell above, and the photocell detects changes in the amount of light in your finger whenever your heart beats.
    My design work okay and is able to detect changes in light. However, I am having trouble calculating those changes and converting the data into a heart rate. One of the problems is the peak detect, into which you set a threshold value and the detector looks for amplitudes above or below that value. The problem is, the amount of light coming through one's finger varies wildly, so even though a pulse is clearly observable, you can't just set a value for the threshold to look for.
    I tried to solve this by making the threshold vary, so that it would be slightly below the average, however my code still fails to detect a pulse. Does anyone have any idea how I could resolve this issue, or if there is a better method than using the default peak detect?
    I have attached a copy of my code, and would be very grateful if anyone could provide input. Thank you very much!
    Solved!
    Go to Solution.
    Attachments:
    A-LV HR Prototype.vi ‏982 KB

    For example, here it detected a significant drop in light intensity 6 times over a 6 second period, so BPM should be 60, but it doesn't display anything.
    Other times the BPM shoots up to 200 in a second then just stays there. I can't figure out why, or if there's a better way to do it.
    Attachments:
    HR Graph.png ‏122 KB

  • 2 Channel peak detection and value look up

    Hi all,
    I have 2 different sin waves going into channel 1 and channel 2 of an oscilloscope. What I'm trying to do is:
    1. From Channel 1's input determine the time when peak values occur and save them to an array
    2. Then find out what channel 2's voltage output is at times determined from step 1. 
    I started doing this project by only using 1 channel where I was able to extract the y data as well as plug it into peak detection.vi. 
    However after I merge the two channels together and proceed like I did with 1 channel  labview shows disconnected wires due to data incompatability. 
    Any help would be greately appreciated on how I can locate channel 1's peak times and plug those time values to determine output values for channel 2.
    Attached is
    1. The single channel peak detection (which works)
    2. 2 channel peak detection (the .vi I need help on)
    Attachments:
    Single Channel Peak Detection.vi ‏33 KB
    2 channel peak detection.vi ‏22 KB

    The VI is broken because you are connecting an array of waveforms with VI's that are asking for a single waveform.  You need to use Index Array to break out one or the other waveform to feed to the other VI's.

  • Peak detection/DAQ

    Hi! I am new in LabView.
    I try to solve a problem with a peak detection in signal. I use BNC-2110.
    This is my input signal - graph above show just digitized signal, and graph under - signal with "mean".
    I have found 2 suitable .VI. They found peaks, but in simulate signal. I have try to change this program for using DAQ-Date as input signal. But it was not successful, I have become many errors etc.
    Can you advise me, where is a problem?
    With best regards, Alex
    Attachments:
    Signal.PNG ‏78 KB
    Peaks_ermitteln2.vi ‏49 KB
    peakxmpl.llb ‏40 KB

    I now about this peak detectors, but they show very many peaks instead of 1
    And in this Program (peaks_ermittlen) it was very good realized. But I don't understand, how can I change the type of Input Signal.
    In this pic I have to draw, what i measure must - Time between 2 peaks
    With best regards, Alex
    Attachments:
    Unbenannt.PNG ‏48 KB

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

  • Peak detection in certain frequency

    Hello everyone.
    I am a rookie of labview, and I want to realize a program.
    The program reads in data and then do FFT transform.
    After getting FFT waveform, I want to search the waveform for peak in certain frequency, say 0.4~0.6Hz,
    and then output its magnitude.
    I have done the FFT part, but I have no idea about peak detection in certain frequency.
    Please help me! Thanks!

    Isnt this what you want ?
    Regards
    Asad Tirmizi
    Design Engineer
    Institute of Avionics and Aeronautics
    " Its never too late to be, what u want to be"
    Using LabVIEW 8.2
    Attachments:
    FFT min max.vi ‏111 KB

  • How to use peak detection in labview to detect peaks from data acquisition information

    Hi
    I am a university engineering student who is working in a team to develop a coin detector, its purpose is to recognize different coinage and detect fakes.
    For this we are using LabVIEW 8.5.1. I am relatively new to labview and have had no experience of using to before. We are trying to integrate four voltage signals produced by an electromagnet, straingauge, optical sensor and a proximity sensor. We have already developed signal conditioning for these tests and now wish to put them into labview.
    Our plan is to use peak detection on each of the tests so that labview can detect peaks which correspond to different coin types, provided they meet set criteria for each coin. Then to combine these either using logic or mathscript to produce a Boolean output for each coin.
    One of our advisors helped us develop a peak detection program for a simple simulated sine wave however we are struggling to adapt this for data acquisition information and itegrate it with mathscript and to be honest it does not make much sense. I have attached the program below. Thanks in advance for your assistance. 
    Attachments:
    Strain 2.vi ‏25 KB

    Chris,
    Here are several ways to help  you get started with peak detection:
    1. On your functions palette, you can search for "peak detect" and you'll find several different variations of VIs that will do peak detection.
    2. You may also want to take a look at this tutorial: Peak Detection Using LabVIEW and Measurement Studio
    3. There's an example in the example finder called "Peak detection and display" that will probably be useful. 
    Hope this helps, 
    Misha

  • 6i can't find waveform peak detection vi. Load error code 20

    6i can't find waveform peak detection vi. Load error code 20

    The waveform peak detection VI is found only in the Full and Professional development systems. Do you have the base package?

  • Looking for function or vi to calculate 1/2 power points of data obtained from peak detection vi

    I am analyzing vibration data and need a function or vi that will operate on peak data returned from the LabView Peak detection function and provides 1/2 power points or sideband frequencies. These are needed to compute a "Q" factor. So far I have not been able to find anything.
    Thanks, Fran

    The sound and vibration toolset may help here.  there are several vibration level measurements including peak.  With the advanced FFT functions in the Sound and Vibration tools, the zoom FFT can be used to identify and find sidebands and associated amplitudes. 
    here is a link to the manual
    http://digital.ni.com/manuals.nsf/websearch/1F8691E94728BDF5862570490058C3B2
    here is a link to the toolset
    http://sine.ni.com/nips/cds/view/p/lang/en/nid/10521
    please note the bullets on the above page (about half way down) noting peak detection, etc.
    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

  • Peak Detection with Base package

    Hello,
    I'm constrained by a budget so I can't purchase the analysis package
    just for peak detection. Does anyone have any hints on how to search a
    1-D array for peaks without using the pre-made VI's? I've been pulling
    my hair out over this one for a week!
    Thanks in advance.

    Labviewguru wrote in message news:<[email protected]>...
    > Jason,
    >
    > I would suggest looking online for a "peak detection" algorithm.
    > There are a number of ways to do it. The LabVIEW peak detector using
    > a least squares quadratic fit to find the peaks, with a filter of
    > amplitude and width. This can also be done much simpler ways. You
    > can try applying a smoothing filter (use a moving or windowed average)
    > and then look for peaks that way.
    >
    > Please post if you need more assistance. Also, what are you trying to
    > do with the peak detection. This would be helpful in providing
    > further assistance.
    >
    > Good luck
    Labviewguru
    Thanks for the advice. Yeah, the NI home page tells me that th
    ey use a
    least square quadratic fit to find the peaks. I'm not sure on how to
    implement that. I'll do a web search on that one. I'm not dealing with
    a very noisy signal so I don't think that I need to do a moving
    average. The amplitude filter seems pretty easy, I just compare each
    point to a preset threshold. However my peaks are composed of more
    than one sample so each peak gives me a bunch of "true" values. I only
    want one count per peak. The way I thought of doing it was using
    hysteresis and starting a subroutine when the upper limit boolean went
    hi, then resetting the subroutine when the lower limit boolean went
    hi. So essentially i need to have labview look for a high, THEN look
    for a low, THEN reset over and over again until the sample array is
    finished. I'd love to work on this for days but I've already put too
    much thought into it.

Maybe you are looking for