Rotation with Linear Motion

Hello, 

Could anyone tell me how to do this?

If I have 2 Parts as attached picture (1 & 2), 

part 2 is fixed and part 1 is rotating over part 2 and slide up and down due to the sin wave shape
How to do this in assembly connection in order to make the motion study?