03-18-2013 11:19 AM
You most certainly do have access to the raw values. Look at the clock diagram of the fetch waveform. It's similar to the code above.
03-19-2013 05:36 AM
Actually it appears that the scope can generate an overrange error, but only if the whole graph is out of range (it happended for the first time this morning), so it doesn't help.
The solution i found is to detect wether the maximum of the data is superior to a certain limit (calculated depending on the range we apply), and to adapt the range each time it happens (so maybe it is overrange, maybe it's still good)
I think I have made the problem more complicated than it should have been, It works fine like this, so I won't spend time for a "perfect" algorithm.
thanks again for answers !