Remote Control a DC Power Supply: SCPI, LAN, USB, GPIB

GW Instek GPP-3610H programmable DC power supply with LAN and GPIB options

You control a programmable DC power supply remotely by sending text commands in the SCPI language from a PC over USB, LAN, GPIB or RS-232, and reading back the measured voltage and current. The same commands that set the output on the front panel can be placed in a script, which turns a manual bench check into a repeatable automated test. The interface decides the practical details: cable length, number of instruments and how easily the setup scales.

What is SCPI?

SCPI, which stands for Standard Commands for Programmable Instruments, is a text command language that sits on top of the IEEE-488.2 standard and gives instruments from different manufacturers a common command structure. The consortium released the first version in 1990. A command such as setting a voltage is a short readable string sent to the instrument.

SCPI standardizes the structure of commands and a set of common commands, such as the identification query. The exact commands for setting voltage and current differ between manufacturers and families, so the programming guide of your model is the reference to follow. Rigol, for example, documents SCPI for the DP800 series and provides its Ultra Sigma PC software for sending commands without writing code.

Which interface should you use?

Use USB for a single supply on a single PC, LAN for racks, distance and several instruments, and GPIB when you integrate into an existing GPIB test system. RS-232 is simple but slow. If your supply has several options, choose the one that your test station already uses.

Interface Strengths Limits
USB Simple, no network setup, one cable Short cable length, one PC per instrument link
LAN Long distance, many instruments, shared access Needs network configuration and IP management
GPIB Established in test racks, many instruments on one bus Needs an interface card or adapter and bulky cables
RS-232 Very simple protocol Slow, needs a serial port or adapter

Interface options vary by model and by order variant, and sometimes by option card. The GW Instek GPP-3060LG is listed with USB, LAN and GPIB, the GPP-7250 with LAN and GPIB is a 360 W single-channel supply, and the PFR-100LGP is a 100 W fanless supply with LAN and GPIB. Always compare the exact order code, because the same family exists in several interface variants.

How do you send a first command?

Install a VISA library, find the supply in the resource list, open a session and send the identification query. The supply answers with its manufacturer, model and serial number. If that works, the link is correct and the rest of the commands follow the programming guide.

VISA, the Virtual Instrument Software Architecture, is the standard layer that hides the interface from your code. A minimal example in Python with the PyVISA library looks like this:

import pyvisa
rm = pyvisa.ResourceManager()
inst = rm.open_resource("TCPIP0::192.168.1.50::INSTR")  # LAN example
print(inst.query("*IDN?"))
# next: send the setup commands listed in your model's programming guide

The address string depends on the interface: a USB or GPIB supply has a different resource name, which the VISA tool lists for you. Use the identification query before anything else, and read the error queue after each group of commands.

How do you build a safe automated test sequence?

Set the protection limits first, then the current limit, then the voltage, and only then enable the output. After each step, read back the measured value and check the error queue. End every script with the output off, even when an exception interrupts the run.

  1. Identify the instrument and confirm the model before sending any setting.
  2. Set protection (OVP and OCP) as described in our guide to OVP, OCP and OTP.
  3. Program current limit and voltage within the range of the DUT.
  4. Enable the output and wait for the rail to settle before measuring.
  5. Read back voltage and current from the supply, and log them with a timestamp.
  6. Disable the output in a cleanup block that always runs.

Two details save time in production. Wait for the voltage to settle after each change, because programming speed and load affect how long the rail takes to reach the setpoint. And use the supply readback for quick checks, keeping a multimeter for periodic verification of the measurement chain. Multi-channel supplies add the option of controlling the power-up order of rails, which matters for processors and FPGAs: see multi-channel DC power supplies.

Which supplies are built for automation?

Look for the interface your station uses, a documented SCPI command set, fast programming and readback, and protection functions you can set remotely. Bench models such as the Rigol DP832A are used on both the development bench and in small test stations.

The Rigol DP800 page lists the series features and documentation on the manufacturer site: Rigol DP800 series. For the broader picture of what makes a supply programmable, start from our programmable DC power supply guide.

Frequently asked questions

Can I control a bench power supply with Python?

Yes. With a VISA library such as PyVISA you open the instrument over USB, LAN or GPIB, and send SCPI text commands. The supply must support SCPI, which most programmable bench supplies do. Check the programming guide for the exact command names of your model.

Is LAN better than USB for a power supply?

LAN is better when the supply sits in a rack, far from the PC, or when several users or stations share instruments. USB is simpler for one supply connected to one PC on the same bench.

Do I need GPIB for a new test system?

Not necessarily. GPIB is useful when you extend an existing GPIB rack. For a new station, LAN or USB usually costs less and needs no interface card, as long as your supplies offer those ports.

What should I check first when the supply does not answer?

Check the interface settings on the supply, such as the IP address or the GPIB address, then the resource name in your VISA tool, and finally the termination characters of the commands. Most failures come from one of these three.

ALLdata has distributed test and measurement instrumentation for more than 45 years, and our engineers help teams choose supplies with the right interfaces for their test stations. Browse the full Power Equipment collection or request a quote, and we will confirm the right model and interface variant before you order.