Search code examples
labview

Event-case management in while-loop


If I put the blocks showed in the picture in a while-loop everything fail, fo example the stop button does not working! Someone could explain to me how use events correctly?

enter image description here

thanks


Solution

  • You have not connected the timeout terminal.

    How it always waits for an event and will not allow you to stop the loop. As it does not iterate, it waits.

    To stop the loop you should specify Stop button Event, so your loop will iterate upon clicking on stop and you will be able to stop it. OR you can just specify timeout let say 100 ms and Loop will iterate on timeout case once every 100ms, even there is no event.