Hi Sooty
Have a look @ this http://www.practicalmachinist.com/vb...elipse-186593/
There are some pointers regarding code for the lathe,
Regards
Mike