02-21-2006 03:51 PM
Hey LV Programmers,
I have a
while loop counter and linked to the while loop counter, I have four different cases (which is
out side the while loop) to execute. My goal is to change the case for every 30 counts of the while loop
counter. For example, let’s assume that I have Cases 1, 2,
3 and, 4. For the 31st count I have to change the state from case 1 to
case 2. For the 61st count I have to change the state from Case 2 to
Case 3. For the 91st count I have to change the state from Case 3 to
Case 4. For the 121st count I have to change the state again from
Case 4 to Case 1 and so on…. I tried different things but it didn’t work. I
appreciate your support.
02-21-2006 03:57 PM
02-21-2006 04:07 PM
04-10-2006 04:05 PM - edited 04-10-2006 04:05 PM
Message Edited by Kay Kay on 04-10-2006 01:05 PM
Message Edited by Kay Kay on 04-10-2006 01:07 PM
04-10-2006 04:18 PM
If you want the Case Structure's state to be reflected by the While Loop's iteration count, you need to put the Case Structure inside the While Loop. Alternatively, you could create a parallel loop and put the case structure in there, and use a local or global variable to write the first loop's iteration count, and read that variable in the parallel loop. But from your sample code, the most straight-forward solution should be to drop the Case Structure inside the While Loop.
-D
04-10-2006 04:38 PM
04-10-2006 04:47 PM
04-10-2006 07:16 PM
04-11-2006 01:44 AM