The behaviour of walking and running machines is a research topic which has gained a lot of interest during the last decades. Walking robots can be kinematically driven through a sequence of quasi-static equilibrium positions. Running robots on the contrary must be dynamically controlled, which increases the complexity of the locomotion problem. This paper is a contribution to the study of dynamically balanced legged robots. Simulations of a hopping robot with one telescopic leg, a hopping robot with one articulated leg and an anthropomorphic running robot are presented. The classical approach in the simulation of legged robots involves the cumbersome tasks of establishing by hand the equations of motion, of calculating the forces and the torques needed for the desired behaviour of the robot and of determining in a sometimes rather heuristic way the proper gains to be used in the control algorithms. To bypass these aspects a commercially available multibody code is used. The models of the robots are easily built using a graphical interface and the equations of motion are automatically generated. Built-in optimization routines calculate the controller gains and optimize the designs. Using this approach the control algorithms for the robots presented in this paper are validated and refined. Predefined values for the forward velocities, the hopping heights etc., are attained for the three models. (6 pages)