Analog Output Regeneration Modes in DAQ

Updated May 8, 2025

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.

 

In the case of user buffer regeneration there can be a delay in time of when you write the new data to the buffer versus when it appears at the analog output.  This is to be expected as it takes time to play out the existing data in your buffer before reaching the new data.  The amount of time delay is a function of your buffer size and your update rate.

 

Finally, if your new waveform data is smaller (in terms of bytes) than your buffer size then your analog output task will now generate your new data as well as some of the old data that was not overwritten.  If this is not desired then make sure any new waveform data is the same size as your buffer.

Tariff Impact Update Learn more

Was this information helpful?

Yes

No