Skip to content

Connecting to RFSG by National Instruments in Python

Instrument Card

RFSG

Device Specification: here

Manufacturer card: NATIONAL INSTRUMENTS

NATIONAL INSTRUMENTS

A producer of automated test equipment and virtual instrumentation software. Common applications include data acquisition, instrument control and machine vision.

  • Headquarters: Austin, Texas, USA
  • Yearly Revenue (millions, USD): 1657
  • Vendor Website: here

Connect to the RFSG in Python

PROTOCOLS > SCPI

Here is an example Python script that uses Qcodes Community to connect to a RFSG RF Signal Generator:

import qcodes as qc
from qcodes_contrib_drivers.drivers.NationalInstruments.NIRFSG import NI_RFSG
# Connect to the RF Signal Generator
rfsg = NI_RFSG("rfsg", "PXI1Slot2")
# Print the IDN information
print(rfsg.get_idn())
# Set the frequency and power level
rfsg.frequency(1e9) # 1 GHz
rfsg.power_level(-10) # -10 dBm
# Enable the RF output
rfsg.output_enabled(True)
# Close the connection
rfsg.close()

Note: Make sure you have installed the qcodes_contrib_drivers package before running this script.