V6R2012x Robotics - How to create a Robot on a Rail

Have you ever tried to use a robot on a rail in V6?

If you would like to know how to create it or how to create even the rail kinematic itself, here is a short description based on Kuka data from the Robotlib.