Tray and see if this works:

Code:
Wt:
W0=0
While fin = 0
W0=W0+1
pause 1
If W0> 500 then goto TimeOut
Wend
Al.