Use any loop structure and add a shift register.
(Right click on the right edge of the loop icon.)
Inside the loop, read the signal. Wire the reading
to the shift register symbol on the right side of the
loop. The wire the shift register symbol on the left
side of the loop as the "old" value. From outside
the loop, wire in an initial value to the left side
shift register symbol.
In addition, you can put the 20ms timer inside the loop.
Les.Hammer@completetest.com