Connecting to UHFLI by Zurich Instruments in Python
Instrument Card
The Zurich Instruments UHFLI is a digital lock-in amplifier that covers the frequency range from DC to 600 MHz. It offers a time constant of 30 ns for demodulation – resulting in a demodulation bandwidth that exceeds 5 MHz.
Device Specification: here
Manufacturer card: ZURICH INSTRUMENTS
Zurich Instruments Ltd. is a privately owned company developing and selling advanced test and measurement instruments equipped with software for dynamic signal analysis.
- Headquarters: Switzerland
- Yearly Revenue (millions, USD): 38
- Vendor Website: here
Connect to the UHFLI in Python
Read our guide for turning Python scripts into Flojoy nodes.
PROTOCOLS > SCPI
Here is an example Python script that uses Qcodes to connect to a UHFLI Lockin Amplifier:
import qcodes as qcfrom qcodes.instrument_drivers.zhinst import UHFLI
# Connect to the UHFLI Lockin Amplifieruhfli = UHFLI("uhfli", "dev1234")
# Print the available AWG channelsprint(uhfli.awgs.channels)
# Enable the sequencer on AWG channel 0uhfli.awgs[0].enable_sequencer(single=True)
# Wait until the AWG is finisheduhfli.awgs[0].wait_done()
# Compile and load a sequencer programsequencer_program = """ const N = 1000; wave w = ones(N); playWave(w);"""uhfli.awgs[0].compile_sequencer_program(sequencer_program)uhfli.awgs[0].load_sequencer_program(sequencer_program)
# Write waveforms to the waveform memorywaveforms = qc.Waveforms()waveforms["w1"] = [0, 1, 0, -1]waveforms["w2"] = [1, 0, -1, 0]uhfli.awgs[0].write_to_waveform_memory(waveforms)
# Read waveforms from the waveform memoryread_waveforms = uhfli.awgs[0].read_from_waveform_memory()print(read_waveforms)
# Disconnect from the UHFLI Lockin Amplifieruhfli.close()
Note: Replace "dev1234"
with the actual device ID or address of your UHFLI Lockin Amplifier.