Skip to main content
Skip table of contents

4.2 - EAnalogOut [U12 Datasheet]

Easy function. This is a simplified version of AOUpdate. Sets the voltage of both analog outputs.

Execution time for this function is 20 milliseconds or less (typically 16 milliseconds in Windows).

If either passed voltage is less than zero, the DLL uses the last set voltage. This provides a way to update 1 output without changing the other. Note that when the DLL is first loaded, it does not know if the analog outputs have been set, and assumes they are both the default of 0.0 volts. Similarly, there are situations where the LabJack could reset without the knowledge of the DLL, and thus the DLL could think the analog outputs are set to a non-zero voltage when in fact they have been reinitialized to 0.0 volts.

Declaration:

long EAnalogOut ( long *idnum,
long demo,
float analogOut0,
float analogOut1 )

Parameter Description:
Returns: LabJack errorcodes or 0 for no error.
Inputs:

  • *idnum – Local ID, serial number, or -1 for first found.
  • demo – Send 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without a LabJack.
  • analogOut0 – Voltage from 0.0 to 5.0 for AO0.
  • analogOut1 – Voltage from 0.0 to 5.0 for AO1.

Outputs:

  • *idnum – Returns the local ID or –1 if no LabJack is found.

LabJackPython Example

- python

import u12
d = u12.U12()
d.eAnalogOut(analogOut0=2.0, analogOut1=2.0)
#{'idnum': 12}
JavaScript errors detected

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

If this problem persists, please contact our support.