Smithy Ez-Trol2 User Manual

Page 30

Advertising
background image

G-Code programming is designed to tell a motor located on the end of each axis screw to act as the
hand wheel for that axis. G-Code, much like any human language is made of words. G-Code words
are bit different than human languages in that the first letter of each word tells a control what the
word is about. We often speak in G words, F words, S words and X, Y and Z words.

There are five motion words to learn which are listed in the table below:

These five-motion words tell the machine to move but only one word can be said at a time. The
machine tool will remember that one word until another word is given to the machine tool. In other
words, these words are modal. If you write G0, your machine will continue moving rapidly until
another G-Code is given to replace the G0.

To rapidly reposition the work piece so it is sitting at the Z-Axis, Y-Axis and X-Axis at zero.
The following block of code would be written:

G0 Z0

X0

Y0

It is not necessary to repeat the G0 on each line. The modal nature of the motion commands can
be both good because it saves time typing and bad because it can be forgotten to switch from the
rapid feedrate and break things.

Looking at the code just created, each axis has a separate motion. The first move is for the Z-Axis
only, then an X move alone and finally a pure Y move. The same code could be written in one
single block it would like the following:

G0 Z0 X0 Y0

This block of code will move quite differently then the one above it. Instead of moving one axis at
a time, it will move all axes at once and instead of moving the X and Y movement in a linear motion,
the combined movement of the X and Y Axis will result in diagonal motion. If the machine were
sitting at X1, Y1 and Z1, which means that it is one unit away from the zero, the home, the issued
block, would return the machine to the positron of X0, Y0 and Z0. If a square block was mounted
to your table where X1, Y1, Z1 is positioned on one corner of the block and X0, Y0 and Z0 are at the
other corner of the block, the move is through the middle of the block between these two corners.

Many G-Codes will work in conjunction with additional codes (words). For instance G1 tells the
machine to move at a certain feed rate, which means the feed rate must be given to the machine
along wit the G1 code. Feedrate, like the motion G-Codes is a modal command. Once a feedrate is
given it will stay in effect until a new feed rate is given. The first line of a set of feed moves might
look like the second line in the program shown below:

Table 8.1 G-Code Motion Terminologies

G0

Rapid positioning - Move the axis as quickly as possible

G1

Move to a position by feed rate equal to or slower than rapid

G2

Move the tool or part in an arc in a clockwise direction

G3

Move the tool or part in an arc the opposite direction of G2

G80

Tells the machine not to move

SmithyCNC EZ-Trol II Control System

24 |

Toll Free 1-800-476-4849

Advertising