//This sample will activate one I/O channel. While moving your joystick control,
//you will move the active I/O channel up or down. No speed factor is considered
//in this sample! (it doesn't matter how much you move the joystick)
#DIRECTIVE RUN_MAX_SPEED
SETION 1000000000000000
//Program main-loop
LABEL WINPLC
VAR1 = $JOYSTICK_X
IF VAR1 < 0120 Then CALL MOVE_DOWN
IF VAR1 > 0140 Then CALL MOVE_UP
GOTO WINPLC
//Move the active led down
SUB MOVE_DOWN
IF IO01 = 1 Then EXIT SUB
SHIFTALLIO DOWN
WAIT 250
END SUB
//Move the active led up
SUB MOVE_UP
IF IO16 = 1 Then EXIT SUB
SHIFTALLIO UP
WAIT 250
END SUB