SKD-40D laser distance sensor was usesd to control a retractable roof on top of a pool

SKD-40D laser distance sensor is used to control a retractable roof on top of a pool. It is open for 2-3 times a day and stays in that position for hours. On the night is closed. The roof will stop moving when measuring distance reaches 20m.