10-04-2014
11:22 AM
- last edited on
03-27-2025
05:10 PM
by
Content Cleaner
I am trying to build a PI controller:
Windows 7, USB-6251 DAQ BNC, normal Labview 2011 - no toolkits, not even the Control and Design one.
The datasheet for the USB DAQ says
"With four waveform analog outputs, two 80 MHz counter/timers, and four high-speed data streams on USB, M Series devices can execute multiple control loops simultaneously."
I have not been able to do this, even with my own PID. What does "high speed" mean?
The USB DAQ *does not have* hardware timing so the following won't work. I need basically exactly this, but with a USB DAQ device:
The closest I've come to a successful version is the following (thanks to a member here), but it's very slow (50 ms delay between original signal and output signal). My only sample clock options are "continous" or "finite" samples:
Without moving to a real-time system (expensive and complicated), or buying new hardware (expensive), are there other algorithms that would work faster? producer/consumer, state machine...?
The delay seems to be in the writing, not the reading.
Thank you.
10-04-2014 01:25 PM
10-04-2014 02:26 PM - edited 10-04-2014 02:29 PM
I've tried various rates and # of samples. In the case of this working code, at 1kHz rate, the time for input/output (whole loop) is 1ms per sample. e.g. 500 samples = 500 ms... Sample rate does not affect this. Increasing sample rate, of course, leads to "The application is not able to keep up with the hardware acquisition."
I want to get below 10 ms read/write, which is something like 100 samples and 15 kS/s, nominally. But of course... "not able to keep up"
This is for feedback control, so a single point as fast as possible would be ideal, but if I have to output a waveform, which it seems I do, I need that waveform to be short in time. So, 100 samples, 15 kS/s = 6ms of data, if I understand right.
If I set it to a single point, I get about a 5ms delay, but only a very low sample rate is available (about 200 Hz) and my output signal is heavily digitized, meaning anything that changes faster than say, 5 Hz, won't be controlled quickly.
I suspect USB DAQ devices are bad for fast feedback control loops.