In electrical engineering, a limit switch is a switch operated by the motion of a machine part or the presence of an object. A limit switch can be used for controlling machinery as part of a control system, as a safety interlock, or as a counter enumerating objects passing a point.