Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Updating analog output at a fast rate

Hi,
I'm using Labview 8 and pci 6251.
I'm trying to update an analog output voltage as fast as possible (every 0.1ms would be perfect). The iteration  time for an empty while loop takes about 0.5ms on my computer but when I put the DAQ.mx-write in the while loop the iteration time  is about ~ 1.4 ms. This time is also the updating rate since the voltage updates for every iteration of the loop.
Is there a way to update the analog output at a faster rate?

Thank you,
Eyal S.
0 Kudos
Message 1 of 4
(3,152 Views)

Hi Eyal,

in order to achieve this rate you can not rely on the OS clock to generate the samples. Under Windows, you would not be able to guarantee this rate because the jitter is unbound. You can use the onboard memory

of the DAQ to load the waveform and play it from there. This will use the onboard sample clock of the DAQ rather than the Windows clock. The VI attached is from the Example Finder in LabVIEW ( Hardware Input & Output>

DAQmx>Voltage).

KostasB

NI UK

 

 

0 Kudos
Message 2 of 4
(3,140 Views)
Hi KostasB,

Thanks for your quick reply.

I tried downloading the program you sent me but it seems like I don't have the "Waveform buffer generation (Multi)" on my computer. However, I can use the same program for 1 channel with
"Waveform buffer generation". It is exactly what I need but if I duplicate the program and try and run the duplicate program  along with the original one, each for a different channel (ao0, ao1) it gives me the following error -  "the specified resource is reserved".

My final goal is to change the voltage back and forth in one channel (with a triangle waveform) and have a small increment in the other channel everytime the votage in the first channel is at the minimum. So far I have managed to change the voltage in the first channel but I'm not quite sure how to incorporate the other channel. I tried building a waveform according to my needs for the other channel but again I get the same error as I did before (
"the specified resource is reserved").

Any help would be greatly appreciated.
Thanks again,
Eyal S.


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

Hi Eyal

I've attached the VI you are missing- let me know if it works for you.

KostasB

 

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