Dynamic scan valid sample range when start up

Confirm work.
Scan valid position range respect to the surrounding