Skip to main content
Skip table of contents - Stream DAC [UE9 Datasheet]

Stream DAC is a feature where the DACs (digital-to-analog outputs or analog outputs) are updated by hardware in each stream scan.  A buffer for each DAC (DAC0 and/or DAC1) is loaded with 1-128 values, and the UE9 steps through the buffer(s) updating the DAC(s) with each stream scan.

Requires UD driver V3.06+ and UE9 Control firmware V1.93+.

The DAC updates are done in addition to a normal input stream, so at least 1 input channel must be streamed.

In terms of stream speeds, the DAC updates do not count the same as input channels.  Rather, if stream updates are enabled for 1 or both DACs, it adds a just few microseconds to the time of each scan.

There is one IOType to enable/disable this feature and load a buffer:

LJ_ioADD_STREAM_DAC //Channel= channel (0 or 1). Value= number of updates (0-128). x1= array of doubles.

Typical pseudocode would look like the following:

ePut(lngHandle, LJ_ioADD_STREAM_DAC, dacNum, numUpdates, padblUpdates);

The Channel parameter of the ePut call is 0 or 1 to specify DAC0 or DAC1 (two calls are used if both DACs are to be streamed). The Value parameter specifies the number of updates in the buffer. The x1 parameter is an array with that many doubles.

Note that LJ_ioCLEAR_STREAM_CHANNELS does not affect Stream DAC. Rather, to disable a call like above must be made for each enabled DAC with numUpdates=0.

If the special channel LJ_chDAC_BINARY has been used to specify that binary updates will be passed for the DACs, that is supported with this Stream DAC feature, and the binary updates are still passed in the array of doubles.

A little trick in C:  Since the x1 parameter is just defined as a long, cast the pointer to the array as a long and pass that for x1:

double adblUpdates[128] = {0};
long padblUpdates = (long)&adblUpdates[0];

JavaScript errors detected

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

If this problem persists, please contact our support.