06-01-2013 04:21 PM
I'm making an application with some led blinking indicator. I use a while loop to timing different blinking led ( every led has different blinking time) and boolean buttons with their local variables to activate the leds from another loop. But I'd like to use boolean variable instead buttons. How can I do this
Solved! Go to Solution.
06-01-2013 05:41 PM
It is difficult to tell exactly what you want and what you have tried from your description. Please post your VI. Try to explain as clearly as possible how the timing for each LED is set and what activates them.
Lynn
06-01-2013 07:52 PM
@betobeto33 wrote:
But I'd like to use boolean variable instead buttons.
What is a boolean variable?
06-01-2013 08:30 PM - edited 06-01-2013 08:30 PM
06-01-2013 09:08 PM
That is a local variable of a boolean control or indicator. It just so happens that whoever created that control/indicator named it "Boolean Variable".
If you'd like some further help, I'd recommend posting your VI so we can see what is really going on inside of it.
But first, I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours
06-01-2013 09:27 PM
@RavensFan wrote:
That is a local variable of a boolean control or indicator. It just so happens that whoever created that control/indicator named it "Boolean Variable".
yes it is...it was meant to be a joke?
06-01-2013 09:32 PM
It was a poor joke if it was. It had to be intentional because the default name for a boolean control or indicator is "Boolean" or "Boolean #" where # is a number appended to the Boolean name.
06-02-2013 03:10 AM
Here is the VI for example. In this VI the led1 start blinking immediatly but the second led start blinking after some seconds. I use the button and his local variable to messagge from one loop to another, but it would be better to use a not visible item instead of the button. I know that I could have done this wilth only one loop, but I wanted to know this possibility too.
06-02-2013 08:09 AM - edited 06-02-2013 08:15 AM
betobeto33 wrote:
Here is the VI for example. In this VI the led1 start blinking immediatly but the second led start blinking after some seconds. I use the button and his local variable to messagge from one loop to another, but it would be better to use a not visible item instead of the button. I know that I could have done this wilth only one loop, but I wanted to know this possibility too.
First, as somedy said before using the abort button to stop your vi is like using a tree to stop your car, you should provide a proper way to stop your vi.. Also the shift register of the second loop is uninitialize so you can never be sure of the value it will start with. For what the vi is doing currently I don't see the need of a second loop, you can use a single loop with a wait time that is a common divider of the wait time of your two actual loops (like 100ms) and add some math.
Ben64
06-02-2013 09:35 AM
Pardon, the problem is not how to make a led blinking, but how to comunicate between two different loop. For example, how to start or stop a loop from another loop, the two loop executing in parallel. I succeded to do it with a button, but I'd prefer to use something not visible in the front panel.