LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can I schedule a stop

I have inherited code that has a lot of stuff running in parallel. Under normal operation I make sure that I close everything, however, every once in a while one of the loops does not close. If I use the stop feature, the software reports a bug sometimes when the operator closes labview. This is an annoyance that the customer does not like. Is there any way of scheduling a stop for 30 seconds later? Thanks. 

0 Kudos
Message 1 of 11
(3,016 Views)

For more information. I receive this message on exiting labview. Note: This is after the program has stopped and when the operator closes the window display.

 

a problem caused the program to stop working. Please close the program.

 

I tried adding the following lines to the ini file but they don't make the message go away.

 

NIER=False
NIERShowNonFatalDialogOnExit=False
NIERNonFatalAutoSend=false

 

 

 

 

0 Kudos
Message 2 of 11
(2,989 Views)

Can you use the Window Appearance customization to remove the Stop button from all interface VIs, and then add a control button to them that calls the "Stop" function programmatically?  With the desired delay.

 

It sounds like there's maybe a handle to a driver or something that LabVIEW doesn't close properly when using the Stop button.  

0 Kudos
Message 3 of 11
(2,958 Views)

That "Stop Sign" is really an ABORT you should expect bad think may happen

 

To Quote EdDicken's sig line

"Using the Abort button to stop a vi is like using a tree to stop your car.  It works but there may be consequences!"

 

So do rip the abort button of the FP and then we need to asses why not all loops "get the message" that they need to stop.


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 11
(2,945 Views)

The customer is okay with the VI stopping 30 seconds after pressing the button?  Apparently there's a race condition that occasionally prevents everything from shutting down.  It would help tremendously if you could post some code, or even explain how each loop shuts itself down.

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 11
(2,933 Views)

The 30 seconds is for a secondary stop in case the primary mechanism of closing everything out does not work. I want to close my software out the normal way 99% of the time, but that 1% of the time I want to make sure one of the many parallel vis don't hang the shut down process up.

0 Kudos
Message 6 of 11
(2,929 Views)

That's the reason why we need to see code or at least an explanation about how each loop shuts down.  Obviously the stop condition(s) of at least one loop is sometimes not met.  Trying to cover up the problem should be the last (last, last, last) resort, not the first.

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 7 of 11
(2,926 Views)

I have about 50 of them. Definately not my style of coding.

0 Kudos
Message 8 of 11
(2,919 Views)

So no, you won't post the code so we have a chance to help you figure this out?

0 Kudos
Message 9 of 11
(2,889 Views)

Or even let us know the exit strategy?

 

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 10 of 11
(2,880 Views)