This paper describes a new module to create advanced simulations with the Khepera IV mobile robot in V-REP simulator. The library, called KH4VREP, allows users to add a Khepera IV model to a new or an existing V-REP simulation. The KH4VREP library depicts a graphical representation of the Khepera IV model, and also provides several methods to programmatically read and manipulate the sensors and actuators of the robot. The visual design of the model has been developed using Autodesk Inventor. The library provides functionality to test the mobile robot under different control problems such as: position control, trajectory tracking, path following, obstacle avoidance, and multi-robot experiments with formation control.