How to do Trammel Of Archimedes Animation?
Animate both "shuttles" moving on different axis by keyframing their X and and Y positions in sync. Start at say $X=-1$ at frame $0$ then $X=1$ at frame $30$, and back at $X=-1$ at frame $60$, repeat for Y axis for the other shuttle.

In the Curve Editor move their animation curve keyframes so that they are offset by "half a cycle". That is if one apexes every $x$ frames, the other one should apex at frames $x+1.5x$.



Add a Cycles modifier to both curves so they repeat indefinitely.



Create a "bar" object, move it so that it's origin it is exactly coinciding with one the shuttles, then parent the bar to that shuttle with Ctrl + P.

Add a Track to Constraint pointing to the other shuttle, adjusting the axis settings as necessary.



As mentioned by Robin Betts, for a mathematically perfect animation the f-curve should be a perfect sine wave. Use a Built-in Function f-curve modifier instead of manually keyframing the shuttels and using the Cycles modifier.

Set it to a Sine function, so the shuttles have mathematically correct motion relative to each other. With the previously described technique you will notice a wobble between the second bar hole and the corresponding shuttle caused by the manually keyframed animation.