LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can i control a toggle switch manually and automatically?

Hello,

I want to know how can it be possible to automatically flip a toggle switch when data comes in.
I know this can be done manually, but what about automatically, without any user?
0 Kudos
Message 1 of 7
(5,471 Views)
Attached, is a cluster of logic switches that i have that i want to toggle manually and automatically.
Also there are 3 single switches that i also want to do the same thing.
0 Kudos
Message 2 of 7
(5,466 Views)
For the individuals, in the block diagram, right click on one, select create/property node, then select value and change to write. Attached is a simple example that flip flops boolean 1 switch using a shift resgister and timed loop (just a quick means of showing hot to change, but not the only means). For the clustered ones, you may have to undbundle them, change value, then rebundle.
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 3 of 7
(5,461 Views)
You can use local variables and write to them to programatically control the boolean switches. For the cluster, you can again write to a local variable, but you have to use bundle to choose which switch to control. See attached vi.
- tbob

Inventor of the WORM Global
0 Kudos
Message 4 of 7
(5,459 Views)
Hello,
thanks for the insight.

How can i make the following switches toggle? I want them to toggle individually.
That is:
001 hex
002
004
008

Or: switch 1 on, the rest off
switch 2 on, the rest off,
switch 3 on, the rest off,
....
switch 9 on, rest off.
I tried to do this with a for-loop and no end result.
I know one can do this with a sequence, but it will then be a sequence of 9. Too much!
See attached file.

Thanks In Advance!
Fred
0 Kudos
Message 5 of 7
(5,452 Views)
Here's a kwik kludge (I'm doing visual basic programmind at the same time; can't focus on LV!), I'm sure tbob or dennis have something more elegant.

Hope it puts you on track
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 6 of 7
(5,445 Views)
I would suggest to place the booleans into a 2D array, less things to shuffle.

See attached example (LabVIEW 7.0)
0 Kudos
Message 7 of 7
(5,441 Views)