Ok I will post the code here as requested :
' First servomotor program
' Sweeps left to right, then reverses
INCLUDE "bs1defs.bas"
Symbol B1 = pw ' create a variable pw
pw = 100 ' start at extreme left
sweep: pulsout 0,pw ' send pulse to motor
pause 18 ' set frequency to about 50 Hz
pw = pw + 1 ' increase pw by 1
if pw > 200 then back ' at extreme right, turn CCW
goto sweep ' otherwise, continue
back: pulsout 0,pw ' send pulse to motor
pause 18 ' set frequency to about 50 Hz
pw = pw - 1 ' decrease pw by 1
if pw < 100 then sweep ' at extreme left, turn CW
goto back ' otherwise, continue