High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

Where can I have power spectrum density VI?

I want to take data off of a afm probe with a resonant frequency to determine the amplitude of the signal at the resonant frequency.
Can anyone let me know where I can have sample VIs for the real time power spectrum density?
 
Thanks,
 
CBS
0 Kudos
Message 1 of 9
(7,986 Views)

Hello,

If you launch the example finder (Help -> Find Examples... in LabVIEW) and use the word spectrum in the search field, you'll find many examples.  Perhaps you are interestd in Power Spectrum Measurement.vi in particular.

Best Regards,

JLS

Best,
JLS
Sixclear
0 Kudos
Message 2 of 9
(7,977 Views)

Thank you for your input!

I am trying to use Frequency Spectrum Analyzer for NI-SCOPE (NI 5911)  that I downloaded from NI Developer Zone.

What I need to know is how to store the data from auto power spectrum vi. I tried to use write Labview measurement file vi connecting power spectrum output at auto power spectrum vi. Also between the auto power spectrum vi and write Labview measurement file vi, there is a convert to dynamic data vi which is automatically inserted after the wiring. After running the get spectrum vi, it give me a error with status 7 and no data files created.

Please help!

CBS

0 Kudos
Message 3 of 9
(7,975 Views)
Hello,
 
To save the data I would recommend using the file I/O VIs from the File I/O palette.  There are good examples for this as well, and in your case it looks like the example you are using to acquire data returns arrays of doubles.  In that case, you can write your data as a binary file, and the Write Binary File.vi and Read Binary File.vi are great examples that work together, as they show how to write and read an array of doubles - use the search word "binary" (without quotes of course) to quickly find those in the example finder!
 
I hope this helps!
 
Best Regards,
 
JLS
 
Best,
JLS
Sixclear
Message 4 of 9
(7,972 Views)

Thank you, JLS!

I was successful to write a file into a binary, but still strugglling with read! I need to do more practice as you can see I am a complete novice with Labview.

CBS

0 Kudos
Message 5 of 9
(7,963 Views)
Hello,
 
No problem!  One thing to keep in mind for reading your data, is that when you write a binary file with a double array (with a header) then the format of the file will be:
 
<header><data>
 
where the header will be (for a 1D array) an I32 representing the number of elements in the array, and data will be your double data values one after the other.  Thus, to read your data, you can read your header to determine how many data points you have, and then read the rest of your data (or just part of it if you'd like).
 
I have attached an example to show you this - run the binary file writer, and write to a file (it doesn't have to exist already... just type something like test.bin when prompted), and then run the binary file reader VI to see that it reads your data just how you wrote it.  Notice I write the header manually in the binary file writer VI (not using the header boolean to the file write VI).  I did this to illustrate the idea clearly.
 
I hope this helps!
 
Best of luck, and I think you'll find LabVIEW a very efficient language to learn to program in!
 
JLS
Best,
JLS
Sixclear
Download All
Message 6 of 9
(7,951 Views)
One more technicality I noticed I didn't include in the "directions"... when you use the reader VI and are prompted to choose a file, you'll want to navigate and choose the file that you wrote when you ran the writer VI... event though that was probably clearly implied, I like to be a specific as possible, and sometimes when learning something new, that can make all the difference!
 
I hope this helps a bit more 🙂
 
Best Regards,
 
JLS
Best,
JLS
Sixclear
0 Kudos
Message 7 of 9
(7,949 Views)

I tried to use Frequency Spectrum Analyzer for NI-SCOPE (NI 5911) vi that I downloaded. However, the vi gives output with only a single scane. I need to have output as you will see in attached vi. How should I make this vi work with NI 5911? Will you help me to make the attached vi to be used with NI 5911? I am struggling with this quite a time and still cannot find a way to make this work! If you can find the solution, your help would be greatly appreciated!

CBS

0 Kudos
Message 8 of 9
(7,913 Views)
Are you asking how to save the data acquired data from 5911? Can you explain more about as what you mean by single output? Can you please post  little bit more as exactly what you are planning to do?
 
Kalyan
 
Kalyanramu Vemishetty
Automated Test Systems Engineer
National Instruments
0 Kudos
Message 9 of 9
(7,880 Views)