Connecting to HS 9008B by Holzworth in Python
Instrument Card
HS9008B - 8 Channel, 1U RF Synthesizer - Phase Coherent
Device Specification: here
Manufacturer card: HOLZWORTH
Holzworth Instrumentation is a leader in high-performance phase noise analyzers and RF/microwave synthesizers optimized for ultra-low phase noise
- Headquarters: USA
- Yearly Revenue (millions, USD): 3
- Vendor Website: here
Connect to the HS 9008B in Python
Read our guide for turning Python scripts into Flojoy nodes.
PROTOCOLS > SCPI
To connect to a HS 9008B Frequency synthesizer using Instrumentkit, you can use the following Python script:
import instrumentkit as ik
# Connect to the HS 9008B Frequency synthesizerhs = ik.holzworth.HS9000.open_tcpip("192.168.0.2", 8080)
# Access the channels and retrieve their frequencyfor channel in hs.channel: print(channel.frequency)
# Access the channels on the HS 9008Bchannel_1 = hs.channel[0]channel_2 = hs.channel[1]
# Get the frequency of channel 1frequency_1 = channel_1.frequencyprint(f"Frequency of channel 1: {frequency_1}")
# Set the frequency of channel 2 to 1 GHzchannel_2.frequency = 1 * ik.units.GHz
# Get the power of channel 2power_2 = channel_2.powerprint(f"Power of channel 2: {power_2}")
# Turn on the output of channel 1channel_1.output = True
# Check if the HS 9008B is readyis_ready = hs.readyprint(f"Is HS 9008B ready: {is_ready}")
This script imports the instrumentkit
module as ik
and then uses the open_tcpip
method of the HS9000
class to connect to the HS 9008B Frequency synthesizer at the specified IP address and port number.
After connecting, you can access the channels of the synthesizer using the channel
property of the HS9000
object. In the example script, it loops over all the channels and prints their frequencies.
It then performs various operations such as getting and setting the frequency and power of the channels, and turning on the output of a channel. Finally, it checks if the synthesizer is ready for operation.
Note: Make sure to replace "192.168.0.2"
with the actual IP address of your HS 9008B Frequency synthesizer and 8080
with the appropriate port number.