Connecting to SCPI multimeter by Generic SCPI in Python
Instrument Card
All SCPI Multimeters
Device Specification: here
Demo: Record voltage over time with an Agilent 34401A multimeter
Connect to the SCPI multimeter in Python
Read our guide for turning Python scripts into Flojoy nodes.
PROTOCOLS > SCPI
To connect to a SCPI multimeter using Instrumentkit, you can use the following code:
import instrumentkit as ik
# Connect to the multimetermultimeter = ik.SCPIMultimeter.open_tcpip("192.168.1.1")
# Set the measurement mode to voltage DCmultimeter.mode = multimeter.Mode.voltage_dc
# Perform a measurementmeasurement = multimeter.measure()
# Print the measurement resultprint(measurement)
This code connects to the multimeter using the open_tcpip
method, sets the measurement mode to voltage DC using the mode
property, performs a measurement using the measure
method, and prints the measurement result.