04-16-2008 05:23 PM
Hi,
In my front panel menu, I am having two options 'Run' and 'Pause'. 'Run' starts executing of the selected test cases from a list box .The user can pause the execution by pressing the 'Pause' option at any time. When the user press 'Pause' I need to pause the execution of test cases until the user press it once again. On pressing Pause again, the test case execution should continue from the point at which it was paused.
Can u tell me how to implement this using event structures?? I tried doing it but once I press Run, it executes the complete state for Run before responding to the Pause event.
Regards
Siddharth
04-17-2008 12:03 AM
Hi Siddharth,
if you want to do it with the event structure, insert all your code which runs your sequence into the timeout case. Create a shift register with "-1" connected to initialize it and connect it to the "event timeout". Create an event case for your "run" and "pause" button. In the "run" button event case, set the value of your shift register to a value greater than "-1" and in the "pause" button case to "-1".
Mike
04-17-2008 04:38 AM
04-17-2008 05:04 AM
04-17-2008 05:19 AM
Hai,
Hope this is your requirement. I had just changed some names in Front Panel.
Thanks,
Mathan.
04-17-2008 09:23 AM
@Mathan wrote:
Hai,
Hope this is your requirement. I had just changed some names in Front Panel.
06-18-2012 12:26 PM
hi ,
I want a similar programme which can be execute as following :
Running continously until i press the pause button then pause and i press the same button it continue run until i press pause again ....
I am awaiting for your reply ,
06-18-2012 12:41 PM
@MikeS81 wrote:
Hi Siddharth,
if you want to do it with the event structure, insert all your code which runs your sequence into the timeout case. Create a shift register with "-1" connected to initialize it and connect it to the "event timeout". Create an event case for your "run" and "pause" button. In the "run" button event case, set the value of your shift register to a value greater than "-1" and in the "pause" button case to "-1".
Mike
You have to be careful with this approach. If your code takes a while to exeute your application will become unresponsive since it can't service any other events until the code in the timeout event completes. You might be better of with a producer/consumer architecture with a state machine in the consumer.
06-18-2012 01:00 PM
You could download & use the same VI, modifynig as per your requirement.
03-15-2013 02:29 PM
Hi, would you happen to have VI in version 8.2. I tried it does not work.