User Tools

Site Tools


mycnc:subroutines

This is an old revision of the document!


Subroutines in myCNC

Subroutines in myCNC are done in a manner similar to other industrial CNC systems.

Sample code of a G-code program containing subroutines #100 and #101:

G90 G0 Z10  F500
#100=[10]
#101=[10]
G0 X#100 Y#101
M98 P101 L5
M2
O100
G0 X#100Y#101
G1Z0
G2 X#100 Y#101 I10
#100=[#100+40]
G0 Z10
M99
O101
M98 P100 L5
#100=[10]
#101=[#101+40]
M99

The resultant program will look the following way:

mycnc/subroutines.1583523893.txt.gz · Last modified: 2020/03/06 14:44 by ivan

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki