Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically change sample rate for AO/DO

Solved!
Go to solution

Hi,

 

I'm doing some AO/DO using a couple of PXI boards, including a PXI-6221 M series. I'm wondering if it possible to progammatically change the sample rate at some point in time. 

 

After a certain time my program enters a low-maintenance mode, and it needs to go from very fast output rates to just maintaining some default values. I figured the best way to do this would be to change the sample rate to very low so the demand on the computer goes down, yet the default waveforms are maintained. 

 

Is there a way to do this? If not, might there be another way to accomplish my objective? I was also thinking of starting another task, which outputs to the same channels at a slower rate, at the exact time the first task finishes. However, this would have to occur at the exact time the first task finishes; I can't wait around for the other task to be cleared, the new task to be started, etc. 

 

Thanks a lot for any replies. 

0 Kudos
Message 1 of 4
(3,540 Views)
Solution
Accepted by topic author Djaunl

Djaunl,

 

I think what you might want is non-Regeneration.

 

Try the example Cont Gen Voltage Wfm-Int Clk-Non Regeneration.vi found at Hardware Input&Output>>DAQmx>>Voltage.

Sincerely,
Jason Daming
Applications Engineer
National Instruments
http://www.ni.com/support
Message 2 of 4
(3,521 Views)

Hi Jason,

 

Thanks for the reply. I was already using non-regeneration; I just wasn't aware that I could change the sample rate with the DAQmx Timing Property Node after the task was started. 

 

Thanks!

Dan

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

Hi Dan,

 

Using a property node, you can change the AO sample clock rate while your program is running. 

 

Shot02 Jul. 21 09.39.gif

 

 

 

 

PBear
NI RF
Message 4 of 4
(3,470 Views)