Skip to main content
Skip table of contents

eAIN() [UD Library]

An easy function that returns a reading from one analog input. This is a simple alternative to the very flexible IOType based method normally used by this driver.

When needed, this function automatically configures the specified channel(s) for analog input.


LJ_ERROR _stdcall eAIN ( LJ_HANDLE Handle,

long ChannelP,

long ChannelN,

double *Voltage,

long Range,

long Resolution,

long Settling,

long Binary,

long Reserved1,

long Reserved2)

Parameter Description:

Returns: LabJack errorcodes or 0 for no error.

  • Handle – Handle returned by OpenLabJack().
  • ChannelP – The positive AIN channel to acquire. See the Channel Numbers section for your device (U3/U6/UE9).
  • ChannelN – The negative AIN channel to acquire. For differential readings on the U6, this should be and odd number equal to ChannelP+1. For single-ended readings on the U6, this parameter should be 0 or 15.
  • Range – Pass a range constant. See the AIN Pseudocode section for your device (U3/U6/UE9).
  • Resolution – Pass a resolution index. 0=default, 1-8=high-speed ADC, 9-12=high-res ADC. See the Operation (U3/U6/UE9) section for your device.
  • Settling – Pass a settling factor. 0-9 where 0=Auto. See the AIN section for your device (U3/U6/UE9).
  • Binary – If this is nonzero (True), the Voltage parameter will return the raw binary value.
  • Reserved (1&2) – Pass 0.


  • Voltage – Returns the analog input reading, which is generally a voltage.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.