A general theory for modeling of industrial robots is presented and, based on the theory, some algorithms for the actual modeling process are derived and described. As an example of an application of the theory an industrial manipulator, an IRB1400 from ABB Robotics Products, is used. A kinematic model and a dynamical model for the first three joints of the IRB1400 manipulator is found. One part of the report is also devoted to flexible manipulators, especially manipulators with joint flexibilities. Finally, an identification experiment using data from the IRB1400 is discussed.