#1: Add one variable for storing touch period 1 round before (e.g. PLTM) and set zero for it as initial value. #2: Replace "IF !LTM THEN" with "IF !LTM && PLTM THEN". #3: Write "PLTM=LTM" above WEND.