01-17-2024 07:31 AM
hello?
I have a few questions. Can you help me?
I am a Labview beginner.
I'm acquiring data with an NI USB-5133 device.
1) First, I want to display the average signal obtained through the equipment on a waveform graph. If I change the number in the Averaging panel to 10, can I get only 1 signal to come out as the average of 10 signals?
2) When the averaged signal appears above, I want to find the highest peak point(just one point) in the x-axis cursor (m_st, m_ed) in the waveform graph and find the time axis value of that peak point.
I think the averaged signal and peak detection should be linked.
Solved! Go to Solution.
01-17-2024 05:34 PM - edited 01-17-2024 05:45 PM
The term "dynamic data" has a very special meaning in LabVIEW, and except for two short wires, you don't have dynamic data, so you are probably talking about something else.
Converting a 2D array to dynamic data and back to a 1D array is NOT reasonable code and I seriously doubt that it does what you think it does.
Assuming that the traces are aligned across iterations of the FOR loop (are they?), you probably want to accumulate the data in a shift register, then divide by N at the end. You don't need any dynamic data anywhere.
01-17-2024 05:42 PM - edited 01-17-2024 05:42 PM
@altenbach wrote:
Assuming that the traces are aligned across iterations of the FOR loop (are they?), you probably want to accumulate the data in a shift register, then divide by N ant the end. You don't need any dynamic data anywhere.
Here's a quick skeleton how to do that:
01-17-2024 07:07 PM
Thank you so much! Thanks to this, averaging was solved.
How do I detect the highest peak point (just one) between 1 and 2 of the waveform graph x-axis cursor and find the time of the highest peak point?
01-17-2024 07:53 PM
@hurang wrote:
How do I detect the highest peak point (just one) between 1 and 2 of the waveform graph x-axis cursor and find the time of the highest peak point?
In the absence of noise, all you need is "array max". If you would use cursors locked to the plot, you could use the "cursor index" property to easily get the subset between the two and calculate the actual time from the max index.
01-17-2024 10:16 PM
I'm a beginner at Labview so it's hard to understand in writing.
Could you please fix it in my vi?
thank you!!
01-18-2024 01:40 AM - edited 01-18-2024 02:48 AM
See if this can give you some ideas....
(probably needs a few tweaks, depending on if you want include or exclude the cursor positions from the max search, etc.)
01-18-2024 04:21 AM
thank you! Thanks to you, I now know how to configure it.
However, I implemented it in my program, but it does not work because it does not receive the cursor index value.
I want to find the peak value between the x-axis cursors in a graph with averaging and interpolation applied.
Can you help me solve the problem?
01-18-2024 10:04 AM
As I already mentioned, all the cursors need to be set to locked to the plot. Free dragging cursors (the default) can be anywhere, even between points), so an index makes no sense..
01-18-2024 07:20 PM
Thank you so much!!
Everything has been resolved.
Thank you for helping me.