how to make a barrel cam

I need help to design and animate a cylindrical cam , and have the design and assembly but the animation story can not find how to do to validate the movement .

SolidworksAssemblies