The code you have posted can't be condensed to one line because the C axis movement is not linear. If every line was C60, then you could condense it all down to one line with the total Z, C, and X axis motions. In reality, the same motion you have programmed may need 100 lines of code to make the motion smooth. I'm sure you could get into some subroutine or macro programming that would accomplish it in just a couple lines of code but I doubt it is worthwhile since any modern controller can handle files with 100,000 lines of code or more...


A few notes about the code you posted: You only need the G91 one time. It is modal so it will remain active until you change it (ie with a G90 to go back to absolute mode). The G01 is the same but it is often included just so it is clear what that line is doing. If you can help it, I would avoid changing the feedrate every line if possible as it increases the processing overhead and will reduce the number of lines of code you can read per second which could result in jerky motion, this is largely dependent on your software/hardware so I'm not sure if it is important to you or not. You may be able to setup your controller to calculate the feedrate based on the diameter of the mandrel (X axis) so the feedrate changes you programmed can be completed automatically with only one F-word.

Matt