Prepare the device
1
Connect the Digilent device
Use a data-capable USB cable, then check hardware status. Confirm the device name, serial number, and whether logic analyzer, oscilloscope, and waveform generator instruments are available.
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-neutralla_* helpers automatically. Call those helpers directly; do not import dwfpy.
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.
Record analog channels
Usela_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.
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 withla_wavegen_setup, then start it explicitly:
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.
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.
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. Usetry and finally around driven outputs:
Fix Digilent problems
No device appears
No device appears
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.A channel is out of range
A channel is out of range
Use zero-based indexes and the channel count shown in hardware status. Do not assume every WaveForms device has the Analog Discovery 3 layout.
The analog result is clipped
The analog result is clipped
Increase
range_volts or reduce the signal amplitude. Confirm that the offset keeps the full waveform inside the requested acquisition window.The result opened in the wrong view
The result opened in the wrong view
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.

