You should at least tell us which error it is, or post your code. But as a guess as to what this is, I'd say you're trying to compare two different things. Is it possible that you're wiring in your entire sample and comparing it only to the latest sample? Also, is it possible that your configuration of the VI is the problem?
What I suggest is this - use the regular greater than VI to compare your new sample with what comes out of the Shift register. If your new sample is greater, wire that into the SR, otherwise wire the old sample (use the select VI from the comparison palette).
Also, please don't post questions multiple times. People take time to answer these, and there is no reason for two people to answer the same question in two different threads.
___________________
Try to take over the world!