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.
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
Connect to the AFG3152C in Python
Read our guide for turning Python scripts into Flojoy nodes.
PROTOCOLS > SCPI
from pymeasure.adapters import VISAAdapterfrom pymeasure.instruments import AFG3152C
# Create a VISA adapter and connect to the instrumentadapter = VISAAdapter("GPIB::1")afg = AFG3152C(adapter)
# Reset the instrument to default settingsafg.reset()
# Set the shape of channel 1 to sinusoidalafg.ch1.shape = "sinusoidal"
# Set the unit of channel 1 to VPPafg.ch1.unit = "VPP"
# Set the amplitude of channel 1 to 1 VPPafg.ch1.amp_vpp = 1
# Set the frequency of channel 1 to 1 KHzafg.ch1.frequency = 1e3
# Enable the output of channel 1afg.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.