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,998 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,993 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,991 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,983 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,973 Views)
Sounds like another obfuscated code challenge!Smiley Very Happy
0 Kudos
Message 6 of 7
(3,966 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,953 Views)