Skip to main content
Embedder integrates Digilent WaveForms instruments through one provider. A compatible device can expose a logic analyzer, analog inputs, waveform outputs, or adjustable supply rails. hardware_status reports each instrument separately, so support for one instrument does not imply that every instrument is present. The shipped workflow is hardware-verified with Analog Discovery 3. Other WaveForms devices are selected by the capabilities they report at runtime.

Prepare the device

1

Connect the Digilent device

Use a data-capable USB cable, then run hardware_status. Check the Digilent provider’s device name, serial number, and logicAnalyzer, oscilloscope, and waveformGenerator capability results.
2

Prepare the runtime

Approve the managed WaveForms runtime when the host does not already provide one. Approve dwfpy in Embedder’s isolated Python environment on first use.
3

Close competing sessions

Close another application or script that owns the device before retrying a failed connection.
4

Map physical channels

Digilent helpers use zero-based channel indexes. For example, Analog Discovery 3 exposes digital indexes 0 through 15; analog input channel 0 is Channel 1.

Use the public script surface

Hardware scripts receive the provider-neutral la_* helpers automatically. Call those helpers directly; do not import dwfpy and do not call the provider’s internal digilent_* functions. This keeps the digital-capture portion of a script portable across analyzer providers. Provider-specific capabilities and limits still apply.

Capture and decode digital signals

Digilent supports timed and manual digital captures, edge or level triggers, raw CSV, decoded CSV, and .dwf3.json capture bundles. The built-in decoders cover UART, SPI, I2C, CAN, LIN, 1-Wire, Manchester, JTAG, SWD, Modbus, and I2S/PCM.
Analog Discovery 3 has a fixed digital threshold. digital_threshold_volts is validated so a generic script remains portable, but it does not change that device’s threshold. See Logic analyzer for capture, trigger, decoder, and export details.

Record analog channels

Use la_record_analog to sample analog inputs and publish the result to the Monitor’s Power tab:
range_volts is the expected positive or negative peak. A value of 5.0 requests a ±5 V acquisition window. Use the returned sample rate and sample count in calculations because the device can quantize or limit the request.
Digilent analog captures use the Power tab’s multi-channel time-series format. They do not appear in the Oscilloscope tab used by the Siglent and PicoScope providers.
Pass publish=False when you need to transform a capture first, then call la_publish_power(capture) to publish it later.

Generate a stimulus

Configure a supported waveform output with la_wavegen_setup, then start it explicitly:
The public helpers support DC, sine, square, triangle, ramps, noise, pulse, trapezium, sine-power, and normalized custom samples when the selected device exposes them. la_wavegen_dc and la_wavegen_pulse combine common setup and start operations. Always stop generated outputs in cleanup:

Control and monitor supply rails

On a device with supported supplies, la_psu_setup changes only the rails you specify. Passing None leaves a rail unchanged, while 0 disables it.
For Analog Discovery 3, the positive rail range is 0 to +5 V and the negative rail range is -5 to 0 V. la_psu_status reads the available voltage, current, and temperature values. la_psu_monitor polls those values and publishes a time series to the Power tab.
Confirm the target’s voltage, polarity, current demand, grounding, and external-power state before enabling a rail or waveform output. A successful API call does not prove the wiring is safe.

Coordinate combined measurements

Logic, analog input, waveform output, and supplies share the same Digilent device lease. Put a stimulus and its response capture in one hardware script so another session cannot reconfigure the device between steps. Use try and finally around driven outputs:

Fix Digilent problems

Refresh hardware_status, check the USB cable, and close software that may own the device. Verify that the WaveForms runtime and dwfpy setup completed successfully.
Read the per-device capability result. Embedder discovers logic, analog input, and waveform output independently; choose a device that exposes the instrument used by the script.
Use zero-based indexes and the channel count reported by hardware_status. Do not assume every WaveForms device has the Analog Discovery 3 layout.
Increase range_volts or reduce the signal amplitude. Confirm that the offset keeps the full waveform inside the requested acquisition window.
Digital captures publish to Logic. Analog input and supply-monitor captures publish to Power. Use Siglent or PicoScope for the Monitor’s Oscilloscope view.

Logic analyzer

Configure digital capture, triggers, decoders, and exports.

Power analyzers

Compare dedicated current and energy measurement paths.
Last modified on August 24, 2026