08-21-2009 06:45 PM
Hi,
Quickly: My main aplication has two buttons Start and Stop which are handled by Event structure. Start should trigger start of testing (another while loop) which is programed to perform 1000 times. However, due to fact that that test takes long time I'd like to have an oportunity to break that test before declared reapetations with Stop button
After break I'd like to collect results and to have opportunity re-start the same test loop with that Start button.
What is the best approach to program it?
K.
08-21-2009 07:13 PM
08-21-2009 11:19 PM
can u post your VI?
08-23-2009 05:32 AM
Thanks for all answers.
The draft version of my VI is attached.
Cheers,
08-23-2009 09:21 AM
As a quick demo I modified your lower loop to operate as a slave to the upper.
The cases to the left wait 500 ms for a queue update and if no time out the command will switch to the desired mode. If Time out then use the previous mode.
The case to the right implements your mode Start, Stop or Exit. Only the Exit terminates the lower loop.
Have fun,
Ben
08-23-2009 09:29 AM
...adding to my previous post.
SEarch on "State-Machine". It sounds like you want your lower loop to be a State Machine (operates in one of many states) that changes states based on commands from the upper loop. Figure out how State Mahcine and queues work as seperate tasks. Then combine the two.
Ben
08-26-2009 10:29 AM
Thanks a lot guys.
I know how it works now.
K.
08-26-2009 10:32 AM
MimiKLM wrote:Thanks a lot guys.
I know how it works now.
K.
Could you pllease post code that illustrates your solution?
This forum lives and dies by people posting answers as well as questions.
Ben