Analog Output Regeneration Modes in DAQ

Updated Nov 21, 2022

Reported In

Software

  • LabVIEW

Driver

  • NI-DAQmx

Issue Details

What are the different regeneration modes, and how do I set them in DAQmx?

Solution

Regeneration refers to the DAQ device's ability to 'regenerate' samples that it previously generated. In other words, when regeneration is enabled, data written to either the user buffer or the FIFO is reused by the DAQ device. In this way, a continuous output can be achieved without LabVIEW (or other ADE) having to continuously write new data to the buffer. For example, a single period of a sine wave could be written to the buffer, and regeneration could be used to output a continuous waveform.

There are two modes of regeneration: User Buffer (PC Memory) regeneration and FIFO regeneration.

NI-DAQ™ defaults to User Buffer regeneration, in which it uses the user buffer in PC memory to write and regenerate data. In LabVIEW, a DAQmx Write property node can be used to manipulate the way data is written into the buffer and to disable regeneration. The specific properties of interest in this case is RegenMode property. Please see the figure below.
 

With FIFO regeneration, data is regenerated straight from the onboard FIFO. No data is transferred across the bus. Furthermore, all data must fit on the FIFO. To enable FIFO regeneration in DAQmx, a DAQmx Channel property node must be used. Wire a 'true' to the AO.UseOnlyOnBrdMem property. Please see the figure below.
 

Additional Information

Except FIFO regeneration mode, user buffer regeneration and non-regeneration mode can write new data to the PC buffer at any time. So, the analog output signal can be changed whenever you want.

However, in case of user buffer regeneration, it may occur glitching effect, which is a mixture of old and new samples. The more detailed information about glitching effect, please refer to Glitching - NI-DAQ™mx 17.6 Manual. The other case, non-regeneration mode, underflow error can be occurred when program does not write new data as fast as the generation rate.