Showing results for 
Search instead for 
Did you mean: 

How do I set regeneration mode for analog output channel using DACmx write?

Hello: I am writing an app to simultaneously (and semi-continuously) write a digital output waveform and an analog output waveform while aquiring on two analog input channels. When I set up the waveforms outside of the main loop and start the tasks, the digital waveform repeats within the loop, but the analog output waveform is sent out on only the first iteration of the loop (unless I regenerate the waveform each time inside the loop whcih greatly slows the acquisition loop). 

From the help file, it seems that this may be related to the regenerate mode of the DACmx write properties, but I can't figure out how to set this property or even if this is a possible solution. Any advice would be appreciated, as I am a relative novice labview programmer.

Brian O'Rourke
0 Kudos
Message 1 of 3
Okay, now I am able to get multiple waveform writes to the analog output line by placing the start task icon within the aquisition loop. However, there is still a delay introduced to the loop, but not as large as placing the entire waveform generator and DACmx Write inside the loop.
I'm still wondering about the regeneration mode property and how to change it.
Brian O'Rourke
0 Kudos
Message 2 of 3

Hi John,

For continuous analog output, take a look at the "Cont Gen Voltage Wfm-Int" shipping example. You can find it in the Example Finder- this should get you started on continuous generation. You mentioned the Regeneration Mode property, by default this property is set to use regeneration if you set the timing (DAQmx to be continuous. If you set it for finite samples (which is generally default) it will generate untill it has generated the number of samples specified and then stop - this is probably what you are seeing.

Hope this helps, please post back if you have additional questions or if this doesn't fix the issue.


Andrew S

National Instruments 

0 Kudos
Message 3 of 3