Skip to main content
Skip table of contents

4.1.4 - Analog Outputs [UE9 Datasheet]

The following example uses ePut. AddRequest, Go/GoOne, and GetResult/GetNextResult. eGet 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 each DAC. Note that although there is an enable bit for each DAC on the UE9, both DACs are enabled or disabled at the same time:

LJ_ioPUT_DAC_ENABLE //Applies to both DACs. Channel # ignored.
LJ_ioGET_DAC_ENABLE //Applies to both DACs. Channel # ignored.

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

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

Following is example pseudocode to set DAC1 to 2.5 volts:

//Set DAC1 to 2.5 volts.
ePut (lngHandle, LJ_ioPUT_DAC, 1, 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.