06-16-2021 07:47 AM
Hi,
I am trying to do something like a countdown timer. I just created a for loop and then wired its loop count to a string indicator on the screen after converting the loop count to string. And on front panel you can see one, two, three etc. But I want to pause the for loop in between. Is there a way I can do that. Thank you.
06-16-2021 08:02 AM - edited 06-16-2021 08:04 AM
Hi govindsankar,
@govindsankar wrote:
I am trying to do something like a countdown timer. I just created a for loop and then wired its loop count to a string indicator on the screen after converting the loop count to string. And on front panel you can see one, two, three etc. But I want to pause the for loop in between. Is there a way I can do that.
Sure!
The simplest solution would call the OneButtonDialog (inside a case structure inside your FOR loop) when you want to "pause" the loop:
06-16-2021 11:52 AM
The correct way would be to have a while loop and a proper state machine (look it up!).
States could be (1) idle, (2) paused, (3) counting down, etc.
Not sure why you need a string indicator to display a numeric value.
Start by attaching your VI. Make sure it has all the controls and indicators you need (start countdown, pause countdown, show numeric progress, enter target time, end program, etc.). Explain the reason for each and how it will be used during the run.
06-16-2021 06:53 PM
@altenbach wrote:
The correct way would be to have a while loop and a proper state machine (look it up!).
States could be (1) idle, (2) paused, (3) counting down, etc.
Not sure why you need a string indicator to display a numeric value.
Start by attaching your VI. Make sure it has all the controls and indicators you need (start countdown, pause countdown, show numeric progress, enter target time, end program, etc.). Explain the reason for each and how it will be used during the run.
He has 247 posts. he should know the basics (like attaching the VI) by now. 😕