I think in this subroutine the "pause xxx" commands make problems... It's another way to do this ?
Code:
wipper:
while gpio.5 = 0
LED = 1 
PAUSE 1000
LED = 0
PAUSE (wipp_time * 1000)  ; this command run for (wipp_time * 1000) seconds  even gpio.5 is no more = 0 ?!?
wend
return