How to simulate encoder signal on Visual Applets