LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Switching a boolean between two states

Hello

I'm new to Labview and i have a question regarding how to make a
boolean control to switch between true and false automatically.
For example, when i run the vi i want the control to be true for
1 sec. then false for 1 sec. and so on. ?

thanks

Noor
0 Kudos
Message 1 of 4
(2,822 Views)
jus a clue
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
Message 2 of 4
(2,822 Views)
Noor,

I'm new to LabVIEW too, but here is the way I would think to do it (though,
it may not be the best)

Create a while loop.
Inside the while loop, create a sequence.
Let the first frame be to wire a true constant (in functions -> boolean) to
your control
let the second frame be a wait timer set to 100ms
let the third frame be to wire a false constant to your control
let the fourth frame be another wait timer set to 100ms

I doubt this is the best way, but it is what came to mind.

Jon
"Kim" wrote in message
news:a414f800.0304270751.7f7345e3@posting.google.com...
> Hello
>
> I'm new to Labview and i have a question regarding how to make a
> boolean control to switch between true and false automatically.
> For
example, when i run the vi i want the control to be true for
> 1 sec. then false for 1 sec. and so on. ?
>
> thanks
>
> Noor
0 Kudos
Message 3 of 4
(2,822 Views)
That's close, except the sequence is unnecessary. All you have to do is carry the boolean value in a shift registers and invert it with every iteration.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 4
(2,822 Views)