TUTORIAL

SCPI Programming for Triple Output DC Power Supplies

Unlock the full potential of your lab equipment. Learn how to control your programmable triple output DC power supply using Python, SCPI commands, and PyVISA for Automated Test Equipment (ATE) integration.

What is SCPI?

SCPI (Standard Commands for Programmable Instruments) is the industry-standard, text-based language used to control test and measurement equipment. Whether you are using an oscilloscope, a digital multimeter, or a programmable triple output DC power supply, SCPI provides a unified syntax for automation.

Premium bench power supplies feature communication interfaces such as USB, LAN (LXI compliant), or legacy GPIB. By sending SCPI strings over these interfaces, engineers can automate repetitive testing, log data over long periods, and simulate complex power environments without touching the front panel.

Migrating from Legacy Equipment?

If you are searching for the E3631A triple output dc power supply user's guide to understand its SCPI commands, you'll be pleased to know that modern programmable supplies (like the eTM-DM series) often maintain high compatibility with legacy Agilent/Keysight command sets. This allows you to upgrade your hardware without rewriting thousands of lines of legacy ATE code.

Python Automation Example (Using PyVISA)

Python has become the dominant language for hardware automation. Using the PyVISA library, you can easily establish a connection to your triple output DC power supply and script complex test sequences, such as voltage sweeps, margin testing, or battery discharge simulations.

automate_power_supply.py
import pyvisaimport time# 1. Initialize the Resource Manager and connect to the power supply# Replace with your instrument's actual IP address or USB VISA resource stringrm = pyvisa.ResourceManager() psu = rm.open_resource('TCPIP0::192.168.1.100::INSTR')# 2. Identify the instrument to ensure connectionidn = psu.query('*IDN?') print(f"Connected to: {idn}")# 3. Configure Channel 1 (e.g., 12V output, 2A current limit)psu.write('INSTrument CH1') psu.write('VOLTage 12.0') psu.write('CURRent 2.0')# 4. Turn on the outputpsu.write('OUTPut ON') print("Power supply output enabled.")# 5. Wait for the circuit to stabilize, then measure actual current drawtime.sleep(2) actual_current = psu.query('MEASure:CURRent?') print(f"Actual Current draw: {actual_current} A")# 6. Safely turn off the output and close the connectionpsu.write('OUTPut OFF') psu.close()

Essential SCPI Commands for Triple Output Supplies

While exact syntax can vary slightly between manufacturers (always consult your specific programming manual), these are the most common SCPI commands used for multi-channel power supplies:

  • OUTPut:TRACking <mode>Configures the internal relays to set the power supply to INDEPendent, SERIES, or PARALLEL mode. Crucial for automated bipolar or high-current testing.
  • VOLTage:PROTection <value>Sets the hardware Over-Voltage Protection (OVP) trip level. Always script this before turning the output ON to protect your Device Under Test (DUT).
  • MEASure:VOLTage:ALL?A highly efficient command that reads back the actual measured voltage of all 3 channels simultaneously, reducing communication latency over the bus.
  • APPLy CH2, 5.0, 1.0A shorthand command to simultaneously select a channel, set the voltage (5.0V), and set the current limit (1.0A) in a single string.

Frequently Asked Questions (FAQ)

Do I need special drivers to use SCPI via USB?

Most modern programmable triple output DC power supplies support USBTMC (USB Test and Measurement Class). If you install NI-VISA or Keysight IO Libraries, the USBTMC driver is usually included, allowing PyVISA to communicate with the instrument seamlessly without custom serial drivers.

What is LXI and why is it important for LAN connections?

LXI (LAN eXtensions for Instrumentation) is a standard that ensures test equipment behaves predictably over Ethernet. An LXI-compliant power supply will have a built-in web interface and support standard discovery protocols (mDNS/VXI-11), making it much easier to connect to via Python compared to raw raw TCP sockets.

Can I log data directly from the power supply?

Yes. By placing the MEASure:VOLTage? and MEASure:CURRent? commands inside a Python while loop with a time delay, you can easily create a custom data logger that saves the power consumption profile of your device to a CSV file over hours or days.

Build Your Automated Test Rack

Our programmable power supplies come standard with USB and LAN interfaces, fully compliant with SCPI and LXI standards for seamless ATE integration.

Check Online Stock & Pricing