Programming examples

To clarify the subject mentioned above, a programming example is presented here in anticipation of the sections further below.

The following address characters are used:

Path preparatory functions:

G00 "Rapid traverse"

G01 "Linear interpolation"

Spindle:

S1000 "Spindle speed 1000 rpm."

Feedrate:

F5000 "Feedrate 5000 mm/min"

Numerical axes:

X, Y, Z "three Cartesian axes"

Machine functions:

M03 "Clockwise spindle rotation at programmed speed"

M05 "Spindle stop"

M30 "Program end”

Programing Example

prg_example

Summary of previous commands described

% 100

N10 G00 X100 Y100           ;Move at rapid traverse to X=Y=100

N20 Z100;                    ;Move at rapid traverse to Z=100 G00

                            ;remains active until deselected by

                            ;another G function occurs

N30 G1 Z50 F5000 S1000 M3   ;Clockwise spindle rotation 1000 rpm and

                            ;Move linearly at feedrate

                            ;5000 mm/min) to Z=5

N40 Z100;                    ;Move at feedrate to Z=100

N50 G0 X200 Y200 Z200       ;Move at rapid traverse to X=Y=Z=200

N50 M5                      ;Spindle stop

N60 M30                     ;Program end