Go to Post [in response to http://www.welovefirst.com/] I feel like I've just been FIRST Rick Rolled. - kramarczyk [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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
  #12   Spotlight this post!  
Unread 17-02-2012, 00:20
bstites82 bstites82 is offline
Registered User
AKA: Blake Stites
FRC #2164 (multiple)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Harrisonville
Posts: 12
bstites82 is an unknown quantity at this point
Re: Explanation.

assuming that this is in the teleop, which is inside the robot main loop which executes aprox every 20 ms. ok so if you walk through the code, it feeds the 4 buttons into an array, then it uses a boolean to number conversion to return the array index of the button that was pressed, then it checks to see if the array index of the button pressed was greater than 1(which i assume zero is the default case). it also writes the index value of any button that was pressed to a global variable called arm binary. then it feeds the results of "was button pressed" >1 to a select function, where it compares the index value of button pressed>1 to the global variable arm binary. now if a new button was pressed, and was greater than one, it moves to the case that corresponds with the index array of that button (ie.. top row, middle row, ect). and feeds the appropriate values to the pid controllers for the desired position. if the loop iterates and a button was not pressed then it executes the value read from global variable arm binary and stays at whatever the last position was (ie.. top row, middle row, ect).
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 13:39.

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