I hope someone can help me with an interesting project. I am building an engraving machine using Mach3. I need to engrave over an irregular surface, but I do not want to have to program the depth in the Z-axis (ie only using 2.5D program not 3D). I also do not want to use a floating head with a ball nose end. (I have tried this and it does not work correctly - clogs up all the time).

What I want to build is a machine where the Z-axis goes up and down by following a "linear encoder" that gives feedback to the DRO of the axis controlling the Z- axis servo motor. The Linear encoder would be a copy attachment stylus (similar to the old hydraulic copy lathe attachments). So if the Linear encoder lifts up the Z-axis goes up, and when the linear encoder goes down the Z-axis goes down the same distance.
My irregular surface parts come in small batches. So one would be under the "linear encoder" Stylus and the other would be under the cutting tool being engraved.
The tool raise and lower would be by aircylinder on a secondary Z-axis mounted piggy back ontop of the Servo Z-axis.
So the Servo Z-axis would operate independantly of the 2.5D engraving program. As far as Mach3 would be concerned this "Servo Z-axis is just trying to maintain its position ie. staying at "0.00"


Can have some expert opinion:-
1. If this would work
2. What needs to happen to setup/operate with Mach3
3. What type of linear encoder would I need to give the feedback

thanks
Mark