REM This code will provide a sine wave output 
REM at a specified frequency and with an DC offset
REM for a designated analog output on an RIO
REM 
REM maximum frequency = 250 Hz
REM resolution of frequecy output will decrease
REM as the frequency is increased.

#main
amp= 2;'amplitude of sine wave (Volts)
freq= 10;'frequency of sine wave (Hz)
of= 2.5;'DC offset (Volts)
ao= 0;'analog output (0-7)
REM n is magnitude of the degree increment
REM for each point of the sin output
n= 0.360*freq
AT 0;i= 0;'set time and index reference
#sin;s= (amp*@SIN[i])+of;i= i+n;AO ao,s
AT -1;JP #sin,i<=(360-(n/2))
REM allows the 'freq' variable to be updated
REM while the code is running
n= 0.360*freq;i= 0;JP #sin