View Single Post
  #3   Spotlight this post!  
Unread 04-08-2006, 12:21
CircularLogic CircularLogic is offline
Registered User
FRC #1546 (Chaos Inc)
Team Role: Leadership
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Baldwin
Posts: 38
CircularLogic will become famous soon enoughCircularLogic will become famous soon enough
Re: Vex Encoder Code

Alright, so I have fixed my StartEncoder functions to eliminate the window in my logic and I placed those function definitions in User_Routine_Fast. I actually want the effect of this function to happen during user control, so I have the call to StartRightEncoder() placed in User_Routine.

I placed all function definitions right before

Code:
void Process_Data_From_Local_IO(void)
After compiling all of this and running it, it still doesnt work as intended. If the motor is ran slowly (pwm = 154) then it goes about a quarter of a turn too far. However, if I put it at 255, it goes about three times too far (this is with the wheel coming directly off the motor).

I suspect that I am still not polling fast enough (due to the fact that I dont actually have anything in Process_Data_From_Local_IO) but when I placed my function definitions in Process_Data_From_Local_IO, I recieved a whole bunch of errors.

When I placed my call to StartRightEncoder() in Process_Data_From_Local_IO, I got a very odd pulsing of the motors (meaning they would run for a second, stop for a second, and then continue on in that pattern) when combined with the function

Code:
if(GetRightTick() <= 180) 
{
	

	pwm04 = 255;
	

}


Thanks for your help Mark, I know I ask a lot.
__________________
Team 1546 Chaos Incorporated
2005- SBPLI Rookie All Stars
2006- SBPLI Sportsmanship award.

Gotta hand it to the straight line autonomous mode, the most effective defense out there.

Proud beyond belief of the accomplishments of the second year, 20th ranked, 6 wins and 6 losses Chaos Incorporated.
Reply With Quote