Skip to content

Connecting to Series by Rohdes&Schwarz in Python

Instrument Card

Series

Device Specification: here

Manufacturer card: ROHDES&SCHWARZ

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

PROTOCOLS > SCPI

import qcodes as qc
from qcodes.instrument_drivers.rohde_schwarz.ZNB import ZNB
# Connect to the Series Network Analyzer
znb = ZNB("znb", "TCPIP0::192.168.15.100::inst0::INSTR")
# Print the instrument ID
print(znb.get_idn())
# Turn on the RF output
znb.rf_power(True)
# Set the start and stop frequencies
znb.channels.ch1.start(1e9)
znb.channels.ch1.stop(10e9)
# Set the number of points in the frequency sweep
znb.channels.ch1.npts(1001)
# Perform a frequency sweep and get the magnitude and phase data
data = znb.channels.ch1.trace.get()
# Print the magnitude and phase data
print(data.magnitude)
print(data.phase)
# Turn off the RF output
znb.rf_power(False)
# Close the connection to the instrument
znb.close()

Note: Replace "TCPIP0::192.168.15.100::inst0::INSTR" with the actual address of your Series Network Analyzer.