08-18-2008 10:36 AM - edited 08-18-2008 10:37 AM
Hello,
I've been trying to read the data of the X (frequencies) and Y (amplitude) axis of a waveform graph and organise them in a table or indicators, so I could use these data with comparison functions to detect the presence of specific frequencies and subsequently give their amplitude.
So far I can see these frequencies as well as their respective amplitude in my Spectrum analyser. I am now trying to transfer these data across and use them to switch indicators on/off depending on the frequencies. In the Vi, attached with this message, I'm using two different methods to acquire the spectrum: a) via the "plot waveform.vi" and b) with the bundle function and a waveform graph. I understand that I might have to use a property node, but here comes the problem: I got stuck !!!
I'm using Labview 6.1 and I've started not long ago.
Thank you for your time and help.
08-19-2008 06:22 AM
Hi Mr B.
I have written some code in 7.1 - as I currently dont have 6.1 or 7.0 installed on my machine. So i have attached a screen shot. It produces the spectrum, and then uses a peak detection vi - is this in 6.1? Then just use some logic for comparisions. Then use the vi's to built it into a table.
Please post back, with more information if you wish to continue,
Regards
08-19-2008 10:04 AM
Hi Hillman,
Thank you for replying. I've tried to get my application working based on your explanation. I am getting some results but not quite want I need. I also find it awkward to interpret the resulting data in dB I rather get the same values displayed on the graph T:
Could you please tell me if I'm doing things correctly here? I've attached my VI as well as a screen shot.
Thanks a lot
08-19-2008 11:03 AM
Hi Mr B
Thanks for your reply.
Is there any chance of using a newer version of labview - this will help develop your code?
Secondly, how are the results your getting not quite what you need...you seem to be generating the frequencies that are contained within the waveform?
Thirdly, what did you mean by display the values of graph T? - what is graph T, and do you mean display the frequency peak information on the time domain plot.
Regards,
08-20-2008 06:30 AM
Hi Mr B (and others)
I contacted Mr B, and generated the following code - seems to be what your after.
Regards
08-21-2008 03:54 AM
Good morning James,
Thanks a lot for your help on the phone and for sending the related infos. I've tried what you suggested to me and after few changes I've managed to obtain a much better result. The Frequencies detection function works very well when the VI is first started. Unfortunately, after a little while or after stopping and restarting the VI, the function doesn't work as well. For instance, sometimes the 4Hz and the 8Hz are detected and next second the frequencies are lost or sometimes they are not even detected. So as a fix, I restart the VI and it seems to work again. I am now trying to find a way of obtaining a better accuracy.
I've included my VI with this post.
Again, I would like to say how much your help was and is appreciated.
Regards,
Badis