Skip to content

Connecting to Keysight 8116A by HP in Python

Instrument Card

8116A 50 MHZ PULSE/FUNCTION GENERATOR

Device Specification: here

Manufacturer card: HP

Keysight Technologies, or Keysight, is an American company that manufactures electronics test and measurement equipment and software

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

Connect to the Keysight 8116A in Python

PROTOCOLS > SCPI

from pymeasure.adapters import GPIBAdapter
from pymeasure.instruments.hp import HP8116A
# Connect to the instrument
adapter = GPIBAdapter(address=1)
instrument = HP8116A(adapter)
# Set the frequency to 1 kHz
instrument.frequency = 1e3
# Set the amplitude to 1 V
instrument.amplitude = 1
# Enable the output
instrument.output_enabled = True
# Wait for 5 seconds
import time
time.sleep(5)
# Disable the output
instrument.output_enabled = False
# Disconnect from the instrument
instrument.shutdown()

This script connects to the instrument using a GPIB adapter with address 1. It then sets the frequency to 1 kHz and the amplitude to 1 V. It enables the output, waits for 5 seconds, and then disables the output. Finally, it disconnects from the instrument.