Hi I'm learning about the use of parallel whiles for my program. Just can someone explain me why in the attached example, the delayed leds do not behave as they should. For example, if LED 1 has 500ms delay and LED 2 1000ms delay, LED 2 turns off first. But if LED 1 delay is higher than LED 2 delay, it works properly.
If I use single stepping it works properly.
You have a race condition, because the upper loop will run a second time most of the time (after turning off the LED for a nanosecond) because the lower loop takes twice as long before resetting the switch. If you increase the upper delay to e.g. 600ms, your VI will work more reliably.
What is the purpose of the outer while loop?