4.2.18 - eDAC() [U3 Datasheet] | LabJack
« Close

Datasheets and User Guides

App Notes

Software & Driver


4.2.18 - eDAC() [U3 Datasheet]

An easy function that writes a value to one analog output. This is a simple alternative to the very flexible IOType based method normally used by this driver.

When needed, this function automatically enables the specified analog output.


LJ_ERROR _stdcall eDAC (  LJ_HANDLE Handle,
                          long Channel,
                          double Voltage,
                          long Binary,
                          long Reserved1,
                          long Reserved2)

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

  • Handle – Handle returned by OpenLabJack().
  • Channel – The analog output channel to write to.
  • Voltage – The voltage to write to the analog output.
  • Binary – If this is nonzero (True), the value passed for Voltage should be binary. For example, pass 32768.0 in the double parameter for mid-scale output.
  • Reserved (1&2) – Pass 0.


is eDAC not available in the Matlab Driver for some reason?

It looks like at some iteration in our Matlab download some of the .m files for newer functions (including this one) were removed.  I just added them back and re-uploaded the file.   If you download it again from our Matlab page you should see those functions.  If you have any other problems please let us know.  Thanks for bringing this to our attention.

Just to be clear, if Channel is set to 0, and voltage is set to 3.0, DAC0 will go to 3.0 volts? Example code is always nice.