Skip to main content
Control DAC (Digital-to-Analog Converter) output on your device. The DAC command sets a precise analog voltage on a DAC net, useful for generating reference voltages, bias signals, or test stimuli.

Syntax

lager dac [OPTIONS] NET [VOLTAGE]

Global Options

OptionDescription
--box TEXTLagerbox name or IP address
--helpShow help message and exit

Arguments

  • NET - Name of the DAC Net to control
  • VOLTAGE - Voltage value in volts to output

Supported Hardware

ManufacturerModelChannelsOutput RangeResolution
LabJackT72 (DAC0-DAC1)0 to 5 V16-bit
Measurement ComputingUSB-2022 (DAC0-DAC1)0 to 5 V12-bit

Channel Naming

When creating DAC nets, the channel name depends on the hardware: LabJack T7: DAC0, DAC1, or numeric 0, 1 MCC USB-202: DAC0, DAC1, AOUT0, AOUT1, or numeric 0, 1

Default Net

Set a default DAC net to avoid specifying the name each time:
lager defaults add --dac-net VOLTAGE_OUTPUT
Then:
lager dac 3.3

Examples

# Set DAC output to 3.3V
lager dac VOLTAGE_OUTPUT 3.3 --box my-lager-box

# Set DAC output to 5.0V
lager dac POWER_RAIL 5.0 --box my-lager-box

# Set DAC output to 1.8V
lager dac REFERENCE_VOLTAGE 1.8 --box my-lager-box

# Set DAC output to 0V
lager dac SIGNAL_GENERATOR 0.0 --box my-lager-box

Troubleshooting

IssueCauseFix
Output stuck at 0VNet not configured or wrong channelVerify net configuration with lager nets --box <box>
Voltage inaccurateResolution limit or load effectsBoth LabJack T7 and USB-202 output 0-5V; verify your circuit doesn’t draw too much current from the DAC output
”Net not found”Typo or net not createdCheck available nets with lager nets --box <box>. Net names are case-sensitive.

Notes

  • Net names (e.g., VOLTAGE_OUTPUT, POWER_RAIL) refer to names assigned when setting up your testbed
  • Voltage values are specified in volts
  • Only works with nets of type dac
  • Ensure the target box has DAC nets properly configured
  • DAC outputs provide precise voltage control for analog circuits
  • Both supported hardware models output 0-5V
  • USB-202 channels can be specified as 0-1, DAC0-DAC1, or AOUT0-AOUT1

See Also

  • ADC — Analog-to-digital converter input (the complement of DAC)
  • Python DAC API — Set DAC output in Python scripts