I have 3 animated cubes, two of which, Cube 1 and Cube 2, start stacked on top of each other and off to the negative X of the other one, Cube 3. Cube 1 moves forward along the X axis. Cube 2 moves along the X axis under Cube 1 (transform constraint) while rotating around its Z axis. Cube 3 moves from Y=0 to Y=2 for every full (360°) rotation of Cube 2, then it jumps back to Y=0 as Cube 2 begins another rotation.
I would like to change this behavior so that, within one 360° rotation of Cube 2, Cube 3 would move from Y=0 to Y=2 and then smoothly back to Y=0, behaving like a pendulum.
See the animation in my .blend file; I hope that helps you understand me.