LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Collect specific frequency data from power spectrum

Solved!
Go to solution

Hi,

 

I want to know how to collect specific frequency data from power spectrum file. I am trying to seperate specific frequency data from the original file.

0 Kudos
Message 1 of 19
(5,689 Views)
Solution
Accepted by topic author chinmay2988

It will depend very much on how your data is stored. You will need some way to read the file into LabVIEW, and then some way to pick out the data you want. I often save data in a .csv file, then I use "Read From Spreadsheet" to get the data in array form. Then you can just use "Index Array" to get the datapoints you need.

Message 2 of 19
(5,651 Views)

Thank you very much for suggestion.

 

I took data out by using FFT power spec. And I used Array max min to get maximum value as I was looking for maximum value only.

I have another question. I need to show error message to string in front pannel if the smoke alarm sirens three times. I have measured the range in which my maximum frequency will fall, when Smoke alarm is starts to ring. And I have put that as one condition in and gate. I need help with another condition. My smoke alarm will start and keep on ringing with the interval of 0.5 ms. I mean it will ring for 1 second and then it will stop for 0.5 micro second. I need implement this condition as well. I humly request you to give you some hint on this.

 

Thank you very much in advance.

0 Kudos
Message 3 of 19
(5,614 Views)

Hi Chinmay,

 

Is your first issue resolved then?

 

For your second issue of capturing 3 consecutive beeps you may want to use a FGV (functional global variable). I do not understand your smoke alarm interval. You mention 1 second, 0.5 milliseconds, and 0.5 microseconds. I think you may have a bit of unit confusion. Anything  occurring on the order of 1 millisecond may be hard to capture. 

 

For using the FGV, you might try to have an array of 3 booleans. Once you test whether your smoke alarm is ringing, replace the oldest element with the result of your test, either True or False. Then you can run this VI every 1 second, or whatever "smoke signal" you are looking for. You can just use "And Array Elements" to see if it has been ringing for 3 seconds or not.

0 Kudos
Message 4 of 19
(5,608 Views)

Thank you for reply. I humbly apologize for confusion with units. You are right its one second and 0.5 second. I humbly request you to tell me more about three booleans and True and false. I am also posting my VI in on this forum. So that you can have a clear Idea.

0 Kudos
Message 5 of 19
(5,604 Views)

Can you save it for LabVIEW 2012 or earlier?

0 Kudos
Message 6 of 19
(5,602 Views)

i have saved it to 2011.

0 Kudos
Message 7 of 19
(5,599 Views)

Could you please see whether it opens or not?

 

0 Kudos
Message 8 of 19
(5,595 Views)

Yes it opens, but there are quite a few basics missing here.

 

Get waveform components wired to nothing

Replace array subset is resizable, you don't need 2 copies of it

The "Maximum Frequency" indicator you have is the index of the array element where the max is located, not an actual frequency. hopefully this is what you want

You can use "In Range and Coerce" to see if a value falls in a range. 

You can use "Select" rather than a case structure which picks between two strings

The loop runs as fast as possible, you can use a "Wait (ms)" function to slow it down

 

Back to the issue at hand. You can store data for the next iteration by creating a shift register on the while loop. You can actually resize the left side to see the last 3 values, and then you will know the previous 3 values which might be useful if you run your loop at 1000ms intervals. If you want to run at some other speed, then you might want a parallel while loop specifically to check for 3 consecutive beeps.

0 Kudos
Message 9 of 19
(5,593 Views)

Thank you for reply. I also request you to tell me how to get maximum frequency out of my data?

 

0 Kudos
Message 10 of 19
(5,582 Views)