I need help to set up a pendulo

I am doing a game and thought into creating a saw that hangs on a rope, swinging like a pendulum.Could someone help me? Ps: sorry for my English, and I don’t speak very well yet …

May be this helps:
Set Center of rotating in top center of object(Rope),
we need variable, which indicates the direction of movement («1» - clockwise, «-1» (or “0”) - counterclockwise).
At beginning scene our pendulum moves clockwise;
Each Moment of execution, we check direction — CW or CCW;
if Pendulum rotates clockwise — the rotation Speed is positive, otherwise - negative.
then check the Position, and if the Pendulum is at an extreme Point - change Direction.
In File №2 added the object to a rope and fixed rotation.
P.S. This Example without any physics…
Pendulum.zip (13.8 KB)