I am using a state machine architecture wherein each state is defined. Once I start the test, the test starts running and i want to stop the test in middle whatever it might be doing. But the test stops after executing the current state. But i want like this----> As soon as i press the stop the button, the test(program) should stop even it is executing the current state.
Here is the program.... Can any better way of doing the following program
First understand the while loop behaviour in LabVIEW. While Loop is similar to a Do while Loop in text-based programming,So it only checks the condition after executing the code written inside the while loop.So you need to take care of the Stop condition to stop the current execution and come out from the while loop.
Use queud event handler architecture with one loop monitoring events and enqueuing the requried task, other loop de-queueing and executing the tasks...look at this