Before you get too far into that, look up the Roger Caffin thread here at CNCzone.com/forums/linera-and-rotary-motion/261174-cnc-engineering.html
And other threads, same forum.
The first few posts cover some of the limitations of the approach you're taking.