Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

stop a loop with wait timer

I have a state machine and within one of the states i have a while loop where I poll a device every 20 seconds.  I am using a wait timer for 20 seconds to perform the polling.  The problem is that I have a stop button for the loop, but it does not stop when I press the button.

 

Is there a better way to poll the device every 20 seconds which gives me the flexibility to stop the loop whenever I want?

 

 

Thanks,

Gary

0 Kudos
Message 1 of 2
(6,240 Views)

Duplicate post

--
Tyler C

0 Kudos
Message 2 of 2
(6,230 Views)