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
Read our guide for turning Python scripts into Flojoy nodes.
PROTOCOLS > SCPI
from pymeasure.adapters import GPIBAdapterfrom pymeasure.instruments.hp import HP8116A
# Connect to the instrumentadapter = GPIBAdapter(address=1)instrument = HP8116A(adapter)
# Set the frequency to 1 kHzinstrument.frequency = 1e3
# Set the amplitude to 1 Vinstrument.amplitude = 1
# Enable the outputinstrument.output_enabled = True
# Wait for 5 secondsimport timetime.sleep(5)
# Disable the outputinstrument.output_enabled = False
# Disconnect from the instrumentinstrument.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.