From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-28-2020 08:36 AM - edited 05-28-2020 09:01 AM
Hello everyone.
I started studying LABVIEW online.
I want to write software for finding peak height.
I have the LABVIEW 2020 version.
What I'm trying to do is read pulses from my scoop and check how many pulses I have.
And what is the height and position of each of the pulses.
I have several types and widths of pulses.
To find the right number I change the width of the software, but I still haven't figured out how to do it.
I tried using examples but couldn't
I hope to get help and direction what I need to do.
I added file VI
The signals can be changed with "Signal" total I have 4
Eliran
Solved! Go to Solution.
05-28-2020 11:32 AM
For example.
In the picture I have now attached, I should only detect 10 pulses.
It finds more pulses. How do I filter the noise from the right side of the graph?
When I change the lower threshold it also gives me the first pulse on the left side of the graph.
How can this be improved?
I know in advance how many pulses I'm supposed to see. Does it help?
Eliran
05-28-2020 11:56 AM - edited 05-28-2020 11:57 AM
You posted your code using version LabVIEW 2020. You should save for a previous version. I would save it all the way back to 2017 if you really want people to help.
Try making your width parameter wider and see if you are getting better results. I would also change your threshold to 0.0025.
05-28-2020 01:06 PM
I changed the version.
Thanks, I've learned
05-28-2020 01:21 PM
For the signals as you have them attached I get the following results.
signal 0 I used settings of Threshold = 1 width = 400. I get 1 pulse
Signal 1-3 I used the settings of Threshold = 1 width = 75 and got the correct result
Signal 4 will be tougher. I did use the setting of:
Threshold = 0.0075 width = 90 and I get 9 pulses.
05-28-2020 01:29 PM
What is the end result you are hoping for? Are you trying to get your code to automatically find the pulses? If so you are going to need more complicated code to do that.
05-28-2020 01:50 PM - edited 05-28-2020 01:56 PM
Thanks for the quick responses.
In Signal 4 I need to find 10 pulses. There is a low pulse on the left side of the graph. And when I change the threshold it is not counted.
The following data I do know. The pulse width of the scoop and the number of pulses I should see
Yes eventually I want to find automatically.What width do I need to know in advance? I would like to know the correct way to do the process automatically
Eliran
05-28-2020 01:55 PM
The width will depend on your process and how repeatable it is. If you know that your pulse will always be a certain way then you should be able to set a default values. If it is more variable then you will have to find a way to make it search for the correct position.
05-28-2020 02:23 PM
Can you give me ideas for finding an automated solution. For detecting the number of pulses.
Thank you
Eliran
05-29-2020 12:30 AM
If your width is going to vary a lot the NI Peak Detect can be hard to use. I stumbled across another method, which just defines a peak as a point that is X greater than the points on either side. (See Eli Billauer - http://billauer.co.il/peakdet.html )
See attached, I tried your data with NI Peak detect, Ni threshold detect and Eli Billauer Method (EBM).
All 3 work, but only the EBM works reliably for a "hands off" solution regardless of pulse width ( peak threshold = data_max / 6 )
NI Peak Detector works for all with width = 50, except for signal #0 where width needs to be 300.
NI threshold works for all if width = 3. But you don't get peak info.
Enjoy.
Craig