Instructions

g01 x-1.6844
g03 x-1.5638 y.1858 r.15
g02 x-1 y0 r.3125
g01 y-.1
g00 g40 x-.5
x0 y0 z0
m2
%
EMC Tip—Pausing a cut during a long program
If for some reason you have to stop your machine while it's running a long
program and you are planning to complete the part the next day, the safest way to
accomplish this is to stop the program by using [FEEDHOLD]. Turn the spindle
and servo driver off, but leave the computer on. The next day you can restart your
program by simply turning the drivers and spindle on and clicking on the
[CONTINUE] button. In this case the [FEEDHOLD] button becomes the
“Continue” button when it is used to stop the slide movement. If possible, try to
stop the operation at some point where the cutter is either not cutting or is cutting
in an area where finish doesn’t matter. It's also a good idea to write down the zero
positions of the handwheels and slides just in case you have to use the emergency
stop.
The “o” command
This command allows you to create Sub Programs.
A sub program is a program within a program that is defined by the letter “o”. EMC2 will
not allow you to call up a sub program from another file. These Sub programs (or
Subroutines) are entered at the beginning of the Main Program and are labeled by the
letter “o” followed by a number followed by the word sub. You can’t use a letter or letter
and number to define a sub program. I find it wise to further define the sub program
inside parentheses.
Example: o100 call (mill 2 hole) A sub program may call up another sub program and
they call this procedure “nesting.” EMC2 will allow you to nest as many as ten sub
programs together.
When the sub program is complete, you enter Example: o100 endsub The words I
highlighted in red must be entered in order for the “o” command to function.
Sub Programs offer a programmer a way to shorten a program by thousands of lines.
They are similar to “canned cycles.” Prior to canned cycles if you wanted to peck drill
deep holes, you had to program all of the Z axis moves one line at a time. This could take
several lines of program for each hole. Canned cycles allowed you to put all of the
drilling information on one line, and then program position moves for all of the holes.
Some general areas were sub programs are used are. 1. On parts that have the same shape
cut in several different places. 2. Machining the same parts on several different fixtures.
64