07-09-2012 08:54 AM
Dear Sir,
how to out from infinite while loop in sub VI from main VI
attached photo for solution but I can't understand it and i can't find the function in photo
please help
07-09-2012 09:38 AM
An invoke node with a variant to data. I think you'd be better off using a Notifier for this.
07-24-2012 06:29 AM
Send the reference to the control instead of the VI, then you can use Property value directly.
/Y
07-24-2012 07:30 AM
You don't seem to like the answer of: don't create infinite loops.
07-24-2012 09:45 AM - edited 07-24-2012 09:46 AM
Asking how to get out of an infinite loop is like asking how to find the end of a circle. I'm not trying to be sarcastic but by definition, if there is a way out of the loop, then it is not infinite. I think what you are asking is how to avoid creating an infinite loop. Is there something about the suggestions you have been given that you do not like? My favorite suggestion is the notifier but maybe you just need an example. Turn on context help and read about the notifier functions in the code below.
This is your top level VI
And this is your subVI
If this seems too complex then a global variable will work too. But what seems simpler can cause much more complex bugs. You can code fast and spend lots of time debugging or you can code slow and spend less time debugging. Personally I perfer writing productive code than looking for bugs any time.