ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

toggle switch on iteration

I want a case statement to toggle between true and false every iteration of the for loop it is in.  How do you do this?
0 Kudos
Message 1 of 7
(3,997 Views)
IN your while loop, run the iterator into a Quotent and Remainder with a divisor of 2.  The result will be a 0 or 1.  Run that into a =0 and you have a true/false.

Hope that this helps,
Bob Young

Message 2 of 7
(3,992 Views)
Or, use a shift register and a Not.


Message Edited by jasonhill on 05-12-2006 01:40 PM

Message 3 of 7
(3,990 Views)
Yours is better but mine was first Smiley Very Happy

No, seriously, this is probably a better idea.  I bet there can be many, many, other ideas as well.

Bob Young

Message 4 of 7
(3,982 Views)
Thats what I love about LabView, so many ways to solve the same problem.  I suspect that all sorts of people are going to come out of the woodworks to suggest increasingly bizzare ways to solve this one.
0 Kudos
Message 5 of 7
(3,972 Views)
Sounds like another obfuscated code challenge!Smiley Very Happy
0 Kudos
Message 6 of 7
(3,965 Views)
Here is another take.



Cheers,

--Russ

Message Edited by Russ Evans on 05-12-2006 03:46 PM

0 Kudos
Message 7 of 7
(3,952 Views)