View Single Post
  #14   Spotlight this post!  
Unread 24-11-2010, 22:41
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 753
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: [FTC]: Lag and Teleop (Labview)

Quote:
Originally Posted by iblis432 View Post
I have just finished a revised version of how teleop code. I think I've ironed out most of the problems, but I would like to submit it here for review while I'm waiting on a chance to work on the robot.
Hi

Looks much better now.
Some suggestions:

1) You should put a small time delay in the lower control loop (maybe 25mS). This will prevent the arm control loop from hogging all the spare CPU cycles when it's not doing anything.

2) Your "Enable" logic is not quite right. You don't want to be exiting the arm control loop based on the enable flag. Both loops should run forever (FALSE wired to terminator), but the Enable indicator should be set by the Robot Driving Case Structure (True if driving, False if disabled). Then if you want to use this indicator to also disable your arm control (good programming practice), then put a case structure in your arm loop to do-nothing if the "Enabled" local variable is false.

3) Your Button 5 code turns on the NXT motor if the button is pressed, but doesn't turn it off when the button is released....

Hope this helps.

Phil.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
Reply With Quote