Skip to content

Connecting to TDS224 by Tektronix in Python

Instrument Card

The Tektronix TDS224 is a portable four-channel digital scope with 1 GS/s sampling rate and 100 MHz bandwidth.

TDS224

Device Specification: here

Manufacturer card: TEKTRONIX

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 TDS224 in Python

OSCILLOSCOPES > TEKTRONIX

PROTOCOLS > SCPI

from instrumentkit import Scope
# Connect to the oscilloscope
scope = Scope("TCPIP::192.168.1.1::INSTR")
# Set the timebase and voltage scale
scope.timebase = 1e-3 # 1 ms/div
scope.channel1.voltage_scale = 0.1 # 0.1 V/div
# Acquire a waveform
waveform = scope.acquire_waveform(channel=1)
# Print the waveform data
print(waveform.data)
# Disconnect from the oscilloscope
scope.disconnect()

In this script, we first import the Scope class from the instrumentkit module. Then, we create an instance of the Scope class by passing the instrument’s address as a string to the constructor.

Next, we set the timebase and voltage scale of the oscilloscope using the timebase and voltage_scale properties of the Scope and Channel classes, respectively.

We then acquire a waveform from channel 1 using the acquire_waveform method of the Scope class. The acquired waveform is stored in the waveform variable.

Finally, we print the waveform data using the data property of the Waveform class. After that, we disconnect from the oscilloscope using the disconnect method of the Scope class.

Note: Replace "TCPIP::192.168.1.1::INSTR" with the actual IP address or VISA resource string of your TDS224 Oscilloscope.