Medical robots are frequently used in minimally invasive surgery of the human body. A significant role to reach the position near the back wall of operating or artificial organs, play here the flexible or multibody effectors. This paper proposes a method of dynamics simulation of the effector serial chain with an electric drives in the form of DC motors and PID controllers in the Simulink. The effector consists of four rigid bodies with six degrees of freedom in RRRS configuration. Every joint of the effector is driven by the mathematical model of the DC motor. The PID controllers are applied to steer the movements of joints in velocity feedback loops and their parameters are identified by using the descent gradient optimization algorithm. A created model of dynamics will serve to instill algorithm running the effector on trajectory using the method of potential fields inside the tunnel, which will be obtained by using the medical imaging. The model in Simulink allows to connect the model of dynamics, which was built by using the block diagram and SimMechanics with code lines stored in the C language, where there is kept the created path planning algorithm.