Posted by Russell Eberhardt on 11/04/2013 11:22:39:
Also hand coding can produce much shorter code than CAM programs if you make good use of subroutines – useful if you're using the evaluation version of Mach3.
Russell.
Sorry but I have to disagree with this statement in the terms of what this post is about.
What Russell says is absolutely true but sub routines are not for the beginner. Take a simple G Code of a ring of 6 bolts on a PCD. ignoring the Z moves and startup moves the code is 6 lines long, each line being the co-ordinates of each circle – very simple.
If you were to stop the program at any point you could see where you were and where you wanted to go next.
With a subroutine you get a short piece of code what is usually a mathematical equation and looking at it doesn't really tell you much, when you come to run the program all you see on screen is this subroute which for a beginner might as well be written in Serbo Croat.
If for some reason you need to pause then you have lost all information on the program as only a few very very expensive top end machines can restart inside a sub routine.
By all means learn to walk with G Code but leave sub routines until you can run.
Subroutines were originally written to make code very compact as Russell says but mainly because early machines often had a 999 program length limit.
Today with machines running direct off hard drives with massive capacity this really no longer applies.