Watch an instrument respond to SCPI commands
Enable output over TCP and open Attributes in SPX. Plot voltage_out_v to see the simulated waveform. The example uses 0.2 Hz, 6 Vpp and 100 ms chart sampling so you can follow several cycles.
Match commands to instrument settings and measurements
Open Communication to find the ASCII adapter and its TCP port. The model assigns each command its behavior. In the WaveLab example, SOUR:FREQ updates the frequency, SOUR:VOLT sets the peak-to-peak amplitude and MEAS:VOLT? reads the instantaneous simulated voltage.

Show the SCPI command bindings in YAML
Excerpt from the custom WaveLab generator. The adapter screenshot above shows the library multimeter.
mappings:
"SOUR:FREQ {frequency}":
name: set_frequency
response: null
"#attr(k__frequency_hz)": "frequency"
"MEAS:VOLT?":
name: query_instantaneous_voltage
response: "#out(voltage_out_v)"
Check command replies against the waveform
Use LF to end each TCP command. In SPX UI, open Communication → ascii → bindings, select View Logs for query_frequency and expand the outbound reply. Here, the client sent SOUR:FREQ? and received 0.2 Hz.

Try a ready-made multimeter
Connect to a library multimeter over TCP, identify it with SCPI and read simulated DC voltage.
Test your software with a virtual instrument
Connect your instrument-control software to a simulated device. Send supported SCPI commands over TCP, read the replies and observe the simulated output in SPX UI.
SCPI over TCP
Connect your test software to a virtual instrument
Your software
SCPI client
Send commands and read instrument replies.
SPX · ASCII adapter
Command bindings
Map supported commands to model attributes.
SPX · runtime
Virtual instrument
Computes simulated outputs and measurements.
Install SPX with ASCII/SCPI support and SPX UI. The ASCII adapter listens on a TCP port and maps the commands defined by the model to its attributes. Use an address and port reachable from your client; a Docker host mapping can differ from the port inside SPX.
Create a virtual function generator with your AI agent
An AI agent can create a model of a function generator with a numeric waveform and a small, explicit SCPI command set. The example below represents a fictional device, not a promise of compatibility with a particular manufacturer's instrument.
Open your SPX workspace in a local AI agent and give it this prompt:
Prompt for your AI agent
Create a new local custom SPX model for a fictional laboratory function generator, `SPX WaveLab WG-2`, with model ID `custom.lab_waveform_generator_wg2_scpi` and instance key `article_waveform_generator_wg2_demo`. Make it distinct from the SIGLENT DMM and existing generic bench supply. Implement only this documented custom SCPI subset over TCP: `*IDN?`, `SOUR:FREQ <Hz>` / `SOUR:FREQ?`, `SOUR:VOLT <Vpp>` / `SOUR:VOLT?`, `OUTP ON|OFF` / `OUTP?`, `MEAS:VOLT?`, and `SYST:ERR?`. Generate numeric sinusoidal `voltage_out_v` telemetry from amplitude, frequency and elapsed simulation time while output is on; report zero while off, with finite bounded defaults and correct units so the value can be charted. Identify the instrument as fictional; make no claim of compatibility with a physical vendor device or full SCPI. Validate the model, register it, then wait until a runtime instance slot is available before creating/starting the single requested instance. Leave that instance running for a screenshot. Prove the implementation using actual TCP SCPI exchanges against the live listener: query ID, set/query frequency and amplitude, enable output, read numeric voltage at multiple times and show that it changes, disable output and verify zero, query `SYST:ERR?`. Report actual host/port, commands/replies, instance key/state, and exact tested scope. Do not modify the website or alter/remove any existing instance or workspace artifact.
Tested with GPT-6 Luna · Medium
Estimated API cost · $0.0276 per run
We tested this prompt with GPT-6 Luna · Medium. The agent created and validated a custom model, corrected its waveform expression after a runtime fault, and verified the final version over TCP. Download the tested YAML. The estimate on the card covers a separate run that corrected unsupported attribute bounds and then verified the full command subset over TCP. Check the bindings and measured replies for each new model.
Connect and observe
In our example, the implemented commands are:
| Command | Purpose |
|---|---|
*IDN? | Read the fictional instrument identity. |
SOUR:FREQ <Hz> / SOUR:FREQ? | Set and query the frequency. |
SOUR:VOLT <Vpp> / SOUR:VOLT? | Set and query peak-to-peak amplitude. |
OUTP ON, OUTP OFF, OUTP? | Enable, disable and query output. |
MEAS:VOLT?, SYST:ERR? | Read instantaneous simulated voltage and the example error status. |
Connect to the reachable TCP endpoint and terminate commands with LF (\n). In this model, write commands do not return a reply; query the setting separately to verify it. In our test, SOUR:FREQ? returned 0.2 Hz, SOUR:VOLT? returned 6.0 Vpp, and repeated MEAS:VOLT? queries returned changing finite values. After OUTP OFF, a settled reading returned 0.0 V; allow a simulation update before querying.
The plotted signal depends on the model update and chart sampling rates. The model bounds the waveform calculation to 0.01–1000 Hz and 0–20 Vpp, but does not validate incoming values against those bounds. SYST:ERR? is a fixed example response, not a complete SCPI error queue. This is a limited fictional simulation, not a physical signal generator or full SCPI implementation.
See the ASCII adapter guide for connection and command-mapping details.

