View Single Post
  #2   Spotlight this post!  
Unread 06-02-2012, 19:54
JohnGilb JohnGilb is offline
Programming Mentor, Drive Mentor
FRC #0488
 
Join Date: Mar 2011
Rookie Year: 2003
Location: Redmond, WA
Posts: 116
JohnGilb has a spectacular aura aboutJohnGilb has a spectacular aura aboutJohnGilb has a spectacular aura about
Re: "Squaring" robot

You might need to add the VI - it's hard to read your wiring.

I do see a potential conflict. You have cases for:
  • One greater than another
  • Both within 5 of each other
  • One less than the other

However, it is possible to be in more than one case simultaneously. If A is 2 greater than B, you'll trigger the first case and the second case. In the first case you set motor values of of .1*, in the second case you set motor values of 0.

The robot will dutifully apply both, so you'll rapidly be switching between some power and no power. This could stop your robot from moving at all.


*On a side note, many robots won't even move unless the motor powers are ~.3 or even .4 depending on robot weight, friction in the drive train, trying to turn, etc. Try ramping up the power temporarily to make sure that isn't the problem.
Reply With Quote