As I said, you need to change your logic.
It looks like your code is doing this:
repeat
Case CONTROL of
All OFF: SubVI(0,0,0,0,0,0,0,0);
All On: SubVI(1,1,1,1,1,1,1,1);
Manual:
"For i = 0 to NRows in Array-1 do
SubVI(Row[i])"
until Stopped.
What you need is something like:
repeat
if Control <> Previous Control
then ManualIndex = 0
Case Control of
AllOff: Pattern = (0,0,0,0,0,0,0,0);
AllOn: Pattern = (1,1,1,1,1,1,1,1);
Manual:
Pattern = ManualArray[ManualIndex];
ManualIndex = (ManualIndex + 1) mod ManualArray.NRows;
if Pattern <> PreviousPattern
then
SubVI(Pattern);
PreviousPattern = Pattern;
PreviousControl = Control;
until Stopped;
Use
shift registers for the "Previous" variables.
You're hogging the CPU with the 2nd WHILE loop in your picture - put a WAIT function in there to wait 100 mSec or so.
Better yet, why have a separate loop at all? Just stop the first one if there's an error OR the stop button is pressed.