Stephen,
Did you want an example of a State Machine, or the table? For the latching, if you write to the local variable when your loop is done, then the button will behave similarly to it does now. If you wire a False out of the while loop to a local variable for the stop button, the button will reset itself.