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.

Similar Messages

  • 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

  • Peak Detection and Integratio​n

    I have been trying to design a reliable way to detect and integrate seven reactor zone temperature profiles. First, I tried to modify the peak 3.0 example to suit my needs, but alas, it does not work as envisioned (i.e it never detects the correct baseline with my data but it works with the peak 3.0 data set). Does anyone know of a reliable way to detect and integrate peaks of varying length in Labview? I will attach a copy of my vi in hopes of a solution. I attached a Savinsky-Golay smoothed experimental data set of one reactor zone. Thanks for your time!
    Attachments:
    Peaks_Example_3.0(modified).vi ‏137 KB
    time_peak3data_exp_data_.txt ‏38 KB

    In general, I've found working with either the 1st or 2nd derivatives to be more reliable when doing peak searches.
    2006 Ultimate LabVIEW G-eek.

  • Peak detection and appropriate response

    I have been working on a wireless vital sign monitor. I have signals coming through 8 bits A/D entering the microcontroller and serially sent to Labview where i do my analysis.
    I am trying to implement the below algorithm:
    1) Detect the peaks above 3 volts (my range of signals is between 0-5 V) for an interval of 6 seconds.
    2) For every time I detect a peak, increment counter (Counter starts at 0 and ends at 6)
    3) Multiply the total number of detected peaks by 10 which gives beats / minute.
    I was initailly trying to accomplish this using the microcontroller (Basic Stamp 2) but have not been succesfull and am therefore wondering if there is an easier way to do this in Labview.
    I want to accomplish this in real time. Can anyone suggest an approach??
    Thanks

    There are two vis that can be combined :
    - the threshold peak detector (in the Analyse/Signal processing/Time domain sub-palette), gives the number of peaks above a threshold value, in an array of data;
    - the DataqueuePtbyPt in the Analyse/Point by Point/Other functions sub palette) that builds a queue (array) of a given length. This second vi can be used to collect points from your microcontroller ADC.
    Have a look at the attached vi.
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Beat Count2.zip ‏23 KB

  • Block Peak Detection and Display

    I am doing a project on a spike check automation program in Labview. I am trying to detect the peaks and valleys from a probe test on a wafer.The probes are attached to the wafer and connect to an oscilloscope. Right now finding the peaks and valleys are done manually but take a lot of time from one pin.
    My program has to optimally run for 20 seconds and, at every interval, of let’s say 20microseconds, has to take the worst case scenario for the peaks and take the screenshot from the oscilloscope and save it until the worst case scenario in the next block on 20 microseconds until the 30 seconds are up.
    I am using LV 2010 and I don’t have experience with LV before. I have researched and found a VI called waveform peak detector which seems helpful but I am not sure how to save a screenshot at each interval or block.  
    I am also unsure on what to put in a loop so my program can run continuously for 30 seconds without stopping.  I also have the instrument drivers for my particular oscilloscope so I can control the scope from my computer and LV program.
    Any help is appreciated and thanks in advance for your assistance. 

    Share for care... oops share for cure...!!
    please share your code or more info..!!
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.

  • 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

  • Peak detection

    Hello,
    I am currently using Labview 8.0. In that i am facing problems in detecting the peaks of an acquired waveform graph. I tried using the threshold peak detector.vi in the function palette but it doesnot work for me.I also tried filtering the waveform and detecting the peaks but still there was no result. I have uploaded the text file of my waveform here. Can anyone tell me how to detect the peaks of this waveform.
    Regards,
    Nitzy
    Attachments:
    hhaft.TXT ‏723 KB

     I guess the "Peak Detection and Display" example will give you a push in the right direction. But I have to admit I did not look at your example file
    Here is some useful tips for the Labview beginner (we have all been there some time)
    1)Then starting a new Labview session enable context help (Ctrl+h). Do not be afraid to use the detailed help option
    2)Then stuck, go to help in the toolbar then select find examples
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

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

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

  • Waveform peak detection ...Please have a look

    Hi folks,
               I am trying to acquire 2 signals and then detect the peaks of each of them and divide the peaks and display it in a waveform chart.But my Peak detection doesnt work at all...I tried plugging in values from 3 to 10000 but it just doesnt work...Please have a look at my VI and feel free to point out any errors in my VI..
    Thanks
    Attachments:
    slope 2 channels3.vi ‏51 KB

    Hi,
    Had a look at ur VI
    tell me, do u need a single peak for every iteration or a series of peaks above a certain threshold?
    If it is a single peak for each acquired waveform , then extract y array from the waveform cluster( you have already done it in ur VI) and connect it  to 'find array min max' function found in array functions palette and u get the single peak for each waveform.
    If it is a series of peaks u are interested in, then compare all these values inside a for loop.
    Index each element inside a 'for' loop, check it for threshold using a conditional case structure and put it inside a shift register.
    regards
    Dev

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

  • All AI channels have the same value - NI PCI-6221 and NI PCI-6229

    Hello,
    I use the example aiex1.cpp for a multichannel AI read with the mseries devices 6221 and 6229.
    This example works for one channel, but the other channels have the same value (+- 0.001 Volt difference).
    For example: I set 5Volt on the first channel and then the other channel have 5Volt too.
    What should I consider in the configuration?
    Please, can someone help me?
    Best regards,
    Heiko
    Solved!
    Go to Solution.

    Hi Heiko,
    Like Moritz, I'm curious what signals you have connected to your AI channels. What voltage do you expect to read on each channel?
    Tom gave me your initialization code and it looks like you've modified aiex1.cpp. Does the example work without any changes?
    I have some more questions that will help me determine where the problem could be coming from, but these two are the easiest. We'll keep getting more and more specific as we remove possible causes.
    Joe Friedchicken
    NI VirtualBench Application Software
    Get with your fellow hardware users :: [ NI's VirtualBench User Group ]
    Get with your fellow OS users :: [ NI's Linux User Group ] [ NI's OS X User Group ]
    Get with your fellow developers :: [ NI's DAQmx Base User Group ] [ NI's DDK User Group ]
    Senior Software Engineer :: Multifunction Instruments Applications Group
    Software Engineer :: Measurements RLP Group (until Mar 2014)
    Applications Engineer :: High Speed Product Group (until Sep 2008)

  • Detecting column name and value from a xml

    Dear all,
    I need to create a procedure to get a xml file. The xml file may contain a table data or procedure parameter value. Off course it will also contain a flag if the data is of a procedure or table nnd then it's table or procedure name, column name(in case of table), and value. The procedure will receive the xml file and it does not know the column name in case of table or parameter name in case of procedure and then its value. i.e i have to parse the xml file without knowing the column name for table or parameter for procedure. Then i may populate data to my need. How can i do that? Please help me.
    BR.
    Tarik
    Edited by: Tarik_kuet on Sep 23, 2008 2:32 PM
    Edited by: Tarik_kuet on Sep 23, 2008 2:32 PM

    You need to cast your data into an xmltype and look for the existence of nodes for tables, proceduresm etc
    with xmldata
    as
      (select  xmltype('<?xml version="1.0" encoding="UTF-8"?>
    <Sample UniqueID="KWID_AP" >
         <Description>Sample Application</Description>
         <Table Name="SampleTable" />
         <Procedure Name="SampleProc" />
    </Sample>') xml
    from dual)
    select * from xmldata
    where existsnode(xml,'/Sample/Procedure')=1

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

Maybe you are looking for