should only have to set the mode once per boot.
So here is how it works.
There was a SHORT mode. Didn't range as far, but because it didn't have to wait as long before each pulse, there were more pulses per millisecond, and with more pulses, more return signal.
But if you wanted more distance, you could go with MEDIUM which is limited to 1.8 or so. Have to wait for the light to go out 1.8 meters and return before you could ping again.
And then there was LONG. But it takes light a bit of time to go out 4 meters, and return. So, with fewer pings one needed more milliseconds of ranging before you get enough signal.
And everyone wants faster ranging, so giving that choice makes sense.
But if you have the time, feel free to just leave the distance mode to LONG and add a few milliseconds to the timing budget.
Now lets talk about aliasing. This is where you set you max to say 1.8meters and you adjust all you timing for that.
But some customer puts a target at 2 meters. Basically the sensor gets confused and thinks the photons from pulse N go with pulse N+1 and returns a distance of 0.2 meters. (2 meters actual minus the 1.8 max.)
To detect aliasing the sensor uses a pulse repetition interval consistent with 1.8 Meters and another one at 2M. If these two distances do not match, then we have aliasing and a distance longer than 1.8 meters.
Now some clever software guy realized one could use the distance returned by the one pulse repetition interval AND the distance from the other one, basically unwinding the deltas, to get a max distance of 6 meters out of a sensor only designed for 4 meters.
And this 'unwinding' of the aliasing seems to work best when you leave the distance mode at MEDIUM.
But your issue is that you are getting a warning saying your target is beyond 1.8.
Could it be that you have disabled extended range mode? (That's the alias unwinding.) With that disabled one is limited to 1.8, but the software knows the distance might be farther.
See if the user manual says anything about extended range mode.
- john