This BSc thesis presents real-time path planning algorithm for a two-dimensional portal crane. Cranes move the load with the help of a rope system such that the actuators can change the position of the suspension points of the ropes. Due to the construction of this crane mechanism the load tends to swing. If there is an obstacle under the portal crane, it has to be considered so that the load avoids the collision. The path planning algorithm I have developed can solve these problems. The user may provide reference velocity to the load speed. The controller applies filtering and calculates the actuator signals for the cart and for the winch hoisting the load. As a result, the load may stop without swing. Moreover, planning algorithm takes into account the limitations of the horizontal force applied to the suspension point and ensures that a priori known obstacles are avoided. I implemented the algorithm and the crane model in the Matlab-Simulink integrated development environment. The correct working of the method is verified by the evaluated results.