Go to Post Chief Delphi is special. ... Self-police please. - PayneTrain [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 19-02-2004, 12:46
KWalsh KWalsh is offline
Registered User
#1191
 
Join Date: Feb 2004
Location: Pittsburgh
Posts: 14
KWalsh is an unknown quantity at this point
Four Motor Programming

Can someone help me/ show me a sample of a code that would make a four motor robot move? All ive seen is two motor programs, or at least thats all I think ive seen. thanks
  #2   Spotlight this post!  
Unread 19-02-2004, 12:48
deltacoder1020's Avatar
deltacoder1020 deltacoder1020 is offline
Computer Guy
AKA: Dav
#1020 (The Indiana Prank Monkeys)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Muncie, Indiana
Posts: 340
deltacoder1020 has a spectacular aura aboutdeltacoder1020 has a spectacular aura about
Send a message via AIM to deltacoder1020
Re: Four Motor Programming

if i'm understanding you correctly, all you would need to do is duplicate the output of the left-side motor for the second motor on that side, and the same for the right-side second motor - where the code sets the right-side motor to a certain value, just set both motors on the right side to that value (and by motor, I mean PWM)
__________________
Team 1020, the Indiana Prank Monkeys (www.team1020.org)
  #3   Spotlight this post!  
Unread 19-02-2004, 12:56
KWalsh KWalsh is offline
Registered User
#1191
 
Join Date: Feb 2004
Location: Pittsburgh
Posts: 14
KWalsh is an unknown quantity at this point
Re: Four Motor Programming

That might work, but the back motors are different from the front motors, the front motors are CIM motors and the back motors are drill motors, does that make a difference?
  #4   Spotlight this post!  
Unread 19-02-2004, 13:01
deltacoder1020's Avatar
deltacoder1020 deltacoder1020 is offline
Computer Guy
AKA: Dav
#1020 (The Indiana Prank Monkeys)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Muncie, Indiana
Posts: 340
deltacoder1020 has a spectacular aura aboutdeltacoder1020 has a spectacular aura about
Send a message via AIM to deltacoder1020
Re: Four Motor Programming

are you using a gearbox so that the motors end up matching spin speeds? if so, it should work fine. if not, you might need to make a function to translate the value going to one set of motors into an appropriate value for the others... i.e. if your chips are on pwms 1 and 2, and the drills on 3 and 4:

Code:
pwm01 = leftvalue;
pwm02 = rightvalue;
pwm03 = drillTranslate(leftvalue);
pwm04 = drillTranslate(rightvalue);
the drillTranslate() function might just be a simple curve, or you might need to use a lookup table.
__________________
Team 1020, the Indiana Prank Monkeys (www.team1020.org)
  #5   Spotlight this post!  
Unread 19-02-2004, 13:02
ttedrow's Avatar
ttedrow ttedrow is offline
Herding electrons
AKA: Tim Tedrow
FRC #0281 (EnTech)
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2000
Location: Greenville, SC
Posts: 165
ttedrow will become famous soon enoughttedrow will become famous soon enough
Re: Four Motor Programming

Yes it does matter, especially if you are using the drill motors. If because of gearing or programming you are back driving the drill motors you may do damage to the transmission. You will need to adjust the speed so they run close to the same.

Tim Tedrow
__________________
Sr. Design Engineer
Caterpillar Inc.
Greenville, SC

KD4EGM

FRC 281 Greenvillains
Infected with the FIRST virus in 2000

Yes, Chute Door!!!
  #6   Spotlight this post!  
Unread 19-02-2004, 14:49
KWalsh KWalsh is offline
Registered User
#1191
 
Join Date: Feb 2004
Location: Pittsburgh
Posts: 14
KWalsh is an unknown quantity at this point
Re: Four Motor Programming

Well the drill motors have gearboxes but the CIM motors are not the same nor can we set them to the same speed, so how would I go about setting different values for the drill motors or vice-versa?
  #7   Spotlight this post!  
Unread 19-02-2004, 16:51
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Four Motor Programming

DON"T USE THE DRILL GEAR BOXES!!! Biff can write miles on that.

It's easier to find the RPMs and build it that way. So in code, you just set each to the same. We're using CIM and drill motors this way, and it works fine.
  #8   Spotlight this post!  
Unread 19-02-2004, 19:14
KWalsh KWalsh is offline
Registered User
#1191
 
Join Date: Feb 2004
Location: Pittsburgh
Posts: 14
KWalsh is an unknown quantity at this point
Re: Four Motor Programming

So just use the same values for both and it should work fine?
  #9   Spotlight this post!  
Unread 19-02-2004, 21:14
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
Re: Four Motor Programming

Quote:
Originally Posted by KWalsh
So just use the same values for both and it should work fine?
Yes, as long as they are mechanically geared pretty close at their free speed, then just set them both to the smae walue, and it will work well enough. There is always room for improvement, but it will work.
__________________
1139 Alumni
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:46.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi