From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-24-2017 01:58 PM
To try and understand how to use the ZoomFFT functions in the Spectral Measurements package, I built the SmtContinuousZoom C# example from NI-SMT 2.6.3. Using the default values for the example (see attached screenshot), it computes a spectrum size of 26214400, a FFT size of 52297728 and a maximum block size of 798. With these settings, it takes a very very long time to process the data and ends up with what appears to be all 0's for the spectrum output from the ContZoomFFTEx() function.
My questions are: 1) the spectrum size and FFT size seem inordinately large (in the Config() function, the example code requests 400 spectral lines, for instance, yet the function returns 26214400 as the optimal value); 2) if those inputs to the FFT function are correct, why is the spectral response all 0's (the input data is a simulated sine wave of 798 points at 1000 Hz)?
04-25-2017 05:38 PM
Hi Brandle,
I only have the LabVIEW support for SMT 16.0 installed on my computer and the examples look a little different. Using the default settings on my end, the examples I’ve run seem to be working as expected with the default settings.
Did you change anything else in the code? With the simulated data examples I’ve been running, there are default signal settings for the simulated signal as well as well.
I’ll see if I can get access to VS so I can take a look at the same example. In the meantime, can you post the code here as well?
04-25-2017 05:51 PM - edited 04-25-2017 05:55 PM
I've attached the code here. I had made some changes, but backed them out to see if it was my code or not. What I've attached is direct from the niSMT_DotNETWrapper_2.6.3.zip download.
04-26-2017 03:46 PM
Looking at this code, this seems more like a single function than a full example. Where is this located on disk?
All of the examples for SMT should be in the following location:
C:\Users\Public\Documents\National Instruments\Spectral Measurements Toolkit\Examples
04-26-2017 04:14 PM
Yes, there is an example folder in the location you mention. However, the only item in there is a shortcut to C:\Users\Public\Documents\National Instruments\CVI\samples\smt - which contains several CVI examples.
The DotNET versions are in a separate downloadable zip file, which is niSMT_DotNETWrapper_2.6.3.zip. Inside that zip file are two examples for DotNET: "Smt Adjacent Channel Power" and "SmtContinuousZoom", for CS and VB, alo0ng with the DotNET wrappers for the dlls. I am using the C# SmtContinuousZoom example. The two files I attached earlier - Form1.cs and Form1.Designer.cs contain all the code for the ZoomFFT example. Other files in the directory are the Visual Studio project and solution files, properties, etc.
04-27-2017 05:49 PM
I found the download. For this version of the software, I didn't realize the .NET examples were a separate download.
While I look into this some more, can I ask why you're using this older toolkit? There are some newer versions of SMT available. Also, SMT as a whole has been replaced with RFmx SpecAn. RFmx SpecAn has roughly 40 different examples for .NET RF applications.
04-27-2017 06:04 PM
Because that's what I was able to find via some searches for software that did demodulation. I didn't realize SMT had been replaced by RFmx SpecAn. Although I did see a few references to RFmx, it wasn't clear on initial reading that it included the .NET support and examples. Looking at it in more detail, I see that it does include .NET support. I am downloading it now and will report back if using this new package solves my problems.
05-08-2017 03:41 PM - edited 05-08-2017 03:44 PM
I am finally getting back to my FFT issue after several distractions. I downloaded and installed the RFmxSpecAn version 2.2. I found the examples, including one for Analysis Only (RFmxSpecAnAcpAnalysisOnly) - which is what I need since I'm collecting data from an independent acquisition system.
When I tried to build it, I found I also needed a full install of RFSA plus the .NET drivers. I now have those installed and it compiles cleanly. When I try to run it I get an error message:
Ivi.Driver.IviDriverException: ModularInstruments.NIRfsa: Device identfier is invalid. Error code: -200220"
It's not clear what it's looking for. the "resourceName" is defined in the example code as "RFSA". I am using it unmodified. I have no actual RFSA hardware installed and I don't expect it to be looking for such hardware in this example. It is blowing up on the line:
rfsaSession = new NIRfsa(rfsaResourceName, true, false);
A partial stack trace:
StackTrace = " at NationalInstruments.ModularInstruments.NIRfsa.Internal.RfsaImpl.TestForErrorAndWarning(Int32 status)\r\n at NationalInstruments.ModularInstruments.NIRfsa.Internal.RfsaImpl.InitWithOptions(String resourceName, Boolean iDQuery, Boolean reset, String ...
Any hints or suggestions would be appreciated. If you'd rather I start a new topic, since this is no longer directly related to SMT, I can do that, although it is related to my original problem of getting a working FFT function.
P.S. I just tried again with the "checklId" parameter set to false in the constructor call - same error.
05-09-2017 11:46 AM
Hi brandle,
This example is designed to use hardware. The resourceName is the name of the hardware being used and "RFSA" is just the default value used in the example. All of the RFmx SpecAn functions are designed to be used with hardware.
Can you describe your application for us? If you're not using hardware, then RFmx SpecAn may not be right for you. Where is the data for the FFT coming from?
05-09-2017 01:11 PM
Hi Matt,
I was afraid of that. The ZoomFFT example in the older SMT library generated a simple sine wave then ran an FFT on it. You had indicated that RFmx is the better way to go (and they do have many more examples) and I was hopeful when I saw the information in the help file where it states:
RFmx Analysis-Only Mode
The RFmx Analysis-Only Mode further extends the functionality and flexibility of the RFmx API to handle the following use cases:
Bullet point 3 is my situation.
So, to elaborate, here's my setup:
What I want to do is read the time domain data from a disk file, use some software tool to run a FFT to get the frequency domain data and determine the peak frequency (like what RFmxSpecAnMarker provides), and in the case where the RF is modulated, do a demodulation to extract the modulation signal from the carrier.
Can I achieve this using RFmxSpecAn and RFmxDemod, and if not, what would you recommend? I would like to do this in C#.
-Bill