CNC animation rig with IK

Hi

I have tried to create an animation rig for a CNC machine (standard 3-axis XYZ) but can not figure out how to do it. What I want is to be able to position the tool and have the gantry follow with IK. All axis will use linear sliders without any rotation.

Any help or tutorial/forum link appretiated.

Regards
/P