Quote:
Originally Posted by SoftwareBug2.0
A quick grep of the 1425 2014 robot code reveals 67 switch statements. Do you code your state machines with a bunch of "if" statements?
|
I use LV, so a Case Structure is the same a both an If and a Switch. There's also a Select, which picks one of two inputs based on a boolean input. In normal programming (in C), I use Switch/Case all the time, usually for states.
FOR loops, on the other hand, have very limited use in controls programming. In general, you can use something else (such as a ratcheting counter) where a lot of new programmers use For loops and history buffers.