I tried to use the Curve modifier ...
... but the motion isn't the same as real one.
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.Sign up to join this community
This may be easy solution for you, use curve as you did with your chain and use hook on the curve... set it to object that will be your CNC head and that 1 point of the curve next to the head will be hooked to it... Result is this:
By moving the cube you can easily control whole movement, it has some limitations of course, but you can solve them as well
Check it if you understand and see if it works, if you need to limit other movement, you should use another objects to control that curve