LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can someone please help me find a way to pause my VI programmatically? Not abort/stop, but pause then resume where I left off.

So once you click on RUN, then  start test. You will notice the relay 1, 2, 3, and 4 keep turning On and off one after the other. So I want to be able to pause the run then continue where I left off. The way I would like to do it is when the circled indicator shown on the picture is ON for more than 2 seconds, I want the run to stop. I have tried to use it as local variable and use the >= 2 secs block and didn't work. Maybe I was doing it wrong.  The thing is I keep getting lag when using local variable. 

I've been struggling to find a way to do it. Can someone please help me? I have attached my  main VI, including the type def VI used.

Capture.PNG

0 Kudos
Message 1 of 7
(1,043 Views)

Your code is large and messy.

Clean it up and I'll take another look.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 2 of 7
(1,028 Views)

You need a shift register on the loop that stores the starting time of the boolean transition from False to True.    If the input is False, reset the time to current. When the current time minus the transition time is greater than 2 seconds, run an inner loop that only reads the digital input.  When the input is False, exit the inner loop and continue running the outer loop.

Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.0, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
0 Kudos
Message 3 of 7
(1,022 Views)

I figured it out.

0 Kudos
Message 4 of 7
(978 Views)

@GRCK5000 wrote:

I figured it out.


Since this forum also operates as a place to learn LabVIEW, would you mind if you shared your solution, or at least give a brief description of what you did (and then mark that post as the solution), so that someone else who might have this problem can learn from your experience?

 

Thanks.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 7
(971 Views)

"If you weren't supposed to push it, it wouldn't be a button." I proved you wrong. 😁

0 Kudos
Message 6 of 7
(962 Views)

@GRCK5000 wrote:

"If you weren't supposed to push it, it wouldn't be a button." I proved you wrong. 😁


I didn't see any proof of anything.  What is it that you believe you have proved?

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 7 of 7
(904 Views)