Skip to content

Connecting to AFG3152C by Tektronix in Python

Instrument Card

Users can choose from 12 different standard waveforms. Arbitrary waveforms can be generated up to 128 K in length at high sampling rates. On pulse waveforms, leading and trailing edge time can be set independently. External signals can be connected and added to the output signal. Dual-channel models can generate two identical or completely different signals. All instruments feature a highly stable time base with only ±1 ppm drift per year.

AFG3152C

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 oscilloscopeslogic analyzers, and video and mobile test protocol equipment.

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

Connect to the AFG3152C in Python

PROTOCOLS > SCPI

from pymeasure.adapters import VISAAdapter
from pymeasure.instruments import AFG3152C
# Create a VISA adapter and connect to the instrument
adapter = VISAAdapter("GPIB::1")
afg = AFG3152C(adapter)
# Reset the instrument to default settings
afg.reset()
# Set the shape of channel 1 to sinusoidal
afg.ch1.shape = "sinusoidal"
# Set the unit of channel 1 to VPP
afg.ch1.unit = "VPP"
# Set the amplitude of channel 1 to 1 VPP
afg.ch1.amp_vpp = 1
# Set the frequency of channel 1 to 1 KHz
afg.ch1.frequency = 1e3
# Enable the output of channel 1
afg.ch1.enable()

This script connects to the AFG3152C function generator using a VISA adapter and sets the properties of channel 1 to generate a sinusoidal waveform with an amplitude of 1 VPP and a frequency of 1 KHz. Finally, it enables the output of channel 1.