06-24-2015 07:52 AM
Hello,
What Im trying to do is calculate spectrogam of the signal that is aquiring. (right now I read data from the csv file in quasi -real -time )
I have created a spectrogram using STFT Spectrograms VI. Then I'm using Intensity Graph. The x Scale depends on the window shift.
I would like x scale of the spectrogram to be the same as the signal that I analyze. Is it posible? I was trying to use Property Node but it was unsuccessuful.
Please help 🙂
Thanks!
PS: I attached the icture of the piece that is responsible for creating the spectrogram.
Solved! Go to Solution.
06-24-2015
09:09 AM
- last edited on
01-08-2025
08:23 AM
by
Content Cleaner
Can you attach that functional part of your code as a VI Snippet? This will allow us to open that block diagram ourselves.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
06-24-2015 09:27 AM - edited 06-24-2015 09:38 AM
This is the code.
I would like the x scale on the spectogram be the same as on waveform Graph.
(Sorry for polish names. I hope this is not a problem. )
Thanks!
06-24-2015 10:11 AM
I got it to match the x scales by just setting "Parametr okna - beta dla okna Kaisera" to a value of 1. I don't know what any of that means, but you had it set as a value of NaN, so the scaling wasn't working.
I don't know if this is exactly how your main code works, but you probably want to wire an empty array in to the feedback node, so that it resets the graphs when the VI is run again.
Also, if you're running this VI for a lot of iterations, you're going to get a very large memory allocation at that feedback node over time, so keep an eye on that as well.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
06-24-2015 10:36 AM - edited 06-24-2015 10:42 AM
Thanks!
This parameter is for some kind of windows. Probably Ishouldn't always miltiply the scale by this parameter. Now I understand why it didn't work.
What do you mean by feedback node? Where exaclty should I connect it?
I'm quite new to LabView so there are many things that are totally new to me. Sorry for such basic questions
06-24-2015 10:53 AM
Feedback nodes are essentially a memory space to store values from one iteration to the next. That's how you're able to generate the whole graph with new data each time, because you're adding the new data to the old and then storing the bigger array each time. You can see how this would eventually result in a very large array if left for long periods of time. I don't know how you can work around this necessarily because you probably need the whole array to run the spectogram analysis.
There's a terminal on Feedback Nodes for Initial Value. If you don't wire anything in there, it uses whatever memory was last in there, so you most likely want to wire an empty array as the initial value to remove any old data. A problem that you might run in to if you don't do this would be if you left the VI open after running a test, then came back later and ran a new test, but now all of your first test data and new test data is combined in the new test.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'