From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous Samples without allowing regeneration

Solved!
Go to solution

I'm using a Multifunction DAQ: PCI-6230. Using labview, I have created a buffer of N (say 1000) random numbers to use as output voltages on one of the output ports of the DAQ. I am continually updating the buffer with new values. My program is supposed to continually generate a random voltage (from the buffer) at the designated output port of the DAQ every time a trigger is received at one of the input ports (PFI 0 say) until the user wishes to stop, at which point, the buffer will no longer be loaded with new values, or the trigger signal can be turned off.  

The problem I've been facing is that if I use 'finite number of samples' (because my buffer size has a size N), after writing the N samples, I cant write any more values, because the task is considered done. Recreating the task every time the buffer is empty in order to write the next N samples causes delays, which my application can not tolerate.

I havent found a way to use 'continuos samples' without using 'allow regeneration'. I dont want to allow regenearation of the old values. I need to write the new values I filled in the buffer.

Any thoughts on how to approach this problem?

Your help is really appreciated!

 

Rejoy.

0 Kudos
Message 1 of 4
(3,911 Views)

This might be what you are looking for. Help>>Find Examples>>Hardware Input and Output>>DAQmx>>Analog Generation>>Voltage>>Gen Mult Volt Updates-SW Timed.vi. Your card is supported with that example.

At least it might give you some ideas.

Now Using LabVIEW 2019SP1 and TestStand 2019
Message 2 of 4
(3,904 Views)
Solution
Accepted by topic author Lightspeed

There is another example that is closer. It does not use regeneration and writes a new waveform into the buffer every iteration. You just need to change the trigger and the waveform. The example is

Help>>Find Examples>>Hardware Input and Output>>DAQmx>>Analog Generation>>Voltage>>Cont Gen Voltage Wfm - Int Clk-Non Regeneration.vi

0 Kudos
Message 3 of 4
(3,899 Views)

Thanks! That's exactly what I needed! 🙂

0 Kudos
Message 4 of 4
(3,834 Views)