Go to Post Go figure that by teaching you end up learning a lot through the process. ;) - Josh Fox [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
  #2   Spotlight this post!  
Unread 30-01-2008, 22:19
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 7,011
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: Limiting acceleration in easyC

How?
Create 2 variables, "Out" and "Old_Out", default them to 127. Store the real final PWM output to Out, and subtract Old_Out, and if the difference is greater than some rate of change (say 50), reset the value to the rate of change (Out - 50). Then set Old_Out == Out, and repeat each loop. You'll have to manage the math a little bit, to prevent exceeding 255 or zero, and maybe elsewhere, but that basic idea is a simple PID loop with only D being used.

Good idea? Maybe not. Driver training is probably a better approach.

Don
__________________

I am N2IRZ - What's your callsign?
 


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
Moderating Acceleration / Deceleration Tom Line Programming 7 15-02-2007 13:39
Acceleration Curve EricWilliams Programming 5 01-02-2006 16:27
Kickoff easyC workshop integrated into EasyC help file Dan Larochelle Programming 0 11-01-2006 06:12
Acceleration Sensor Connected, but values are odd.... Leav Electrical 7 04-02-2005 15:28


All times are GMT -5. The time now is 21:57.

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