Another option is to use the array functions. Use the "Array Subset" function to get the subarray from element 0 to element 511. Then, use the "Array Max and Min" function to determine the maximum value in this "window." Go through the entire 30,000 element array, looking at a 512 section at a time.