Connecting to SG384 by Stanford Research Systems in Python
Instrument Card
The SG380 Series RF Signal Generators use a unique, innovative architecture (Rational Approximation Frequency Synthesis) to deliver ultra-high frequency resolution (1 µHz), excellent phase noise, and versatile modulation capabilities (AM, FM, ØM, pulse modulation and sweeps) at a fraction of the cost of competing designs. The standard models produce sine waves from DC to 2.025 GHz (SG382), 4.05 GHz (SG384) and 6.075 GHz (SG386).
Device Specification: here
Manufacturer card: STANFORD RESEARCH SYSTEMS
Stanford Research Systems is a maker of general test and measurement instruments. The company was founded in 1980, is privately held, and is not affiliated with Stanford University.
- Headquarters: USA
- Yearly Revenue (millions, USD): 25
- Vendor Website: here
Connect to the SG384 in Python
Read our guide for turning Python scripts into Flojoy nodes.
PROTOCOLS > SCPI
from qcodes.instrument_drivers.stanford_research.SG384 import SG384
# Connect to the SG384 RF Signal Generatorsg = SG384('sg', 'TCPIP0::192.168.1.1::inst0::INSTR')
# Set the frequency to 1 MHzsg.frequency(1e6)
# Get the current frequencyfrequency = sg.frequency()print(frequency)
# Set the amplitude of the BNC output to -10 dBmsg.amplitude_LF(-10)
# Get the current amplitude of the BNC outputamplitude = sg.amplitude_LF()print(amplitude)
# Enable the RF outputsg.enable_RF('ON')
# Disable the BNC outputsg.enable_LF('OFF')
# Close the connection to the SG384 RF Signal Generatorsg.close()
This script connects to the SG384 RF Signal Generator using the IP address ‘192.168.1.1’. It sets the frequency to 1 MHz, gets the current frequency, sets the amplitude of the BNC output to -10 dBm, gets the current amplitude of the BNC output, enables the RF output, disables the BNC output, and finally closes the connection to the SG384 RF Signal Generator.