Connecting to Keysight N5232B by Keysight in Python
Instrument Card
The Keysight N5232B PNA-L series network analyzer is designed for S-parameter and simple nonlinear testing of passive components, amplifiers, and frequency converters. With the same core firmware as the PNA, the PNA-L offers the perfect balance of value and performance. The PNA-L provides efficiency and flexibility in both manufacturing and R&D applications, for industries ranging from mobile-telecomm and wireless-LAN component production to aerospace and defense.
Device Specification: here
Manufacturer card: KEYSIGHT
Keysight Technologies, or Keysight, is an American company that manufactures electronics test and measurement equipment and software
- Headquarters: USA
- Yearly Revenue (millions, USD): 5420
- Vendor Website: here
Connect to the Keysight N5232B in Python
Read our guide for turning Python scripts into Flojoy nodes.
PROTOCOLS > SCPI
from qcodes import Stationfrom qcodes.instrument_drivers.Keysight.Keysight_P9372A import Keysight_P9372A
# Create a station to hold the instrumentsstation = Station()
# Connect to the Keysight N5232B Network Analyzerna = Keysight_P9372A('na', 'TCPIP0::192.168.1.1::inst0::INSTR')station.add_component(na)
# Print the available options on the Network Analyzerprint(na.get_options())
# Set the frequency rangena.start(1e9)na.stop(10e9)
# Set the power rangena._set_power_limits(-30, 10)
# Enable trace averagingna.averages_on()
# Set the number of averagesna.averages(10)
# Set the IF bandwidthna.if_bandwidth(1e3)
# Set the number of points in a sweepna.points(1001)
# Set the electrical delayna.electrical_delay(0)
# Set the sweep mode to continuousna.sweep_mode('CONT')
# Set the trigger source to externalna.trigger_source('EXT')
# Select the active tracena.active_trace(1)
# Run a sweep on the Network Analyzerna.run_sweep()
# Get the data from the active tracedata = na.traces[0].get()
# Print the dataprint(data)
Note: The above code assumes that the IP address of the Keysight N5232B Network Analyzer is 192.168.1.1
. Please replace it with the correct IP address of your instrument.