Skip to main content
Set analog voltage outputs using DAC pins. Supports LabJack T7, LabJack U3 and MCC USB-202 hardware.

Import

Methods

Method Reference

Net.get(name, type=NetType.DAC)

Get a DAC net by name.
Parameters: Returns: DAC Net instance

output(voltage)

Set the analog output voltage.
Raises: ValueError if the voltage is outside the range of the instrument. A LabJack U3 refuses a value outside 0.04-4.95 V, so you cannot set it to 0 V.

get_voltage()

Read the currently configured output voltage.
Returns: float - Configured voltage in volts A LabJack U3 has no DAC readback. On a U3, get_voltage() returns the last value that this net object set. If it set no value, the call raises an error with the text has no readback. The MCC USB-202 has no readback, so the call raises NotImplementedError.

input()

Alias for get_voltage(). Returns the currently configured output voltage.
Returns: float - Configured voltage in volts

Examples

Set Reference Voltage

Generate Ramp Signal

Voltage Sweep Test

Set and Verify

Supported Hardware

The examples above output 0 V and 5 V. On a LabJack U3, keep every value from 0.04 V to 4.95 V.

Pin Naming

LabJack T7: MCC USB-202:

Notes

  • DAC nets work directly without enable()/disable() calls
  • LabJack T7 output range: 0-5 V
  • LabJack U3 output range: 0.04-4.95 V
  • USB-202 output range: 0-5 V
  • input() is an alias for get_voltage() and returns the configured output value
  • A LabJack U3 and a USB-202 give no hardware readback
  • Output values are maintained until changed or power cycle
  • Net names must match those configured on the Lager Box