Hello Guest it is April 19, 2024, 07:49:46 PM

Author Topic: Sub within a Sub ?  (Read 8919 times)

0 Members and 1 Guest are viewing this topic.

Re: Sub within a Sub ?
« Reply #10 on: May 01, 2009, 08:05:44 AM »
Really neat Tony.
This is a fine example of using G92.
This is what I was trying to do in the initial post.  I LIKE IT !
I goes good with the description in the G-Code list.
One can save it like below and just plug in the part program and set the offsets to suit.
Wizards are fine but I like to see whats happening.

 G91.1
#1=0
#2=0
M98 P10 L4
M98 P11 L9
M30

o10
************
PART PROGRAM
************

g92 x[#1+5]
m99

o11
G92 y[#2+5] X[#1-15]
M98 P10 L4
M99
%

Is it, or does it need to be cancelled with G92.1 or 2 just before M30 ?
If not, will the offsets carry over to the next program ?
Should I include G92.1 in the initialization string ?

Thanks much Tony, good examples really help to see the effects of the functions.
RC

vmax549

*
Re: Sub within a Sub ?
« Reply #11 on: May 01, 2009, 09:06:32 AM »
Yes you should cancell it when done sorry I forgot to include that part, Good call (;-)

It is always a GOOD idea to clean up the mess after each program is done to assure the next program will run correctly.

Hope it helps (;-) TP