LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using NI card buffer in regeneration mode to output pre-set, continuous, digital signal

I am trying to record analog inputs and output digital waveforms simultaneously. My main issue is that I need the digital outs to run faster (10-20MHz) than I am able to read in analog data (625kS/s) due to limitations in hardware (PXI-6289). I beleive I am able to set unique clocks for both the digital out and analog in as needed, so that should not be an issue. 

 

Right now I am just trying to get the digital out working since I am relatively new to Labview. I believe I will need to load my pre-set, time-varying, digital signal onto the PXI-6289 buffer and run in regeneration mode to avoid getting an underflow error or other delays in timing. I am modifying the example "Digital (Pipelined Sample Clock) - Continuous Output.vi" (attached) but I am getting an underflow error when I run my modified version (Modified Continuous Digital Output Example.vi). 

 

Underflow Error.png

 

 

Additionally, there are three parts of the code that I do not fully understand pictured below: the role of "DAQmx Task - Channels", the following loop, and the difference between the two digital write blocks. I do not think I need the loop pictured but the connections to and from the loop seem to break when I connect them directly to the elements inside the loop rather than going through the loop as it is shown. 

 

My modified vi: 

DAQmx Task Channels and Loop.png

 

Original section from example vi:

DAQmx Task Channels and Loop - Example.png

 

I am unsure why there are two different digital write blocks here:

Digital Write.png

 

 

Any help getting the digital output to continuously run in regeneration mode, understanding the loop and "DAQmx Task - Channels" block, or setting up a vi to simultaneously run digital out and analog in with different clocks would be appreciated. 

0 Kudos
Message 1 of 2
(810 Views)

ZYOng_0-1710547252189.png

The example is using this property to determine how many lines are being configured in this task and hence initializing an array of ramps with the same number of channels.

 

ZYOng_1-1710547541142.png 

The example is using non-regeneration mode hence you need to write new data constantly or you will get buffer underflow error. Since you are using regenerative mode, you don't have to call DAQmx Write VI frequently.

 

Since both digital and analog are on the same device, you can simply export the ao/StartTrigger to digital task to synchronize digital and analog at different rate. See Different Options of Synchronization with DAQmx in LabVIEW

 

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 2 of 2
(770 Views)