¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: subroutine calls to other programs


barker806
 

<SNIP>
Is this correct: PART27.TXT is the name of the program that I load
in
Mach2. In PART27.TXT I include the following:

;PART27.TXT GCODES O1
How do I link the names of the other subroutines located in other
gcode programs here to the "O" numbers?
;MISCELANEOUS GCODES
M98 P3000 O2
;MISCELANEOUS GCODES
M30
;End of program O1
In the routine named "ROTATE_FIXTURE.TXT", I include the following:

;ROTATE_FIXTURE.TXT O2
O2 ;I don't know how or where to put this
N1000 ;Misc. gcodes
M99
N2000 ;Misc. gcodes
M99
N3000 ;The rotation routine I am looking for
M98 P200 O3;Call routine to cut the pocket here.
;Misc. gcodes
M99
N4000 ;Misc gcodes
M99
;End of program O2

In the routine called "CUT_POCKET.TXT"
O3 ;I don't know how or where to put this
N200
;Misc. gcodes needed to cut the pocket
M99

I am sure I am majorly mixed up in how to impliment this.
I will be grateful for anyone who will take the time to point me to
a
better example.


Tom Eldredge, RUTEX USA



;ROTATE_FIXTURE.TXT O2
Main Program Here and you call the subs from the main
M98 P1000
M98 P2000
M98 P3000
M98 P4000
M30

O1000 ;First sub
N1000 ;Misc. gcodes
M99 ;Return to main

O2000 ;Sub2
;BLA BLA BLA M this G that
M99

O3000 ;The rotation routine I am looking for
;BLA BLA BLA M this G that
M98 O2000; if you want more of the O2000
;Misc. gcodes
M99

O4000 ;Misc gcodes
;Same thing again
M99
That should do it ... I did it about 3 months ago...the manual has it
as well...
Brian

Join [email protected] to automatically receive all group messages.