12-14-2008 10:10 AM
I'm having problem designing a PID closed loop dc motor control. I was told that the NI USB-6008 is not good for this application, but this is the only DAQ card i can work with.
I wanted to use analog input for rpm measuring and analog output for PWM signal, there's an encoder sensor for rpm measuring.
I'm having hard time to understand the timing for this project, the dt(s), dt out(s), and the DAQ timing, i wanted to know how to set these values.
When i split the VI i'm able to measure the motor's rpm, the problem is on the pwm output part. Below is the VI i'm working on, please help me figure what problem is in my VI.
12-15-2008 02:22 AM
I guess, you are using a USB-6009, as a USB-6008 doesn't provide analog outputs. As you have stated correctly, this device is anything but ideal for control tasks. Here are some reasons:
Still, if you want to give it a try, better use a counter on the device for the PWM generation, as this allows a much better timing resolution.
For help with the tuning process, please refer to this document. Please note, that this document is written for NI motion control products, but you still can learn a lot about the impact of the PID terms.
Again, please note, that there is a great chance, that you end up with a lot of work and a poor solution with your current setup. Please have a loot at these related links (1, 2) and at ni.com/motion.
12-15-2008 12:46 PM
Thanks for the reply. I'm sure that this is the USB-6008 because there is no counter I/O in this DAQ. Then i found 2 AO port here at the analog side of the DAQ. My question is how i'm going to design the program so that it will be able to use AO port to output PWM signal, please give me some direction on what VI i can use or a sample VI. Basically the program flow like this, duty cycle is the output from PID.vi, then it will be converted to PWM and send to DAQ. If possible please take a look at the VI i attached earlier(test4.vi).
Maybe the solution is poor but please provide me more info on doing this. Thanks for those who read this.
12-16-2008 02:22 AM
sorry, I mixed up some things. You are right. The 6008 provides 2 AOs, but the counter can't output a pulse train. Still these outputs provide a maximum update rate of 150 S/s. This is not enough for any reasonable kind of PWM signal that I could think of. E. g. if you generate a 50 Hz PWM signal, the timing resolution allows you to vary the PWM in exactl 4 discrete steps (0%, 33%, 66% and 100%). This doesn't sound like a reasonable approach to me.
Sorry, but this is really the wrong hardware for your application.
10-23-2011 09:09 AM
I'm interested in the same problem. If the 6008 is unsuitable for this application, then kindly suggest a suitable device for this problem. Thanks in advance.
10-26-2011 09:28 AM
For closed loop servo motor control you could use a motion control board like the PCI-7342. This board runs the control algorithm in realtime on board and provides an easy to use API.
There are several other options but the key takeaways should be, that a) USB DAQ is not a valid solution for motion control tasks and b) deterministic realtime control is mandatory in most cases.
If you need further advice, please provide more specific information about your application requirements.
02-17-2012 03:31 PM
I seemingly have a similiar design problem to these other users, and for me, my application is very cost sensitive. The 6008 unit costs $169 whereas some of the other mid-range options cost nearly 10x the $ amount. I noticed the one you quoted for instance is $1200.
Perhaps there is some link/guide/info somewhere that you might know of to help newer Motion control users like myself weigh the capabilities/limitations of the lower cost options to the capabilities/advantages of the higher cost options to figure out the absolute minimum cost needed for our applications?
02-21-2012 02:00 AM
Unfortunately I don't know a general decision matrix, that would help to select the most cost effective solution for a given set of requirements, but if you could post a description of your application and your motion control requirements here, I could provide at least some advice.
Please try to provide comprehensive information about what you are trying to accomplish. For the pure motion control part, please provide information about the following topics:
There are many more parameters in this equation but I think you should get the idea, so please add whatever information could be relevant.
Depending on your requirments we might be able to find a low budget solution but it's very likely not a USB-6008, which is really by far the most improper NI product for motion control tasks.