How lab instrument control works: NI-VISA, SCPI commands, GPIB, USB, and LXI. A clear guide for test engineers, with Python examples and alternatives.

If you automate a lab bench, you will run into three acronyms fast: VISA, SCPI, and GPIB. Together they are how software talks to instruments. This guide explains what each does, how National Instruments VISA fits in, and how the whole instrument-control stack works.
VISA (Virtual Instrument Software Architecture) is a standard API for communicating with instruments, no matter how they are physically connected. NI-VISA is National Instruments' widely used implementation of that standard. When you search "ni visa" or "national instruments visa," this is the driver layer that lets your code open a connection to an instrument over GPIB, USB, serial, or Ethernet without caring about the wiring underneath.
Once connected, you need to tell the instrument what to do. SCPI (Standard Commands for Programmable Instruments) is a standardized text command set. For example:
*IDN? asks the instrument to identify itself.MEASure:VOLTage:DC? asks a meter for a DC voltage reading.Because SCPI is standardized, similar instruments from different vendors often accept similar commands.
VISA sits on top of all of these, so your code stays mostly the same regardless of connection.
import pyvisa
rm = pyvisa.ResourceManager() # VISA layer
inst = rm.open_resource("GPIB0::5::INSTR")
print(inst.query("*IDN?")) # SCPI command over GPIBThat is the whole stack in four lines: VISA opens the link, SCPI carries the commands. The same idea applies whether you drive it from Python, LabVIEW, or C.
VISA and SCPI are powerful but low-level. You still write and maintain the connection logic, command strings, error handling, and sequencing for every instrument, and SCPI dialects vary enough between vendors to cause headaches. As benches grow, this becomes a real maintenance burden. See DAQ with Python for the hands-on version of this work.
TestFlow's ATOMS is a vendor-agnostic scripting layer that abstracts away the per-instrument VISA and SCPI details, so you describe the measurement once instead of hand-coding command strings for each device. Combined with AI-generated validation plans, it removes most of the boilerplate that instrument control normally requires. The free version lets you see how it compares to a raw VISA/SCPI setup.
What is the difference between VISA and SCPI? VISA is the connection API (how you reach the instrument). SCPI is the command language (what you tell it). They work together.
Is NI-VISA free? NI-VISA is available as a free driver download from NI. It is commonly used with both LabVIEW and Python.
What is GPIB used for? GPIB (IEEE-488) is a bus for connecting and controlling lab instruments. VISA can communicate over GPIB, USB, serial, and Ethernet.
Connect your instruments, describe a test in plain English, and TestFlow builds and runs it in minutes.
Experience the next generation of hardware validation. Run automated test sequences, capture clean data, and accelerate your time-to-market.