LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stop boolean in state machine

The point is not that it is a lot of work to check for a stop command but that if it is important to be able to stop within a specified minimum amount of time, then the program must be designed so that no portion of it takes longer than that specified minimum time to run without an opportunity to pause for the stop check.

 

That sentence is too complicated, especially for someone whose native language is not English.  Let me try again.

 

Let a system requirement be that the program must stop within H milliseconds after a user presses a Stop button.

Let the system architecture be a simple state machine.

Then every state will have a "Check for Stop" function.

Then every state must execute in less than H milliseconds.

For any process or calculation which may require more than H milliseconds to complete, it will be necessary to break it down into segments which can execute in less than H milliseconds.  The state containing this process segment may repeat as many times as necessary to complete the calculation.

 

This is one of the situations which point out the importance of a good software design before beginning to write the code.

 

Lynn

 

Message 11 of 11
(664 Views)