LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running two servos simultaniously on myRio

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.

0 Kudos
Message 1 of 4
(4,132 Views)

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

0 Kudos
Message 2 of 4
(4,116 Views)

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).

Download All
0 Kudos
Message 3 of 4
(4,091 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(4,080 Views)