View Single Post
  #5   Spotlight this post!  
Unread 10-02-2013, 14:08
propionate's Avatar
propionate propionate is offline
Team co-lead and LabVIEW programmer
AKA: Stephen
FRC #1732 (Hilltopper Robotics)
 
Join Date: Jan 2012
Rookie Year: 2009
Location: Milwaukee
Posts: 93
propionate is on a distinguished road
Re: Autonomous code issue :(

Quote:
Originally Posted by bumblebee3339 View Post
It might be the problem, I'll report as soon as I try to fix it agian. Thx.



1. I checked it, and the comparison is performed on the value before the loop + 50 and the current value so it can reach it (I moved the robot manually and it worked).

2. How much ms would be the best choice? is 10ms enough?

3. I dont write to the same motor at one time. on the left I give both the same value and on the right the upper controls the left motor and the lower controls the right motor. Is it still might be connected to the problem?

And thx for the code I'll try it !
BTW what is the "Reset Encoder" global variable? I know only about the encoder reset vi, is that the same?

Thx agian !!

1. Good catch - I wasn't considering my own advice about nested loops.
2. I would suggest something like 30 or 40ms. You can go lower, but it will eat up more CPU usage.
3. I think it will still be problematic because each iteration of the larger while loop contains two commands to each set of drive train motors.

The Reset Encoder global variable may have been more out of habit. I normally put the encoder code in periodic tasks, and you can use a global variable to reset the encoder from any other VI (in your case, autonomous). Using the Reset Encoder VI and a inputting a constant in autonomous will achieve the same result.
Reply With Quote