The motor can be stopped at end positions via the integrated limit switch logic irrespective of the PLC cycle time and reproducibly. For this purpose, the sensors are wired directly to the inverter. The inverter stops independently when the sensors are actuated. Further travel is only possible in the opposite direction. The sensor status is transmitted to the PLC.