04-01-2015 08:50 AM
I am having trouble running two servo motors on myRio at a time.
I have been working with the NI myRio (1900) Mechatronics Kit (March 2014) and run the servo motor with the provided project ('servo demo') without any problem, different PWM channels work fine as well.
Then I copied the essential blocks (like 'PWM channel', 'Open.vi' and 'Set duty cycle and frequency') and tried to run a second servo by itself using different pins and channels.This worked as well.
However when both servos are being used at the same time, they seem to hinder each other:
Sometimes the servos works perfectly fine together, sometimes they don't move at all (and just humm), sometimes they both move in a very weird way.
When I disconnect either power or ground cable on one motor, the other servo is getting back on track, but as soon as both are wired, the problems return. I tried using multiple pins and channels and they all work fine individually but never totally with the two parallel motors.
How can I control two servo motors simultaniously using the myRio-module?
(I am using the same type of servo that was in the mechatronics kit: S03N STD)
Thank you in advance,
Kind regards.
04-01-2015 09:36 AM
If you are asking for help with some LabVIEW code, it really helps to show us the code (very few of us are telepathic, particularly over distances greater than 4 feet). Assuming you have enough independent output terminals and independent modules driving them, you should be able to run two motors in parallel. LabVIEW does parallelism very well ...
Bob Schor
04-02-2015 06:09 AM
I used the provided "servo demo" and modified it in order to control two channels at a time ("servo demo modifiziert").
I called tech support, they said I should try using a seperate power source since the two servos might overburden myRio (which I would find rather odd.. its two tiny 5V motors).
04-02-2015 07:07 AM
Many DIO, especially high speed ones, do not have much current capability. I can't find a current rating for the servo, but you are likely on the edge of how much current the myRIO can put out for the DIO with jus a single servo. If you got lucky and had your pulses set to only one on at a time, you might be able to control both. But I would highly recommend using an external supply for controlling the servos.