nirfsg module

Installation

As a prerequisite to using the nirfsg module, you must install the NI-RFSG runtime on your system. Visit ni.com/downloads to download the driver runtime for your devices.

The nimi-python modules (i.e. for NI-RFSG) can be installed with pip:

$ python -m pip install nirfsg~=1.0.1

Usage

The following is a basic example of using the nirfsg module to open a session to an RF Signal Generator and generate a continuous wave (CW) signal.

import nirfsg

# Configure the session
with nirfsg.Session(resource_name='5841', id_query=False, reset_device=False, options='Simulate=1, DriverSetup=Model:5841') as session:
    # Configure RF settings
    session.configure_rf(
        frequency=1e9,  # Frequency in Hz
        power_level=-10.0  # Power level in dBm
    )
    session.generation_mode = nirfsg.GenerationMode.CW

    # Start signal generation
    with session.initiate():
        input("Press Enter to stop generation")

Other usage examples can be found on GitHub.

API Reference