Skip to content

Connecting to DPO70000 by Tektronix in Python

Instrument Card

The MSO/DPO70000 Series oscilloscope delivers exceptional signal acquisition performance and analysis capability. Discover your real signals and capture more signal details with the industry’s highest waveform capture capability. Automate setup, acquisition and analysis of high-speed serial data signals with a toolset engineered to deliver faster design and compliance testing.

Device Specification: here

Manufacturer card: TEKTRONIX

Tektronix, Inc., historically widely known as Tek, is an American company best known for manufacturing test and measurement devices such as oscilloscopes, logic analyzers, and video and mobile test protocol equipment.

  • Headquarters: USA
  • Yearly Revenue (millions, USD): 5800
  • Vendor Website: here

Demo: Measure signal width and phase with a Tektronix oscilloscope

Connect to the DPO70000 in Python

OSCILLOSCOPES > TEKTRONIX

PROTOCOLS > SCPI

Here is an example Python script that uses Qcodes to connect to a DPO70000 Oscilloscope:

import qcodes as qc
from qcodes.instrument_drivers.tektronix.Tektronix_DPO7000xx import TektronixDPO7000xx
# Connect to the oscilloscope
oscilloscope = TektronixDPO7000xx("oscilloscope", "TCPIP::1.2.3.4::INSTR")
# Print the available channels
print(oscilloscope.channel.names)
# Set the time per division for channel 1
oscilloscope.channel1.scale(0.1)
# Set the trigger type to edge and the source to channel 1
oscilloscope.trigger.type("edge")
oscilloscope.trigger.source("CH1")
# Arm the trigger and wait for a trigger event
oscilloscope.trigger.state(1)
oscilloscope.trigger.wait_for_trigger()
# Get the waveform data from channel 1
waveform = oscilloscope.channel1.waveform()
# Plot the waveform
import matplotlib.pyplot as plt
plt.plot(waveform.trace_axis(), waveform.trace())
plt.xlabel(waveform.trace_axis().label)
plt.ylabel(waveform.trace().label)
plt.show()
# Disconnect from the oscilloscope
oscilloscope.close()

This script connects to the oscilloscope using the IP address “1.2.3.4” (replace with the actual IP address of your oscilloscope). It then sets the time per division for channel 1 to 0.1 seconds and configures the trigger type to edge with the source as channel 1. It arms the trigger and waits for a trigger event. After the trigger event, it retrieves the waveform data from channel 1 and plots it using matplotlib. Finally, it disconnects from the oscilloscope.