Skip to content

Connecting to DG645 by Stanford Research Systems in Python

Instrument Card

The DG645 is a versatile digital delay/pulse generator that provides precisely defined pulses at repetition rates up to 10 MHz. The instrument offers several improvements over older designs—lower jitter, higher accuracy, faster trigger rates, and more outputs. The DG645 also has Ethernet, GPIB and RS-232 interfaces for computer or network control of the instrument.

DG645

Device Specification: here

Manufacturer card: STANFORD RESEARCH SYSTEMS

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. Stanford Research Systems manufactures all of their products at their Sunnyvale, California facility.

  • Headquarters: Sunnyvale, California
  • Yearly Revenue (millions, USD): 24.9
  • Vendor Website: here

Connect to the DG645 in Python

PROTOCOLS > SCPI

To connect to a DG645 Pulse Generator using Instrumentkit, you can use the following code:

import instrumentkit as ik
# Connect to the DG645 Pulse Generator
dg645 = ik.srs.SRSDG645.open_gpibusb('/dev/ttyUSB0', 1)
# Example usage
dg645.channel[dg645.Channels.A].delay = (dg645.channel[dg645.Channels.T0], 10 * ik.units.ns)
dg645.output[dg645.Outputs.AB].level_amplitude = 4.0 * ik.units.V
# Close the connection
dg645.close()

This code imports the instrumentkit module and opens a connection to the DG645 Pulse Generator using the open_gpibusb method of the SRSDG645 class. The first argument is the device path ('/dev/ttyUSB0') and the second argument is the GPIB address (1).

After connecting, you can access the channels and outputs of the DG645 Pulse Generator using the channel and output properties. In the example usage, it sets the delay of channel A to 10 nanoseconds relative to channel T0 and sets the amplitude of output AB to 4.0 volts.