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.1.0
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")
API Reference
- Session
- Methods
- abort
- allocate_arb_waveform
- change_external_calibration_password
- check_generation_status
- check_if_script_exists
- check_if_waveform_exists
- clear_all_arb_waveforms
- clear_arb_waveform
- clear_self_calibrate_range
- close
- commit
- configure_deembedding_table_interpolation_linear
- configure_deembedding_table_interpolation_nearest
- configure_deembedding_table_interpolation_spline
- configure_digital_edge_script_trigger
- configure_digital_edge_start_trigger
- configure_digital_level_script_trigger
- configure_ref_clock
- configure_rf
- configure_software_script_trigger
- configure_software_start_trigger
- create_deembedding_sparameter_table_array
- create_deembedding_sparameter_table_s2p_file
- delete_all_deembedding_tables
- delete_deembedding_table
- delete_script
- disable_script_trigger
- disable_start_trigger
- error_message
- get_all_named_waveform_names
- get_all_script_names
- get_deembedding_sparameters
- get_error
- get_ext_cal_last_date_and_time
- get_max_settable_power
- get_script
- get_self_cal_last_date_and_time
- get_self_calibration_temperature
- get_terminal_name
- get_waveform_burst_start_locations
- get_waveform_burst_stop_locations
- get_waveform_marker_event_locations
- initiate
- load_configurations_from_file
- lock
- perform_power_search
- perform_thermal_correction
- query_arb_waveform_capabilities
- read_and_download_waveform_from_file_tdms
- reset
- reset_device
- reset_with_defaults
- reset_with_options
- save_configurations_to_file
- select_arb_waveform
- self_cal
- self_calibrate_range
- self_test
- send_software_edge_trigger
- set_arb_waveform_next_write_position
- set_waveform_burst_start_locations
- set_waveform_burst_stop_locations
- set_waveform_marker_event_locations
- unlock
- wait_until_settled
- write_arb_waveform
- write_script
- Properties
- absolute_delay
- ae_temperature
- alc_control
- allow_out_of_specification_user_settings
- amplitude_settling
- amp_path
- analog_modulation_am_sensitivity
- analog_modulation_fm_band
- analog_modulation_fm_narrowband_integrator
- analog_modulation_fm_sensitivity
- analog_modulation_pm_deviation
- analog_modulation_pm_mode
- analog_modulation_pm_sensitivity
- analog_modulation_type
- arb_carrier_frequency
- arb_digital_gain
- arb_max_number_waveforms
- arb_onboard_sample_clock_mode
- arb_pre_filter_gain
- arb_sample_clock_rate
- arb_sample_clock_source
- arb_selected_waveform
- arb_temperature
- arb_waveform_quantum
- arb_waveform_repeat_count
- arb_waveform_repeat_count_is_finite
- arb_waveform_size_max
- arb_waveform_size_min
- arb_waveform_software_scaling_factor
- attenuator_setting
- automatic_thermal_correction
- auto_power_search
- available_paths
- available_ports
- configuration_settled_event_terminal_name
- correction_temperature
- deembedding_compensation_gain
- deembedding_selected_table
- deembedding_type
- device_instantaneous_bandwidth
- device_temperature
- digital_edge_script_trigger_edge
- digital_edge_script_trigger_source
- digital_edge_start_trigger_edge
- digital_edge_start_trigger_source
- digital_equalization_enabled
- digital_level_script_trigger_active_level
- digital_level_script_trigger_source
- direct_download
- done_event_terminal_name
- events_delay
- exported_configuration_settled_event_output_terminal
- exported_done_event_output_terminal
- exported_marker_event_output_terminal
- exported_pulse_modulation_event_active_level
- exported_pulse_modulation_event_output_terminal
- exported_ref_clock_output_terminal
- exported_ref_clock_rate
- exported_script_trigger_output_terminal
- exported_started_event_output_terminal
- exported_start_trigger_output_terminal
- external_calibration_recommended_interval
- external_calibration_temperature
- external_gain
- fast_tuning_option
- fixed_group_delay_across_ports
- fpga_bitfile_path
- fpga_target_name
- fpga_temperature
- frequency
- frequency_settling
- frequency_settling_units
- generation_mode
- group_capabilities
- host_dma_buffer_size
- instrument_firmware_revision
- instrument_manufacturer
- instrument_model
- interpolation_delay
- io_resource_descriptor
- iq_gain_imbalance
- iq_impairment_enabled
- iq_i_offset
- iq_offset_units
- iq_out_port_carrier_frequency
- iq_out_port_common_mode_offset
- iq_out_port_level
- iq_out_port_load_impedance
- iq_out_port_offset
- iq_out_port_temperature
- iq_out_port_terminal_configuration
- iq_q_offset
- iq_rate
- iq_skew
- iq_swap_enabled
- load_configurations_from_file_load_options
- load_configurations_from_file_reset_options
- logical_name
- loop_bandwidth
- lo_frequency
- lo_frequency_step_size
- lo_in_power
- lo_out_enabled
- lo_out_export_configure_from_rfsa
- lo_out_power
- lo_pll_fractional_mode_enabled
- lo_source
- lo_temperature
- lo_vco_frequency_step_size
- marker_event_output_behavior
- marker_event_pulse_width
- marker_event_pulse_width_units
- marker_event_terminal_name
- marker_event_toggle_initial_state
- memory_size
- module_power_consumption
- module_revision
- output_enabled
- output_port
- overflow_error_reporting
- peak_envelope_power
- peak_power_adjustment
- phase_continuity_enabled
- phase_offset
- power_level
- power_level_type
- pulse_modulation_active_level
- pulse_modulation_enabled
- pulse_modulation_mode
- pulse_modulation_source
- ref_clock_rate
- ref_clock_source
- ref_pll_bandwidth
- relative_delay
- rf_blanking_source
- rf_in_lo_export_enabled
- script_trigger_terminal_name
- script_trigger_type
- selected_path
- selected_ports
- selected_script
- self_calibration_temperature
- serial_number
- signal_bandwidth
- specific_driver_class_spec_major_version
- specific_driver_class_spec_minor_version
- specific_driver_description
- specific_driver_prefix
- specific_driver_revision
- specific_driver_vendor
- started_event_terminal_name
- start_trigger_terminal_name
- start_trigger_type
- streaming_enabled
- streaming_space_available_in_waveform
- streaming_waveform_name
- streaming_write_timeout
- supported_instrument_models
- sync_sample_clock_dist_line
- sync_sample_clock_master
- sync_script_trigger_dist_line
- sync_script_trigger_master
- sync_start_trigger_dist_line
- sync_start_trigger_master
- temperature_read_interval
- thermal_correction_headroom_range
- thermal_correction_temperature_resolution
- timer_event_interval
- upconverter_center_frequency
- upconverter_frequency_offset
- upconverter_frequency_offset_mode
- upconverter_gain
- waveform_iq_rate
- waveform_papr
- waveform_rf_blanking
- waveform_runtime_scaling
- waveform_signal_bandwidth
- waveform_waveform_size
- write_waveform_burst_detection
- write_waveform_burst_detection_mode
- write_waveform_burst_detection_power_threshold
- write_waveform_normalization
- yig_main_coil_drive
- NI-TClk Support
- Repeated Capabilities
- Enums
- AllowOutOfSpecificationUserSettings
- AmpPath
- AnalogModulationFmBand
- AnalogModulationFmNarrowbandIntegrator
- AnalogModulationPmMode
- AnalogModulationType
- ArbOnboardSampleClockMode
- ArbSampleClockSource
- AutomaticLevelControl
- AutomaticPowerSearch
- AutomaticThermalCorrection
- DeembeddingType
- DigitalEqualizationEnabled
- DirectDownload
- Format
- FrequencySettlingUnits
- GenerationMode
- IQOutPortTerminalConfiguration
- LoOutExportConfigureFromRfsaEnable
- LoPllFractionalModeEnabled
- LoSource
- LoadConfigurationResetOptions
- LoadOptions
- LoopBandwidth
- MarkerEventOutputBehavior
- MarkerEventPulseWidthUnits
- MarkerEventToggleInitialState
- Module
- OffsetUnits
- OutputPort
- OverflowErrorReporting
- PhaseContinuityEnabled
- PowerLevelType
- PulseModulationMode
- PulseModulationOutputTerminal
- PulseModulationSource
- RFBlanking
- RFInLoExportEnabled
- ReferenceClockExportOutputTerminal
- ReferenceClockSource
- ReferencePllBandwidth
- RelativeTo
- ResetWithOptionsStepsToOmit
- ScriptTriggerDigitalEdgeEdge
- ScriptTriggerDigitalLevelActiveLevel
- ScriptTriggerType
- SelfCalibrateRangeStepsToOmit
- Signal
- SoftwareTriggerType
- SparameterOrientation
- StartTriggerDigitalEdgeEdge
- StartTriggerType
- TriggerIdentifier
- UpconverterFrequencyOffsetMode
- WriteWaveformBurstDetection
- WriteWaveformBurstDetectionMode
- WriteWaveformNormalization
- YigMainCoilDrive
- Exceptions and Warnings
- Examples
- gRPC Support