Re: Time limit while waiting for input ?
I have some doubts about your modification, perhaps you have some noise entering the system, or the limit switch is "bouncing"
IF limup = 0 OR RUN_COUNT =>0 THEN
low blue
low up
ENDIF
firstly operator precedence make this If test dodgy, parentheses ensure correct result
IF (limup = 0 ) OR (RUN_COUNT =>0) THEN
secondly
since pbp vars are unsigned , this will always be true it can only be 0 or greater
since the run_count test always tests true the if statement is always true
thirdly
the while loop will only exit if limup is 0 or run_count is 0 , the statement is or should be redundant
Last edited by richard; - 10th July 2017 at 01:01.
Warning I'm not a teacher
Bookmarks