2.17 - eAIN() | LabJack
« Close

Datasheets and User Guides

App Notes

Software & Driver


2.17 - eAIN()

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.
  • ChannelN – The negative AIN channel to acquire. (Device Specific)
  • Range – Pass a range constant. (Device Specific)
  • Resolution – Pass a resolution index. (Device Specific)
  • Settling – Pass a settling factor, 0 for the default settling. (Device Specific)
  • 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.