03-07-2008 06:58 AM
03-10-2008
02:26 PM
- last edited on
02-10-2025
10:50 AM
by
Content Cleaner
Dear Principiant,
PID control with an USB device is quite some task... Depending on the algorhythm used, you might make it up to loop frequencies of maybe 100Hz, but you will still have a input to output latency of 10msec, as your control will always be one sample set ahead of the actual output.
I have attached an optimized VI, which runs steadily with 100Hz on my PC (2,3GHz single-core) and an USB-6259.
If this iteration time is still to slow, you might consider using an FPGA-based control design, offering PID loops up to 200kHz. If a PCI card is an option, you might consider NI's R-Series:
Multifunction R Series Intelligent DAQ Devices
https://www.ni.com/en-us/shop/category/multifunction-io.html?page=1&productId=118757&productId=11869...
If you would prefer to stick to USB, then CompactRIO might be your solution:
CompactRIO
https://www.ni.com/en/shop/compactrio.html
Best regards,
Sebastian
Message Edited by SFK on 03-10-2008 08:30 PM
03-11-2008 04:49 AM
Hi SFK,
Many thanks for your help.
Unfortunately it seems the improved program you made works not so good on my setup , even worst of my program for some unknown reasons.
I have a Pentium 4 dual 3 Ghz ,1 Gb Ram but with your modification the maximum sampling I achieved is 100 Hz placing 10 sample per channel.
When I try to push up an error appears sayng that for some reason the resources of the Computer are not enough and some data are lost.
And with this sampling rate remains a delay of 100ms! (I use to test pulses at 0,5 Hz, 10 ms width).
With the previous program I am still able to reach 1000 Hz sampling and delay of 20 ms.
Anyway following your suggestions I already ordered a PCI card of M series (the 6989). Some people say me that he was able to run a PID 25 KHz which would be more than enough for me.
Bye
Principiant