PXIe-5841 Examples

NI installs example code with your software or driver that demonstrates the functionality of PXIe-5841, helps you advance your knowledge, and provides building blocks for your own applications.

While the experience can differ slightly across products and versions, examples generally install with your NI product or driver and can be accessed from within NI software.

RF API Locations

Access the API to program your instrument, depending on your application development environment and RF driver.

Table 11. API Location for RFmx
ADE API Location
LabVIEW

Available on the LabVIEW Functions palette at Measurement I/O » NI-RFmx.

LabWindows/CVI

Available from the LabWindows/CVILibrary menu at Library » RFmx SpecAn Library and Library » RFmx Demod Library.

Microsoft Visual C/C++

Use the header files located in the <NIDir>\Shared\ExternalCompilerSupport\C\include directory and import library files located in one of the following directories:

  • 32-bit installation <NIDir>\Shared\ExternalCompilerSupport\C\lib32\msvc
  • 64-bit installation <NIDir>\Shared\ExternalCompilerSupport\C\lib64\msvc
  • where <NIDir> is the following location:

    Program Files (x86)\National Instruments.

    Microsoft .NET

    For the location of .NET class libraries, refer to the installed RFmx readme.

    Table 12. API Location for NI-RFSA
    ADE API Location
    LabVIEW

    Available on the LabVIEW Functions palette at Measurement I/O » NI-RFSA.

    LabWindows/CVI

    Depending on bitness, available in the <IVIROOTDIR32>\Drivers\niRFSA or <IVIROOTDIR64>\Drivers\niRFSA directory, where <IVIROOTDIR32> and <IVIROOTDIR64> are the following:

  • <IVIROOTDIR32> Program Files (x86)\IVI Foundation\IVI
  • <IVIROOTDIR64> Program Files\IVI Foundation\IVI
  • Microsoft Visual C/C++

    Depending on bitness, use the header files located in the <IVIROOTDIR32>\Include or <IVIROOTDIR64>\Include directory and import library files located in the <IVIROOTDIR32>\Lib or <IVIROOTDIR64>\Lib directory, where <IVIROOTDIR32> and <IVIROOTDIR32> are the following:

  • <IVIROOTDIR32> Program Files (x86)\IVI Foundation\IVI
  • <IVIROOTDIR64> Program Files\IVI Foundation\IVI
  • Microsoft .NET

    Use the NI-RFSA .NET class library by adding a reference to NationalInstruments.ModularInstruments.NIRfsa.Fx40 or NationalInstruments.ModularInstruments.NIRfsa.Fx45 and any dependent class libraries from within the Solution Explorer in Visual Studio.

    Table 13. API Location for NI-RFSG
    ADE API Location
    LabVIEW

    Available on the LabVIEW Functions palette at Measurement I/O » NI-RFSG.

    LabWindows/CVI

    Depending on bitness, available in the <IVIROOTDIR32>\Drivers\niRFSG or <IVIROOTDIR64>\Drivers\niRFSG directory, where <IVIROOTDIR32> and <IVIROOTDIR64> are the following:

  • <IVIROOTDIR32> Program Files (x86)\IVI Foundation\IVI
  • <IVIROOTDIR64> Program Files\IVI Foundation\IVI
  • Microsoft Visual C/C++

    Depending on bitness, use the header files located in the <IVIROOTDIR32>\Include or <IVIROOTDIR64>\Include directory and import library files located in the <IVIROOTDIR32>\Lib or <IVIROOTDIR64>\Lib directory, where <IVIROOTDIR32> and <IVIROOTDIR32> are the following:

  • <IVIROOTDIR32> Program Files (x86)\IVI Foundation\IVI
  • <IVIROOTDIR64> Program Files\IVI Foundation\IVI
  • Microsoft .NET

    Use the NI-RFSG .NET class library by adding a reference to NationalInstruments.ModularInstruments​​​.NIRfsg.Fx40 or NationalInstruments.ModularInstruments​​.NIRfsg.Fx45 and any dependent class libraries from within the Solution Explorer in Visual Studio.

    Browsing and Searching for Examples in NI Example Finder

    Use NI Example Finder to browse and to search for examples.

    You can use NI Example Finder to find examples for the following products.
    • LabVIEW
    • LabWindows/CVI
    • NI drivers accessible from LabVIEW
    • NI drivers accessible from LabWindows/CVI
    1. Launch LabVIEW or LabWindows/CVI.
    2. Open NI Example Finder.
      OptionDescription
      LabVIEW Select Help » Find Examples. from the menu bar.
      LabWindows/CVI Click Find Examples... from the Examples section of the Welcome Page.
      NI Example Finder launches.
    3. Optional: Configure NI Example Finder for LabWindows/CVI.
      1. Click Setup. Configure Example Finder opens.
      2. In Configure Example Finder, click Software, then select LabWindows/CVI, and click OK.
      NI Example Finder updates with all the examples for LabWindows/CVI.
    4. Search the example VIs for your product.
      OptionDescription
      Click the Browse tab. Choose Browse when you want to drill down through folders to find examples organized by task category.
      Tip Examples installed with NI drivers or third-party drivers are often found within the Hardware Input and Output folder. Examples installed with toolkits or modules are often found within the Toolkits and Modules folder.
      Click the Search tab. Choose Search when you want to find examples by searching for topics, products, or modules relevant to your application.
    5. To open an example, double-click the folder or the example.
      Tip You can modify an example VI to fit your application. You can also copy and paste from one or more examples into a VI that you create.

    Finding Microsoft Visual Studio Examples

    If you are developing VST applications with Microsoft Visual Studio, locate examples in the following directories.

    Table 14. Location of Microsoft Visual Studio Programming Examples
    Software Option Examples Location
    RFmx

    <NIDocDir>\<Personality>\Examples

    where <NIDocDir> is the Users\Public\Public Documents\National Instruments directory and <Personality> is the directory of your RFmx personality.

    NI-RFSA

    <NIDocDir>\NI-RFSA\examples

    where <NIDocDir> is the Users\Public\Public Documents\National Instruments directory.

    NI-RFSG

    <NIDocDir>\NI-RFSG\examples

    where <NIDocDir> is the Users\Public\Public Documents\National Instruments directory.