Ano Ano Posted May 10, 2011 Report Share Posted May 10, 2011 Hello, I have a "start button" that is connected in a True/False case Structure (See attached picture). When the button is pressed it sends a "True" signal and the timer inside the case structure counts to 30". When the 30" is reached the structure gives a "True" signal out for the program to stop. The problem is that when I start the program again, the "start button" will start at the pressed position. How can I make the "start button" to always start at the unpressed position? Thank you in advance, Quote Link to comment
DaveC Posted May 10, 2011 Report Share Posted May 10, 2011 The simplest method is to create a local variable (Right mouse button on the control --> Create --> local variable). Either wire it off your true statement (add the negate), or put a false constant inside the loop and wire it to the local variable outside it. Hope this helps Quote Link to comment
Francois Normandin Posted May 10, 2011 Report Share Posted May 10, 2011 Set your boolean value to default at False and call the method "Default Values >> Reinitialize All to Default" when you start your program. This method has the benefit of reinitializing all your controls/indicators to their default value with one call. 1 Quote Link to comment
Djed Posted May 10, 2011 Report Share Posted May 10, 2011 Have you considered just using a latched boolean? Boolean controls that are "latched" reset themselves to the default value after they are read once on the diagram. Quote Link to comment
apyuanjie Posted June 17, 2011 Report Share Posted June 17, 2011 Maybe you can use" not" Quote Link to comment
gs1978 Posted June 21, 2011 Report Share Posted June 21, 2011 You can use Local Variable (for this switch: Create Local Variable, after you click it), write it False value after case structure. Quote Link to comment
corey chen Posted June 26, 2011 Report Share Posted June 26, 2011 Yes, I also agree with the local variable solution Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.