Basic Usage

NI RF Vector Signal Analyzers (NI-RFSA 18.1) Help

Edition Date: June 2018

Part Number: 372058U-01

View Product Info

Download Help (Windows Only)


NI-RFSA 18.1 Help
NI-RFSA 18.2.1 Help
NI-RFSA 19.1 Help
  1. Initialization: Use a constructor to create a new instance of the NIRfsa class. You must create an instance of this class before you can call into the underlying NI-RFSA driver.
    VB.NET
    Dim session As New NIRfsa("Rfsa", True, True) ' Initialize
    C#
    NIRfsa session = new NIRfsa("Rfsa", true, true); // Initialize
  2. Configuration: The NIRfsa object that you created gives you direct access to various sub-objects, which allow you to configure NI-Rfsa, directly or indirectly. You can perform most of the configuration through the configuration sub-object. VB.NET
    Dim session As New NIRfsa("Rfsa", True, True) ' Initialize
    session.Configuration.AcquisitionType = RfsaAcquisitionType.IQ
    session.Configuration.Vertical.ReferenceLevel = -10.0
    session.Configuration.IQ.CarrierFrequency = 10000000.0
    session.Configuration.IQ.NumberOfSamples = 1000
    C#
    NIRfsa session = new NIRfsa("Rfsa", true, true); // Initialize
    session.Configuration.AcquisitionType = RfsaAcquisitionType.IQ;
    session.Configuration.Vertical.ReferenceLevel = -10.0;
    session.Configuration.IQ.CarrierFrequency = 10E+6;
    session.Configuration.IQ.NumberOfSamples = 1000;
  3. Initiate: The NI-RFSA device starts acquiring the configured waveform signal as soon as you initiate the signal acquisition, unless the NI-RFSA driver is waiting for a trigger. VB.NET
    session.Acquisition.IQ.Initiate()
    C#
    session.Acquisition.IQ.Initiate();
  4. Fetch: Transfers the acquired data from NI-RFSA memory to the system memory. The different types of fetch are :
    • Single record fetch
    • Single record memory optimized fetch
    • Multi-record fetch
    • Multi-record memory optimized fetch
    VB.NET
    session.Acquisition.IQ.Initiate()
    session.Acquisition.IQ.FetchIQSingleRecordComplex(Of ComplexDouble)(0, 1000, New PrecisionTimeSpan(5))
    C#
    session.Acquisition.IQ.Initiate();
    session.Acquisition.IQ.FetchIQSingleRecordComplex<ComplexDouble>(0, 1000, new PrecisionTimeSpan(5));
  5. Read: Initiates acquisition, waits for the acquisition to complete and then retrieves the data. There are two types of read :
    • Single record read
    • Single record memory optimized read
    VB.NET
    session.Acquisition.IQ.ReadIQSingleRecordComplex(New PrecisionTimeSpan(5))
    C#
    session.Acquisition.IQ.ReadIQSingleRecordComplex(new PrecisionTimeSpan(5));
  6. Close: Closes the session to the device and frees unmanaged resources that are held by the session. You can close the session with Close or Dispose.
    VB.NET
    session.Close()
    C#
    session.Close();

    or

    VB.NET
    session.Dispose()
    C#
    session.Dispose();

    or

    VB.NET
    Using session As New NIRfsa("Rfsa", True, True)
    'User code goes here
    End Using
    C#
    using (NIRfsa session = new NIRfsa("Rfsa", true, true))
    {
    // User code goes here
    }

The following code snippet acquires a waveform:

VB.NET
Using session As New NIRfsa("Rfsa", True, True)
    session.Configuration.AcquisitionType = RfsaAcquisitionType.IQ
    session.Configuration.Vertical.ReferenceLevel = -10.0
    session.Configuration.IQ.CarrierFrequency = 10000000.0
    session.Configuration.IQ.NumberOfSamples = 1000
    session.Acquisition.IQ.Initiate()
    Dim data As ComplexWaveform(Of ComplexDouble) = session.Acquisition.IQ.FetchIQSingleRecordComplexWaveform(Of ComplexDouble)(0, 1000, New PrecisionTimeSpan(5))
End Using
C#
using (NIRfsa session = new NIRfsa("Rfsa", true, true))
 {
    session.Configuration.AcquisitionType = RfsaAcquisitionType.IQ;
    session.Configuration.Vertical.ReferenceLevel = -10.0;
    session.Configuration.IQ.CarrierFrequency = 10E+6;
    session.Configuration.IQ.NumberOfSamples = 1000;
    session.Acquisition.IQ.Initiate();
    ComplexWaveform<ComplexDouble> data = session.Acquisition.IQ.FetchIQSingleRecordComplexWaveform<ComplexDouble>(0, 1000, new PrecisionTimeSpan(5));
 }

WAS THIS ARTICLE HELPFUL?

Not Helpful