Instructions

Your Linux computer already has a program installed that will allow you to read .pdf
files by clicking on them. To view .pdf files on your Windows® computer, a copy of the
free program Acrobat Reader will need to be installed if it isn’t already. Clicking on a
.pdf file should cause that program to open automatically. If you don’t have it or want to
get the latest version, go to www.adobe.com/products/acrobat/readstep.html.
Inch vs. metric dimensions in g-code
Because my instructions have been written using the inch dimension system, work with
the inch version of EMC2 when using my examples at this time. This will slightly
decrease actual table movements on metric machines. The g20 and g21 conversion
command will only work if you load the EMC2 version that is appropriate with your
leadscrews. Should you wish to use metric dimensions to program your machine, even
though it has an inch leadscrew, you can do so by entering the code g21 in place of the
g20 code when writing the program for your part. G20 indicates inch increments, while
entering g21 indicates you will be using metric increments. The program will
automatically make the translation for you. You can also use inch dimensions on a
machine with metric leadscrews by using the g20 code instead of g21 once the proper
version of the EMC2 has been opened.
If you use the g20 or g21 command to change measurement systems, don't forget to clear
any previously entered numbers from the tools table. Then re-enter the tool size in the
appropriate measurement system for your current program. If you don't, you will end up
with a program that has tool offsets entered in a different measurement system than the
g20 or g21 command calls for. This can give you an error message and the program may
not run.
Let the BS end and the programming begin
From this point on, you have to learn programming at your CNC system. You can’t learn
how to control these systems in your favorite easy chair; therefore, you should take a
printed copy of “Part Two” to your CNC system and enter, test and understand each
sample program before going on to the next. Write a few similar programs, with each
being different enough to make it challenging and constantly test yourself as you go. No
shortcuts!
Are you ready?
About now I’d be “chomping at the bit” to see something happen, so lets do something
the best manual machinist couldn’t do to start. Hell, anyone can cut a straight a straight
line so let’s make a circle. With the stepper motor controller power switched off,
manually crank the handles and approximately center the X-, Y- and Z-axes. Leave the
power off to the stepper motors until we get the program all checked out with Ray
Henry’s backplot command. Ray Henry has been a sparkplug for the EMC group for
some time now and we all owe him a debt of gratitude.
g-code programming
These are the basic g-codes that you’ll be working with. There is a complete listing of
them at the end of this section copied from the
www.linuxCNC.org site. There isn’t any
reason for you to remember them all at this time, because I want you to thoroughly learn
them as you use them; however, you can get a general idea of how the system works by
35