look at this part located at the top
Code:
time VAR BYTE
time =0
counter VAR WORD
counter =0
replace your counter=0 by read 10, counter