Skip to content

Subroutines

Sven edited this page Aug 11, 2017 · 3 revisions

Subroutines

GRBL-Ploter supports now M98 and M99 commands.
Further information can be found here: http://cnc-programming-tips.blogspot.nl/2014/11/m97-m98-m99-sub-programs-or-sub-routines.html

Note: when using auto leveling the subroutines will be processed to apply Z values.

Example squares:

(Test subroutine)
G0 X10 Y10 Z2 F2000
M98 P1234       (call sub once)
G0 X30 Y10 Z2
M98 P1234 L2    (call sub twice)
G0 X50 Y10 Z2
M98 P1234 L3    (call sub 3 times)
M30

( Test relative moves)
O1234   (start of sub)
G91
G1 Z-4
Y10
X10
Y-10
X-10
G0 Z4
X1 Y1
G90
M99     (end of sub)

Unterprogramm 1
Import an image

Example scale:

(Draw a scale on the )
(circumference of a cylinder)
(using a rotary axis)
G00 Z2
G00 X0 Y0
M98 P0090 L4
M98 P0030 L12
M98 P0005 L72
M30

(90° graduation)
O0090
G91
G01 Z-4
X10
G00 Z4
X-10 Y90
G90
M99

(30° graduation)
O0030
G91
G01 Z-4
X7.5
G00 Z4
X-7.5 Y-30
G90
M99

(5° graduation)
O0005
G91
G01 Z-4
X5
G00 Z4
X-5 Y5
G90
M99

Import an image