Go to Post If you want something done about it, than do something about it. - Tetraman [more]
Home
Go Back   Chief Delphi > ChiefDelphi.com Website > Extra Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 19:09.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi