Remarks on the subprogram feature in simCNC v3.600 beta 1

Commands and symbols for handling subprograms:

  • M98 P<no> L<number of repetitions>

    command calling the subprogram with a given number (P argument), with the specified number of repetitions (L argument)

  • M99

    command marking the end of the subprogram

  • O<no>

    Subprogram label with its number

 

Example usage:

T1M6
M98 P1 L20
M98 P25 L40
M30

O1
G0 X0 Y0 Z0
G1 X100 F5000
G1 Y100
G1 X0
G1 Y0
G0 Z5
G0 X100 Y100
G0 X0 Y0
M99

O25
M151 G4 P1000
G0 X0 Y0 Z0
G1 X50 F5000
G1 Y50
G1 X0
G1 Y0
G0 Z5
M150 G4 P1000
M99