LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

power spectrum output to array

Solved!
Go to solution

Hello,

 

 

I have a signal and i need to make the power spectrum. How can i separate the information in the output cluster of the power spectrum? I have tried to use the unbundle but it gives me an error: " the type of the source is 1D array of cluster of 3 elements. The type of the sink is cluster of 0 elements " If i click on the unbundle it does not let me select anything, it says empty... Does anyone have an idea how to solve this, please?

 

 

 

 

 

0 Kudos
Message 1 of 10
(3,941 Views)

Installing NI Device Drivers so no LabVIEW to write you an example but

 

Wire the array of clusters to a For Loop Auto-index and unbundle inside the loop


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 10
(3,935 Views)

Can you please explain why is this necessary? My input signal (into the power spectrum) is a 1536 array. Shouldn't the output of the power spectrum be a single signal? If i introduce the for loop it lets me select the 3 components of the spectrum but it seems as if there are multiple spectra.

0 Kudos
Message 3 of 10
(3,932 Views)

Lets see a snip of your code.

Im not sure what vi you are using (there are several analisys vis that you may have chosen) FFT Power Spectrum and PSD for N Chan.vi is one of them.

 

I do not understand "a 1536 array."


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 10
(3,924 Views)

1536 is the dimension of the array. Here is the code.

0 Kudos
Message 5 of 10
(3,921 Views)

i'm sorry, i totally forgot what you told me earlier. Here is a snippet

0 Kudos
Message 6 of 10
(3,915 Views)

Can someone post the relevant snippet?  Still installing DD and I can't see the datatype of the array or what vi is beeg used.[edit] Nevermind


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 10
(3,913 Views)
Solution
Accepted by topic author valentina.alina

Capture.PNG

Build array is not your friend here  In fact I'd replace the build arrary and the Power Spectum Express Vis with "FFT Power Spectrum and PSD.vi"  Search the pallete or use Quick drop to locate it.

 

Why did you pull y from the filtered waveform just to rebuild the same waveform ?  Wire the waveform to the second FFT Power Spectrum and PSD .vi directlySmiley Wink 


"Should be" isn't "Is" -Jay
Message 8 of 10
(3,906 Views)
Hello valentina.alina 

 

If you have error message: "the type of the source is 1D array of cluster of 3 elements. The type of the sink is cluster of 0 elements "  it means that first you must index array and then unbundle. You can do this by Index Array function or by autoindex terminal in For Loop. Here's snippet:

 

 

Message 9 of 10
(3,905 Views)

Thank you very much for your rapid response, sir Smiley Happy

0 Kudos
Message 10 of 10
(3,891 Views)