Digital Dream Technology support

Title: DDCS V3.1 SUBPROGRAM [Print This Page]

Author: duckface    Time: 2021-7-15 21:44
Title: DDCS V3.1 SUBPROGRAM
Hi, I am learning DDCS v3.1. Can you tell me how I can call subroutines/subprograms in gcode? What should the subroutine/subprogram look like? I am asking for some examples
Author: GrowFlo    Time: 2021-7-21 16:44
I found this solution :

G90
G54
M98P1001
M30

O1001
G01Y-2
M98P1003
G01Y2
M99

But I don't know how to launch a subprogram out of my main file.
Author: weitling    Time: 2021-11-3 22:54
A subroutine is called in your Gcode file.  and is referring to a line number
Author: weitling    Time: 2021-11-3 23:05
Last edited by weitling In 2021-11-3 23:06 Editor

A subroutine is called in your Gcode file.  and is referring to a line number M98 start the subprogram and M99 return to the main program.

N5 M5 (Stop Spindel)
N10 M98 P100 (Call subprogram O100)
N15 G00 Z20 ( Goto Z safe)
M3 ( Start Spindel)
M30 (End of program)
O100 (O indicates that the subprogram start here)
N105 G38 2 (Probe command)
N110 M99 (Return to Main program N15)
I hope this helps

Author: gmillwater    Time: 2021-11-5 10:28
I use M98 in most of my turning programs for my lathe. The following example calls the sub 5 times, cutting .005" each pass.

G20 (inches)
G91 (incremental)
G18 (xz plane)
M3 S1000 (start spindle 1000 rpm)
M98 P1234 L5 (call sub 5 times)
M5 (stop spindle)
M30 (end program)

O1234
G0 X.005 (cut depth)
G1 Z-2.500 F10 (turning)
G0 X-.005 (backout)
G0 Z2.500 (return to start)
G0 X.005 (back in)
M99 (end sub)






Welcome Digital Dream Technology support (http://bbs.ddcnc.com/) Powered by Discuz! X3