09-03-2012 04:54 PM
Hi.
I created an application that drives a stepper following a certain rule every few minutes. The problem is I cannot stop the program before it finishes since the respective iteration still needs the delay to timeout.
I used two approaches, namely a "Wait" block and a Timeout included in a case structure. Either way, I had to wait for the time interval to pass in order to press the "Stop" button.
Is there an easy way to fire a periodic task (or alarm)?
Thanks.
Solved! Go to Solution.
09-03-2012 04:59 PM
It would be good if you can show the code what you have done as a snippet ot the vi (2009 version please)
09-03-2012 05:12 PM - edited 09-03-2012 05:16 PM
Thanks for your reply.
Can you give me some pointers regarding alternative methods to the two that I already wrote about? I'd like to try them first and then I'll post my code. I do this mostly because my script is very "spaghetti"-like and cleaning it up will take me some time.
All that I need is just the principle of the method no matter how generic it is.
09-03-2012 05:19 PM
Why don't you use the Elapsed Time function?
09-03-2012 05:29 PM - edited 09-03-2012 05:35 PM
Already tried it. I must have set the wrong paramaters because I never got it working. My stepper is suppose to finish doing its thing in max 15 secs. I suspect that I set the wrong interval in the block and mistakenly assumed that the secquence was never executed -> my mistake was that for testing purposes I set the Elapsed Time interval to 10-30 seconds to make the tests faster.
I'll post un update as soon as I'll test my code.
Thanks a lot.
09-03-2012 05:30 PM
What is the delay time you are giving?
09-04-2012 07:55 AM
It seems that I wasn't running Elapsed Time in a loop. Now everything runs fine.
Thank you.