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 that the DAC currently outputs.
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.
A LabJack U3 has no readback either. The box returns the last value that it set,
and the call fails when the box has no value. 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. A LabJack U3
refuses 0.0, because its range is 0.04 V to 4.95 V. On a U3, use 0.04.
- 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.