Go to Post Bottom line - keep your passion for FIRST and don't let others spoil your fun! - Sean Schuff [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Spotlight this post!  
Unread 12-03-2008, 11:27
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Inverting the direction of a Motor

Quote:
Originally Posted by GRS View Post
pwm01 = 255 - pwm01
That should be 254, not 255. The valid range of pwm values is 0-254, and the "neutral" value is 127.

Quote:
Originally Posted by Tom Bottiglieri View Post
PHP Code:
pwm01 p2_y;
pwm02 = ~p2_y
This flips all of the bits, so realistically it does the same as (255-pwm01).
True, but that's not the desired function.

Quote:
Originally Posted by SlimBoJones View Post
These might seem unrelated, but be sure to calibrate your speed controllers when you do this.

The reason is, the Victors don't seem to behave exactly the same backwards and forwards out of the box. We've noticed that setting a PWM to 178 and 78 don't produce close to the same speeds in opposite directions... until you calibrate the Victor.
Your example numbers aren't quite right. 178 is neutral plus 51, and 78 is neutral minus 49.

But you're right about the problem -- the Victor factory calibration is a little off from the IFI pwm outputs, with its actual neutral point at more like 132. That makes your forward value at plus 46, and your reverse value at minus 54...until you calibrate the Victor.
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
CIM Motor Bias Direction jonboy Motors 1 28-01-2008 07:58
Ideas to move in the direction of making FIRST competitions 'fair' KenWittlief General Forum 93 07-11-2006 23:19
Conserving Energy: Stepping in the Right Direction? thegathering Chit-Chat 5 14-09-2006 14:49
Optimal Direction of the Drill and Chips mzitz2k Motors 17 06-02-2004 16:54
Motor Spin Direction archiver 2000 6 23-06-2002 23:43


All times are GMT -5. The time now is 01:48.

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