beautypg.com

Smithy CNC Mills User Manual

Page 22

background image

SmithyCNC Programmer’s Reference Manual: G Codes

2-7

If origin offsets (made by G92 or G92.3) were in effect before G10 is used, they will

continue to be in effect afterwards.

The coordinate system whose origin is set by a G10 command may be active or

inactive at the time the G10 is executed.

Example: G10 L2 P1 x 3.5 y 17.2 sets the origin of the first coordinate system (the

one selected by G54) to a point where X is 3.5 and Y is 17.2 (in absolute

coordinates). The Z coordinate of the origin (and the coordinates for any rotational

axes) are whatever those coordinates of the origin were before the line was

executed.

2.7 G17, G18, G19: Plane Selection

Program G17 to select the XY-plane, G18 to select the XZ-plane, or G19 to select

the YZ-plane. The effects of having a plane selected are discussed in Section

[sub:G2,-G3:-Arc] and Section [sub:G81-to-G89:]

2.8 G20, G21: Length Units

Program G20 to use inches for length units. Program G21 to use millimeters.

It is usually a good idea to program either G20 or G21 near the beginning of a pro-

gram before any motion occurs, and not to use either one anywhere else in the

program. It is the responsibility of the user to be sure all numbers are appropriate

for use with the

current length units.

2.9 G28, G30: Return to Predefined Absolute Position

G30:-Return>

Two positions are defined (by parameters 5161-5166 for G28 and parameters 5181-

5186 for G30). The parameter values are in terms of the absolute coordinate system

and the machine's native coordinate system.

To return to the predefined position by way of the programmed position, program

G28 X- Y- Z- A- B- C- (or use G30 ...). All axis words are optional. The path is made

by a traverse move from the current position to the programmed position, followeby

a traverse move to the predefined position. If no axis words are programmed, the

intermediate point is the current point, so only one move is made.

G28 and G30 do not use home switches to find the predefined position. They mere-

ly command a rapid motion to the position defined by the parameters, assuming

that the machine has already been homed.