The limit switch prevents the crane from exceeding its maximum travel distance, an important element of overall safety. These switches will detect when the crane reaches either end of its path and shut down power to certain components as appropriate, including motors that would drive it beyond its limits.