Connecting to Series by Rohdes&Schwarz in Python
Instrument Card
Device Specification: here
Manufacturer card: ROHDES&SCHWARZ
Rohde & Schwarz GmbH & Co KG is an international electronics group specializing in the fields of electronic test equipment, broadcast & media, cybersecurity, radiomonitoring and radiolocation, and radiocommunication.
- Headquarters: Munich, Germany
- Yearly Revenue (millions, USD): 2500
- Vendor Website: here
Connect to the Series in Python
Read our guide for turning Python scripts into Flojoy nodes.
PROTOCOLS > SCPI
import qcodes as qcfrom qcodes.instrument_drivers.rohde_schwarz.ZNB import ZNB
# Connect to the Series Network Analyzerznb = ZNB("znb", "TCPIP0::192.168.15.100::inst0::INSTR")
# Print the instrument IDprint(znb.get_idn())
# Turn on the RF outputznb.rf_power(True)
# Set the start and stop frequenciesznb.channels.ch1.start(1e9)znb.channels.ch1.stop(10e9)
# Set the number of points in the frequency sweepznb.channels.ch1.npts(1001)
# Perform a frequency sweep and get the magnitude and phase datadata = znb.channels.ch1.trace.get()
# Print the magnitude and phase dataprint(data.magnitude)print(data.phase)
# Turn off the RF outputznb.rf_power(False)
# Close the connection to the instrumentznb.close()
Note: Replace "TCPIP0::192.168.15.100::inst0::INSTR"
with the actual address of your Series Network Analyzer.