instead of a for/next shift, how about a in-place overwrite. (instead of shifting the data, shift the index variable.)
index = 0
Loop:
adResult = {...new voltage value}
arraySum = arraySum - arr[index]
arr[index] = adResult
arraySum = arraySum + adResult
if index = 29 then
index = 0
else
index = index + 1
endif
goto Loop
Mike -
Bookmarks