10-22-2013 08:20 AM
Hello,
I am pretty new in using LabVIEW and trying to learn a few things by myself.
I found this example "generate sound" on my hard disk (attached) and would like to make some changes according to the need.
Here in the program, the loop is terminated by pressing the stop buttom.
I want to add a button, lets say turn on button to start running this code and when I press the same button, it should terminate (instead of stop button).
Please help me in this regard. I will be very thankful.
Regards,
10-22-2013 08:24 AM
Right click on a button (front panel) and go to mechanical action, choose switch when pressed (or released). This way, the button will default to False. When you press it, it will be true (wire this to a case statement to start your desired code). Then, monitoring the button state using a local variable, have your code set up to terminate when the button is changed back to the false case.
10-22-2013 08:36 AM
Thanks.
The first part, I was able to follow.
Can you please show me on the atached file what you meant by "Then, monitoring the button state using a local variable, have your code set up to terminate when the button is changed back to the false case."?
10-22-2013 09:14 AM
not quit sure what you mean by terminate (leave no memory)?