LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Issue while taking AI and AO measurements at high sampling rate of 20000 S/s

Hi,

 

I am facing some issues while trying to use Labview for control applications. The details are as follows:

I am using NI PCIe-6353 card and Labview 2017 in Windows 10. I want to measure voltage (AI) for feedback and supply voltage (AO) to the actuator at a sampling rate of 20000 S/s. However, I am getting an error "-209801" which from NI documents shows that

 

"DAQmx Write did not complete before the arrival of the next sample clock which indicates that your program is not keeping up with the hardware clock. To remove this warning, slow down the hardware clock, or else change your application so that it can keep up with the hardware clock."

 

I am fairly new to Labview, and hence do not know what to do as I need to have such a high sampling rate. Any help is greatly appreciated.

 

Note:- I am not using Labview Real Time, and do not want to unless it is absolutely necessary.

 

Thanking you in advance.

0 Kudos
Message 1 of 6
(2,165 Views)

You are trying to loop at 20KHz.

 

To do it that way you will have to use RT on a RT target.

 

Otherwise you may want to switch to a producer consumer and read the number of samples waiting int he buffer read them all and pass them to the consumer.

 

PCs were not intended to run that fast.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 6
(2,159 Views)

Thank you very much Ben. I will try that out and get back at the earlier. Furthemore, my purpose to design controller for a system which operates at ~650 Hz. Hence, I am sticking to such high sampling rates. As I am new to Labview, could you please guide me if this is the right way to go (based on the above VI)? Or, is there any other approach in Labview that serves my purpose better?

0 Kudos
Message 3 of 6
(2,155 Views)

You can't get 20 kHz loop rates with just RT, you have to implement that on the FPGA. See this thread:

 

https://forums.ni.com/t5/LabVIEW/Real-Time-maximum-loop-speeds/td-p/3690007

 

650 Hz loop rate might be doable, but it's going to be tricky and you probably do want RT to keep jitter down. Why are you sampling at 20 kHz if your loop is 650 Hz?

0 Kudos
Message 4 of 6
(2,131 Views)

Sorry about the incomplete information. My system has frequencies ranging from ~650 - 2000+ Hz. So, I keep the sampling rate at 10 times the maximum frequency.

0 Kudos
Message 5 of 6
(2,116 Views)

Sampling rate does not have to equal loop rate.

 

I have acquired (on Windows mind you) at 40MHz using a loop that reads the backlog using a loop running at about 100 Hz and then process the data pseudo-real time.

 

So stop and ask yourself just how often the output signal has to be adjusted since dynamic changes to outputs signals is what will most likely be directing how fast your loop has to spin.

 

I will eave it at that for now since I can not guess what you are really after.

 

Take care,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 6
(2,069 Views)