Connecting to TDS5XX by Tektronix in Python
Instrument Card
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 TDS5XX in Python
OSCILLOSCOPES > TEKTRONIX
PROTOCOLS > SCPI
from instrumentkit import Scope
# Connect to the oscilloscopescope = Scope("TCPIP::192.168.1.1::INSTR")
# Set the timebase and voltage scalescope.timebase = 1e-3 # 1 ms/divscope.channel1.voltage_scale = 0.1 # 0.1 V/div
# Acquire a waveformwaveform = scope.acquire_waveform()
# Print the waveform dataprint(waveform.data)
# Disconnect from the oscilloscopescope.disconnect()
In this example, 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 the oscilloscope using the acquire_waveform
method of the Scope
class. This method returns a Waveform
object that contains the acquired waveform data.
Finally, we print the waveform data using the data
property of the Waveform
class, and disconnect from the oscilloscope using the disconnect
method of the Scope
class.