Quantcast
Channel: All LabVIEW posts
Viewing all articles
Browse latest Browse all 203701

Re: While loop doesn't stop until 2 more clicks

$
0
0

Hi RawtoLV,

 

Sorry. I was in the middle of modifying my comments till you replied. Anyways, you can use Event structure. As you have seen in my precious post, event structure is like case structure but this events (just like how we call cases in case structure) only executes when an event trigger is triggered. For my example, the code in the "OK Button" event only executes when you pressed the OK button (Value change means that when the OK Button value changes e.g. when you pressed the button, runs that code) meaning it runs once for this case. Since it runs once, the value from the dice still holds till you pressed the OK button again.   

 

Under the "OK button" event, I have used "number to boolean array" function to convert the number to boolean. 

 

11.JPG

 

Please note that you need to create an event for stop so that when you pressed stop, the code will abort.With the screenshots I have shown, you can stop the program without the need to pressing the OK button.  

 

I have added some reference links for you to learn how to create a event structure. 

 

Hope that meets your needs

 

Warmest regards,

Lennard.C


Viewing all articles
Browse latest Browse all 203701

Trending Articles



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