|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Positioning two connected motors
Our robot has a shooter this year with a 'shoulder' that has two motors that are connected to each other on opposite sides that share an encoder. We need to be able to bring both motors to a specified position/angle, but they need to work in sync and not interfere with each other. How can we achieve this? Can we just the built in CAN PID functions, or do we need to do something else?
|
|
#2
|
|||||
|
|||||
|
Re: Positioning two connected motors
How about controlling them from the same PWM output, using a Y cable? In other words, pretend they are one motor...
There will always be a small amount of 'fight' between them, but this can be made small enough to ignore. PIC can be useful to make sure something moves to a very specific position, especially if you want it to get there quickly. However if this end position is fixed, a mechanical stop may be a wise choice. In the past, we have had motors move something to one of three specific positions (start, halfway or all-the-way) using mechanical stops. The middle stop was actuated pneumatically, but could just as easily have been a servo. Didn't even need encoders, just limit switches (to avoid melting the motors) |
|
#3
|
|||
|
|||
|
Re: Positioning two connected motors
Hi DonRotolo,
Thank you for your reply! We are unable to use a Y cable because the rules state that we may only have one motor per controller for the motors we are using. However, we've decided to cut back to one motor in order to be able to use the built in CAN functions for positioning. |
|
#4
|
||||
|
||||
|
Re: Positioning two connected motors
Quote:
He was suggesting that you connect two controllers to one DSC PWM port with a PWM Y cable. This is common and accepted practice. Of course, if you did this you would have to connect the encoder to the cRIO (via the DSC). Then, you would read the (single) encoder, use it to compute the appropriate output command (using PID or other control algorithm in your cRIO software), and send the computed command to the DSC PWM port... and the Y cable would send the signal to both motors. Quote:
|
|
#5
|
||||
|
||||
|
Re: Positioning two connected motors
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|