
v1 = 1    ' Slot to move 	(from 1 to 999)
v2 = 50   ' Speed 			(from 1 to 1000)
v3 = 1000 ' Destination 	(from 0 to 1000)
Gosub MoveServo

v1 = 1    ' Slot to move 	(from 1 to 999)
v2 = 1000 ' Speed 			(from 1 to 1000)
v3 = 0    ' Destination 	(from 0 to 1000)
Gosub MoveServo

v1 = 1    ' Slot to move 	(from 1 to 999)
v2 = 10   ' Speed 			(from 1 to 1000)
v3 = 200  ' Destination 	(from 0 to 1000)
Gosub MoveServo

Stop


' -------------------------------------
Label MoveServo
	v9 = Slot(v1)
	v8 = Sign(v3 - v9)
	v7 = v8 * v2 * 0.1
	Wait Seconds 0.1
	Label MoveServo2
		If Abs(Slot(v1) - v3) <= Abs(v7)
			Slot(v1) = v3
			Return
		EndIf
		Slot(v1) = Slot(v1) + v7
		Wait Seconds 0.01
	Goto MoveServo2
Return
' -------------------------------------


'WATCH Slot(v1)
