|
Re: Direct control of a Servo or Speed Controller
At this point I think we're going to write a small app using one of our old robot controllers that basically does an analog to PWM conversion. We're going to use the USB-6009 to generate a 0-5V analog voltage that the robot controller can read and convert the analog voltage to a servo command. It's going to possibly introduce a 26mS delay because of the internal timed loop in the robot controller, but I think we'll need to take this into account in the real system anyway.
My main reason for this approach is that we don’t want to add any extra external circuitry (555 timer or analog-to-PWM converter) that could introduce additional errors to the system. We’re trying to mimic what is going to be present in the final system. With all that said I will still definitely keep the Jameco part in mind if we start running into problems with the robot controller.
I’m still hoping I’ve messed something up in the LabView software and we can actually get a much faster timed loop. Since we’re operating at the mercy of the internal timer on the PC (and the non-real-time Windows operating system) I don’t think I’ll get much better than a 1mS loop. As a test I had one of the digital outputs toggle every time it entered the 1mS loop. The signal clearly had a large amount of cycle-to-cycle jitter when I viewed it on an oscilloscope.
The USB-6009 and LabView definitely have their places where they’re extremely versatile as a learning tool but I don’t think directly controlling a servo is one of them. If anybody has gotten this to work I would be very intersted in seeing how they did it.
Thanks again!
|