Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 66850

How do I cancel a sub vi stuck in an infinite loop?

$
0
0

Hi,

 

I am attempting an implementation of the Constrained Nonlinear Optimization sub vi.  It works perfectly 99.9% of the time but gets stuck the other .1% of the time.  It is supposed to time out when it cannot find a solution, but it is failing to do so.  Consequently my VI regularly crashes.

 

Apparently this is a known issue with this subvi.  The NI whitepaper mentions that this is caused by a subvi while loop that can get stuck in an infinite loop.  The work around is suggested to be to add a counter to the loop and exit it after a certain number of iterations.

 

I can find the infinite loop occuring in the subvi.  But the sub vi opens as a clone and will not let me edit it.  How do I work around that?

 

Failing that, is there a way from the main vi to cancel the optimization vi after a certain time so that the program can move on?

 

Suggestions would be appreciated.

 

 


Viewing all articles
Browse latest Browse all 66850

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>