« Close

Datasheets and User Guides

App Notes

Software & Driver


2.18 - eDAC()

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.


When I try the following python script

from ctypes import windll, byref, c_long

dll = windll.labjackud

handle = c_long()

dll.OpenLabJack(6, 1, "", 1, byref(handle))

dll.eDAC(handle, 0, 1, 0, 0, 0)


(This should set output of channel 0 to 1 V)

I get this back:

ValueError: Procedure probably called with not enough arguments (4 bytes missing)

Why is there an argument missing? Manual says eDAC takes 6 arguments and I provided 6.

It's me again. I have a labjack U6 and I now updated driver software and firmware. The error persists.

Interestingly, I get no error if I add another parameter (tried another zero). Did you add another parameter to eDAC() but forgot to update this page?