View Single Post
  #1   Spotlight this post!  
Unread 09-05-2005, 00:12
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,362
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: Concept of PID explained

Eugene,
Thanks for the input. I truly appreciate any I can get! Your description of the code and how it is affected by mass and friction match exactly my thoughts and intent for this code. I understand that the adjustments thrown in for compensation of the Victors deadband characteristics are fairly generic and will not be accurate for all Victors, let alone one that has been "experimented" on by a curious student. (But, I gotta' say, I love their willingness to try something without really knowing the result. I just wish they would let me know before they try it on the competition robot )
Maybe in the next re-write I can move it outside this code and place it in a separate function.

As for the declaration of the two variables as "char" instead of "int":
The maximum range of PosError3 is -254 to 254. This is limited by they following code to -127 to 127 before it is used to create DrvCmd3. At the point DrvCmd3 is created, it can only take on a values of 0 to 254. (Again, I am new to C so here is where I may be mistaken) Both of these ranges of values can be represented by a "char" as well as a "int". I chose the "char" just to save a little memory space. I guess as sloppy as this code is, that really doesn't matter.

Either way, I have seen lots of coding examples where "int" is used as more of a standard, even though a "char" would work. Oh well, I'm still learning, and your input really helps.
Thanks again!!!!