04-06-2009 01:06 AM
Hi,
I am using a Event structure to Start and Stop the test. In the Start event i will be having a stacked sequence which consists of many sequences. In the Stop Event I will be stopping the execution. If I press Start button the sequence under this event will start running. I want to Stop the execution or skip the next set of sequences in between the sequence. During this I lose the control over the GUI and I cannot do anything until the sequence under the Start event is completed. I can stop the execution by pressing the abort button but i want do it programmatically.
Regards,
Rajashekar
04-06-2009 01:16 AM
Hi,
Introduce an abort button and cover up all the sequences with case structure. When the abort button is ON then the sequences will not execute.
04-06-2009 01:18 AM
You should use a state machine architecture and, as such, avoid using a sequence structures. When you transit between states, you can poll the stop button and stop your state machine when you want to. Have a look at a template by navigating to File -> New.. and going to the Standard State Machine design pattern.
If you have any questions, post back.
04-06-2009 01:43 AM
04-06-2009 01:59 AM - edited 04-06-2009 01:59 AM
04-06-2009 02:00 AM
After ok button pressed,Do u want an option in your programme to skip the sequence structure? which steps you need to skip?
I am not understood your words.![]()
04-06-2009 02:07 AM
Its not to skip the sequence structure, after Start button is pressed.
Its like i provided wrong inputs and I started the test by pressing start button.The test is in middle of the sequence and i dont want the test to complete, I just want to stop that event(using stop button in the program) and wants to provide correct input and start the test.
Or I want to stop that event when it is running in middle of the sequence and want to start freshly.
04-06-2009 02:10 AM
Here you go...your code with state machine implementation. If you implement it this way, you can definitely take care of the case that you have mentioned.
Example in LV 8.6.
04-06-2009 02:27 AM
04-06-2009 03:11 AM
No you won't be able to do that unless you divide the code further into sub-states. And, that's why it's always recommended to make your code modular. Post a snapshot of an isolated version of your code, so I can understand what's going on.