Skip to main content
Read analog voltage values from ADC pins. Supports LabJack T7, LabJack U3 and MCC USB-202 hardware.

Import

Methods

Method Reference

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

Get an ADC net by name.
Parameters: Returns: ADC Net instance

input()

Read the analog voltage.
Returns: float - Voltage in volts

Examples

Single Reading

Continuous Monitoring

Data Logging

Multiple Sensors

Supported Hardware

The LabJack T7 and the USB-202 support bipolar measurement (positive and negative voltages). The U3 ranges are LabJack’s figures for a U3-HV. On a LabJack U3, AIN4-AIN7 are the same pins as FIO4-FIO7, and AIN8-AIN15 are the same pins as EIO0-EIO7. input() sets the pin to analog mode. A GPIO call on the same pin sets it back to digital mode.

Pin Naming

LabJack T7: LabJack U3: AIN0-AIN15 MCC USB-202:

Notes

  • ADC nets work directly without enable()/disable() calls
  • Returns voltage as a float in volts
  • LabJack T7 and USB-202 have a +/-10 V input range (bipolar)
  • LabJack T7 shares a connection handle with DAC, GPIO, and SPI operations
  • USB-202 opens and closes the connection on each read
  • Net names must match those configured on the Lager Box