LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PXI-5660 - Using the "ni5660 Configure for Spectrum" vi

I am working on a project using the PXI-5660 as a spectrum analyzer.  The basic function from the Spectral Measurements Toolkit is the .vi "ni5660 Configure for Spectrum" and one of the clustered inputs is "advanced settings".  Within that cluster is value called "spectral lines" which the help  information says "can be any number".  But, the number assigned to "spectral lines" is not the number of data points returned in the spectrum output vector.  There is a linear relationship, but I don't know if that depends on any of the other factors, such as RBW.  Can anyone give me some idea of what this value is really controlling and what effect it has on number of data points returned???
 
--mike--
0 Kudos
Message 1 of 4
(2,821 Views)

MikeBail,

There are only a few reasons why you would want to specify an exact number of spectral lines to capture on your spectrum. Usually the number of spectral lines is determined by your center frequency, resolution bandwidth, frequency span and the algorithm used to calculate the spectrum. There is a shipping example that comes with the 5660 drivers called ni5660 Getting Started Spectrum which is a good starting point. There is a VI called “ni5660 Read Averaged Power Spectrum” that has a clustered output called “averaged power spectrum.” If you edit that VI so that you can see the actual size of the “spectrum” array in that cluster you should be able to get the same number as you specify in the spectral lines input.

I tested this VI with the 5660 acquiring anywhere from 400 to 4000 spectral lines and I got good results. My only question would be how many spectral lines are you trying to pull out? If you are asking for too many you may be running into other problems.

Daniel V.
National Instruments
Applications Engineering
High Speed Modular Instruments
0 Kudos
Message 2 of 4
(2,792 Views)
Dan -
 
I'll look at the vi's you mentioned. 
 
The conditions are not that we want more data lines, but that we are trying to reduce the number for storage and formating reasons.  The project is to replace an Agilent E4402B with the 5660/5690 combination.  One of the variables that we pass to the 4402, is the number of data points returned in the spectrum sweep.  That number is usually either 1024 or 2048 depending on other conditions.  In one case, the data returned from the 5660 is 59,000 points.  At that rate, our storage is used up in a matter of days rather than months. 
 
--mike--
0 Kudos
Message 3 of 4
(2,782 Views)

Mike,

If I understand correctly, you are passing a hard coded value of the parameter “spectral lines” to the “ni5660 Configure for Spectrum”  VI.

If you are actually specifying a spectral lines input of 1024 or 2048 and getting 56,000 data points on your spectrum array, I am not sure where this is happening. My only guess is that the configure VI is not receiving these inputs and using your RBW value instead.

Which VI are you using to actually obtain a spectrum? I mentioned the “ni5660 Read Averaged Power Spectrum” VI which does the FFT and averaging for you. Another VI that can be used is the “ni5660 Read FFT Spectrum” but you will have to manipulate that data using other Vis. If you are in fact using the “ni5660 Read FFT Spectrum” VI you may be getting a funky number for the size of the FFT array on the “spectral info out” bundle. If you are storing your data ignore this value; the output you want to be looking at is “FFT spectrum (Vrms)”. This will give you an array called “spectrum” that has the same size you specify in the “spectral lines” input of the “ni5660 Configure for Spectrum” VI.

Remember, specifying a spectral lines input will stomp on your RBW setting and always return the number of data points you ask for instead of the one that will give you your desired RBW.

I have attached a screenshot & sample code (code if for LabView 8.5, if it doesn’t work on your system let me know, I can make it compatible to an older version).

Daniel V.
National Instruments
Applications Engineering
High Speed Modular Instruments
Download All
0 Kudos
Message 4 of 4
(2,775 Views)