View Single Post
  #9   Spotlight this post!  
Unread 05-11-2015, 12:32
wt200999's Avatar
wt200999 wt200999 is offline
Texas Instruments
AKA: Will Toth
FRC #3005 (Robochargers)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Dallas, Texas
Posts: 323
wt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud of
Send a message via MSN to wt200999
Re: Multiple Autonomous Actions

Quote:
Originally Posted by Bpk9p4 View Post
... i do not like not being able to see everything at once...
Along this line, as you get more complex you will end up having code running off the screen (bad practice), so you really limit yourself in that regard. If you give meaningful names to your states it should actually be far easier to navigate and becomes self commenting.

Quote:
Originally Posted by Bpk9p4 View Post
Also it is hard to move states around. Do you have any ways around these problems
I am not sure what you mean by not being able to move states around, do you mean physically move on the block diagram, or changing the sequence?

If you limit each state to small functions you can make it more modular and keep each state smaller. This may force you to pass more data however.

This is the structure I like to use to pass data between states:
Click image for larger version

Name:	State Machine Example.png
Views:	33
Size:	38.0 KB
ID:	19396
__________________
Programming in LabVIEW? Try VI Snippets!

FIRST LEGO League 2004 - 2005
FRC Team 870 Student 2006 - 2009
FRC Team 3005 Mentor 2013 -
Reply With Quote