'This program produces a sine wave of a desired amplitude and frequency
'sine motion will go on continuously unless go=0 is entered into terminal
SH A;    'turns on motor A
amp= 100;  'amplitude in counts
freq= 10;  'frequency in Hz
rate= freq*amp*6.2832;   'calculates correct speed
VS rate
'set VA and VD if non-standard accel and decel are needed
DPA= 0;   'sets position to zero- not necessary
go= 1
' sine wave on "A" axis
CR amp,0,360;  '1 sine wave to get started
BG S;   'starts motion
CR amp,0,360;  'add 1 sine wave continuously
JP #l,_LM>1;   '_LM shows how many segments in buffer
JP #wait,go=1;   'continue adding sine waves until go=0 is entered
ST ;   'stops motion
AM S;  'waits for motion to complete
VE;  'ends vector mode
CS S;  'clears all sine waves out of vector buffer