Yes, it is certainly possible to set a button to switch when your program stops, or is run (or at any time during execution that you wish for that matter).
This can be done using what we call property nodes.
To create a property node:
- Right click on the Boolean switch from the block diagram
- Select "Create"
- Select "Property Node"
Now you will be able to place this property node wherever you like on the block diagram. The particular proprty of the control which captures our interest in this case is the "Value" property. To choose the "Value" property, left click on the currently selected property which by default is "Visible" with the left mouse button. Now you can select "Value" from the pop-up.
We need now only to change this property to be a write property (since we are interested in setting the value). To do this you can right click on the "Value" property and select "Change to Write". Now you can right click again on the "Value" property, and select "Create" >> "Constant".
You can then specify whether to turn the switch ON or OFF.
I have attached a simple example which demonstrates the result of following the above procedure.
Good luck with the rest of your application!
Is it possible to set a button to switch to a default value (false) everytime a program is either stopped or run again?
My program works in two parts... one part for measuring and obtaining values for the second part and the second part automates a production process. I want to have a switch where the user measures the values, then hits the switch to start the process (also it would act as an emergency off switch if hit again).
I've tried "Make current values default" but that only seems to work if I completely close the vi and reopen it. Mine will be open all the time and I just need it to reset for the next time its run.
I'm using Labview 7.1 on an XP box.