Hi Rcano_1982,
Thank you for your question.
State machine is a very powerfull and scalable architecture.
In order to fully understand it, please have a read of the following articles:
1. Application Design Patterns: State Machines
http://www.ni.com/white-paper/3024/en/
2. Tutorial: State Machines
http://www.ni.com/white-paper/7595/en/
Then please do an exercise:
http://www.ni.com/white-paper/7604/en/
Once you went through the information above you should be able
to apply this concept to your application.
Kind Regards,