View Single Post
  #2   Spotlight this post!  
Unread 11-05-2011, 13:15
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Columbia, SC
Posts: 1,126
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
Re: pic: LabVIEW Code that Crashes

I see a problem with how your accessing your array elements. Arrays start at 0, and go to n-1, where n is the number of elements. LabVIEW, however, is usually good about handling these kind of problems and not crashing, but it all depends on what your default 'out of bounds' value is. If it's blank, then you might be trying to drive the wrong motor. In any case, reducing all your array elements by 1 should fix it.

So 3 will be 2. 2 will be 1, and 1 will be 0.

I noticed that you misspelled rightMotor in the 3rd array element. Since it's a ring constant, the spelling doesn't matter, but for future reference, take note in how you spell things, as it can, and will break your code (our programmers did this a lot this year).

Everything else that I see looks good. Let me know how that works.
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364
Reply With Quote