12-03-2024 06:10 AM - edited 12-03-2024 06:11 AM
Hello everyone,
i want to build a PID-Controller with a cdaq and the labview software,
like in this Youtube video from National instruments channel:
https://www.youtube.com/watch?v=fkbt85mBzuM&list=PLB968815D7BB78F9C&index=12
My problem is, that i need a faster meassurement as shown in the video.
I need to refresh the labview aplication with 1000 Hz.
I can also increase the speed of the AnalogIn modul to this rate,
ans everything works fine.
But when i used the 9263 Analog Out Modul with the pid controller,
than i reached not higher rates than 10 times per second refrashrate.
If i increase it higher, than i get after some time Problems like "buffer overflow",
because the AnalogOut Modul seems to be to slow.
To enclose the problem:
I connected the DAQ Assistant manager from the AnalogIn modul
directly with another DAQ Assistant manager from the AnalogOut modul.
So i want to give the meassured voltage out, as fast as possible.
Settings:
Analogout DAQassistant: "1 sample (on demand)"
Analogin DAQAssistant " Continuous samples", samples to read: 10, rate: 1000 Hz
After some seconds, i get these error:
----------------------------------------------------------------------------------------------------
Possible reason(s):
The application is not able to keep up with the hardware acquisition.
Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct the problem.
Property: RelativeTo
Corresponding Value: Current Read Position
----------------------------------------------------------------------------------------------------
Could some tell me, what the problem is and how i can fixe it,
to get the necessari speed?
best regards
Ruben Rodermann
12-03-2024 11:33 AM
You're not going to get a reliable 1000 Hz PID loop rate on a cDAQ system. Using DAQ Assistants will limit you too.
Your 1000 Hz rate for AI is probably a sample rate that delivers data in good-sized chunks, leading to a PID loop rate noticeably less than 1000 Hz. This is efficient for data transfer but it also *necessarily* adds latency which is typically troublesome for PID loops.
What are you controlling? What kind of response bandwidth does your system have?
-Kevin P