First Measurement
This tutorial takes you from a connected bridge to a real voltage reading on a multimeter. You will identify an instrument, configure it for DC voltage measurement, capture a reading, and return the instrument to front panel control when you are done.
Prerequisites
Section titled “Prerequisites”Before starting this tutorial, make sure you have completed the Getting Started tutorial. You should have:
- mcgpib installed and registered with Claude Code
- A bridge configured and connectable
- At least one multimeter on the GPIB bus (this tutorial uses a Keithley 2000, but the commands work with any IEEE 488.2 / SCPI multimeter like the HP 34401A, Keithley 2010, or Agilent 34461A)
Identify your instrument
Section titled “Identify your instrument”Start a Claude Code session and connect to your bridge if it is not already connected.
-
Connect and identify
> Connect to bench-a and identify the instrument at address 5Behind the scenes, Claude calls two tools:
connect_bridge("bench-a")— opens the serial connection and initializes the bridgeinstrument_identify("bench-a", 5)— sends*IDN?to address 5
The response shows the parsed identification:
Address 5 on bench-a:Manufacturer: KEITHLEY INSTRUMENTS INC.Model: 2000Serial: 1234567Firmware: A04 /A02Raw: KEITHLEY INSTRUMENTS INC.,2000,1234567,A04 /A02The
*IDN?response follows the IEEE 488.2 standard format: four comma-separated fields for manufacturer, model, serial number, and firmware version. This tells you exactly what you are talking to and which command set it supports.
Configure the measurement
Section titled “Configure the measurement”SCPI instruments separate configuration from triggering. First you tell the instrument what to measure, then you tell it to take the measurement.
-
Set up for DC voltage
> Configure the Keithley 2000 at address 5 for DC voltage measurementClaude calls
instrument_write("bench-a", 5, "CONF:VOLT:DC"):Sent to address 5: CONF:VOLT:DCThe
CONF:VOLT:DCcommand tells the multimeter to measure DC voltage with auto-ranging and default resolution. The instrument switches its display to the DC voltage function if it was on a different measurement mode. -
Verify the configuration (optional)
To confirm the instrument accepted the configuration:
> What function is the Keithley set to?Claude calls
instrument_query("bench-a", 5, "CONF?"):"VOLT:DC +1.000000E+01,+1.000000E-06"This confirms DC voltage mode on the 10V range with 1uV resolution (the auto-selected defaults for the Keithley 2000).
Take a reading
Section titled “Take a reading”-
Read the measurement
> Read the DC voltage on the KeithleyClaude calls
instrument_query("bench-a", 5, "READ?"):+3.29847E+00That is 3.29847 volts DC. The
READ?command triggers a new measurement and returns the result in a single operation. -
Understanding the response format
SCPI instruments return numbers in scientific notation:
+3.29847E+00means 3.29847 x 10^0, which is 3.29847. Some common patterns:Response Value +3.29847E+003.29847 V +1.20000E-031.2 mV (0.0012 V) -5.67890E+01-56.789 V +9.90000E+37Overload (out of range) The
+9.9E+37value is a special sentinel that means the input exceeds the selected range. If you see this, either the signal is too large for the current range or nothing is connected to the input terminals. -
Take multiple readings
For a quick series of measurements, you can ask Claude directly:
> Take 5 DC voltage readings from the Keithley, one second apartClaude will call
instrument_query("bench-a", 5, "READ?")five times, pausing between each. A typical conversation might look like:Reading 1: +3.29847E+00 (3.298 V)Reading 2: +3.29851E+00 (3.299 V)Reading 3: +3.29849E+00 (3.298 V)Reading 4: +3.29853E+00 (3.299 V)Reading 5: +3.29846E+00 (3.298 V)Average: 3.29849 V, Std Dev: 0.000028 VThe readings are stable to within ~30 uV.The LLM handles the arithmetic and interpretation. You asked a plain question and got a plain answer — that is the point.
Clean up
Section titled “Clean up”When you are finished taking measurements, return the instrument to local (front panel) control. Without this step, the instrument stays in remote mode and the front panel buttons are locked out.
> Return the Keithley to local controlClaude calls instrument_local("bench-a", 5):
Instrument at address 5 returned to local controlThe instrument’s front panel is active again. The “RMT” indicator (if the instrument has one) turns off.
Try other measurements
Section titled “Try other measurements”The same pattern — configure, read, clean up — works for any measurement function. Here are quick examples for common types.
> Configure the Keithley for AC voltage and take a readingTools called:
instrument_write("bench-a", 5, "CONF:VOLT:AC")instrument_query("bench-a", 5, "READ?")
Sent to address 5: CONF:VOLT:AC+1.20345E+02120.345 VAC — typical mains voltage.
> Measure resistance on the Keithley at address 5Tools called:
instrument_write("bench-a", 5, "CONF:RES")instrument_query("bench-a", 5, "READ?")
Sent to address 5: CONF:RES+9.98700E+02998.7 ohms — close to a 1k resistor.
For 4-wire (Kelvin) resistance measurement, which eliminates lead resistance:
instrument_write("bench-a", 5, "CONF:FRES")
> Measure the frequency of the signal on the KeithleyTools called:
instrument_write("bench-a", 5, "CONF:FREQ")instrument_query("bench-a", 5, "READ?")
Sent to address 5: CONF:FREQ+1.00002E+031000.02 Hz — a 1 kHz test signal.
> Measure DC current on the KeithleyTools called:
instrument_write("bench-a", 5, "CONF:CURR:DC")instrument_query("bench-a", 5, "READ?")
Sent to address 5: CONF:CURR:DC+2.50100E-01251.0 mA DC. Make sure the test leads are connected to the current input terminals, not the voltage terminals, before running this measurement.
What is next
Section titled “What is next”- Multi-Bridge Setup — connect to multiple bridges for cross-bus workflows
- Bus Operations Reference — serial polling, SRQ handling, and bus triggers
- Instrument Tools Reference — full details on query, write, reset, and remote control