Gentlemen,
Could one of you give a brief example of a subroutine call to another
part program? I don't see where the program names are entered in the
main part program (O1), although I admit that the calls to VB
scripts, and Macro's seem to have me a bit confused.
If I have two gcode routines that need to be called often from one
main gcode program, I don't want to have to include the coding of the
routines in the code of the first part program that I load in Mach2.
For example, In Windows, I name the main program "PART27.TXT", one
routine "ROTATE_FIXTURE.TXT", and the other "CUT_POCKET.TXT"
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