Connecting to SR830 by Stanford Research Systems in Python
Instrument Card
SR830 Lock-In Amplifier provide high performance at a reasonable cost. The SR830 simultaneously displays the magnitude and phase of a signal,
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 SR830 in Python
Read our guide for turning Python scripts into Flojoy nodes.
PROTOCOLS > SCPI
To connect to a SR830 Lock-in Amplifier using Qcodes, you can use the following Python script:
import qcodes as qcfrom qcodes.instrument_drivers.stanford_research.SR830 import SR830
# Create an instance of the SR830 instrumentlockin = SR830('lockin', 'TCPIP::192.168.1.1::INSTR')
# Connect to the instrumentlockin.connect()
# Print the instrument IDprint(lockin.IDN())
# Set the frequency to 1 kHzlockin.frequency(1000)
# Set the sensitivity to 10 mVlockin.sensitivity(0.01)
# Enable the front panellockin.enable_front_panel()
# Read the X and Y valuesx = lockin.X()y = lockin.Y()
# Print the X and Y valuesprint(f'X: {x}, Y: {y}')
# Disconnect from the instrumentlockin.disconnect()
This script creates an instance of the SR830
instrument and connects to it using the specified address (TCPIP::192.168.1.1::INSTR
). It then sets the frequency and sensitivity of the lock-in amplifier, enables the front panel, and reads the X and Y values. Finally, it disconnects from the instrument.
Note: Replace 'TCPIP::192.168.1.1::INSTR'
with the actual address of your SR830 Lock-in Amplifier.