Skip to main content
Skip table of contents

4.1.4 - Analog Outputs [U3 Datasheet]

The following example uses ePut. AddRequest, Go/GoOne, and GetResult/GetNextResult. or eAddGoGet could also be used. The x1 parameter is not used for DAC settings, so 0 can be passed.

The IOType to set the voltage on an analog output is:

LJ_ioPUT_DAC

The following are IOTypes used to write/read the enable bit for DAC1:

LJ_ioPUT_DAC_ENABLE //Ignored on hardware rev 1.30+, as DAC1 always enabled.
LJ_ioGET_DAC_ENABLE

The following is a special channel, used with the get/put config IOTypes, to configure a parameter that applies to all DACs:

LJ_chDAC_BINARY //If set nonzero put_dac values should be 0-65535.

Following is example pseudocode to set DAC0 to 2.5 volts:

//Set DAC0 to 2.5 volts.
ePut (lngHandle, LJ_ioPUT_DAC, 0, 2.50, 0);

Following is example pseudocode to configure the device to use binary values to set the DAC outputs:

//Configure the device to use binary values to set the DAC outputs.
ePut(lngHandle, LJ_ioPUT_CONFIG, LJ_chDAC_BINARY, 1, 0);

JavaScript errors detected

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

If this problem persists, please contact our support.