Skip to main content
Drive an analog output voltage into your DUT from a DAC net.

Handle

Methods

Method Reference

name() -> &str

The net name this handle was created with.

set(volts: f64) -> Result<()>

Set the output voltage.
Parameters:

read() -> Result<f64>

Read back the voltage the DAC is currently outputting.
Returns: f64 — the output voltage in volts.
Not every DAC supports readback. On an MCC USB-202 this call fails with Error::Box and the message USB-202 does not support DAC output readback. Where you need a verified output, measure it with an ADC net instead of trusting read() to exist.

Examples

Sweep a reference and check the DUT tracks it

Supported Hardware

Notes

  • Leave the output where the next test expects it. A DAC holds its last value after your test ends; setting it back to 0.0 in teardown is usually right.
  • Output accuracy is the instrument’s, not the API’s. A LabJack T7 asked for 1.0 V reads back around 0.99995 V, which is the DAC’s resolution rather than an error.