Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

power spectrum

Hi, 

I have two questions, the first is that how to combine many power spectrum measurements in one graph and the second how to save the data it to a file. I am having problems saving the graph due to its being a cluster  with three element  so it is hard to find any  compatible  function with it 

0 Kudos
Message 1 of 15
(3,633 Views)

Combining multiple power spectrum measurements in one graph should be possible by bundling the individual arrays.

Now to recored the data into a file you can use one big array and place the (absolute) power spectrum array into a new line at every time step. When recording is finished you can use the "array to spreadsheet string.vi" in order to transform this complete array in string format. The output string can be connected to an "Write to text file.vi". This way you have a text file where every new line contains one power sprectrum it each line and which can be imported in Matlab e.g.



0 Kudos
Message 2 of 15
(3,601 Views)

Hi, 

The output of the power spectrum is a cluster with three elements and I have tried converting it to  2 D array but it is not working. Combining multiple power spectrum measurements in one graph should be possible by bundling the individual arrays( is there a way u can show me an example on this ). below are my code and a snippet of the conversion 

Download All
0 Kudos
Message 3 of 15
(3,595 Views)

This doesn't seem to be a real time question. You might bet more help in the general forum. Also, you should specify what you mean by combining graphs. Do you mean displaying multiple plots on one graph display so you have multiple lines going over each other? For that you just put each cluster into a build array and then wire that into the graph or file write.

0 Kudos
Message 4 of 15
(3,583 Views)

 am trying to a acquire each power spectrum measurement on one graph. For that, you just put each cluster into a build array and then wire that into the graph or file write ( can you show me an example on this 

0 Kudos
Message 5 of 15
(3,575 Views)

I don't have NXG but here's what the "Build Array" function looks like on OG

bundle graphs.png

0 Kudos
Message 6 of 15
(3,564 Views)

Hi , 

thanks for the solution.

Another question 

am currently conducting an experiment on beam detection and I am using change in frequency as a feature for data acquisition on LabVIEW. I am making use of the power spectrum graph to see the change in frequency so I am taking 100 measurements due excitation to generate a  100 power spectrum graph but I want to combine all 100 power spectrum graph into one power graph but I don't know how to go about it. so if you can provide any hint it will be fine 

0 Kudos
Message 7 of 15
(3,554 Views)

Same question as above. What do you mean by combining 100 graphs? Are you just overlaying them (seems like an extension of the above) or something else:

Other ways of combining.png

0 Kudos
Message 8 of 15
(3,542 Views)

I want to overlay the graph above each other( as am  generating each of the graph i want it to be overlaying over each other)

0 Kudos
Message 9 of 15
(3,529 Views)

You need to store all the graphs in a shift register. Also, you should have some mechanism for limiting the maximum number of graphs you store in that register. Example:

 Overlay lots of graphs.png

 

0 Kudos
Message 10 of 15
(3,523 Views)