This paper presents the design of a sliding mode controller (SMC) for trajectory tracking problem for a two-link planar robot manipulator. A virtual prototype of the manipulator has been built by using Adams software. Also, the controller works is achieved in Matlab/Simulink software. The system is simulated in both Matlab and Adams software together which is called co-simulation. The manipulator system has two inputs (torques of actuators) and four outputs (angle of 1 st joint, angle of 2 nd joint and x-y components of end effector position). The sliding mode controller (SMC) is designed with the constant variation reaching law. The simulation results show that the sliding mode controller (SMC) can successfully achieve trajectory tracking of a two-link planar robot manipulator according to the desired trajectory.