Machsupport Forum

G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: vanman on December 21, 2009, 08:42:50 AM

Title: Multiple Parts
Post by: vanman on December 21, 2009, 08:42:50 AM
Hi.
    The programme I was writting is now complete and all the subroutines run OK (thanks for your help Sam)    Now what I want to achieve is to machine multiple parts from one piece of material.     So I need to move the X0 Y0 point several times and run the programme again from those points.     I presume I will have to use G10     If that is the case, I presume again, that the line should read:   G10L2P1X-22.5Y0.0   To move the zero point 22.5 into the X- quadrant.    I don't know how the P value is arrived at and indeed what it actually represents.     Do these values remain constant at every relocation of the X0 Y0?    Should these moves be absolute or incremental?    What command is required to run the main programme again at these locations.    Thanks in anticipation.
Regards.
Title: Re: Multiple Parts
Post by: Graham Waterworth on December 21, 2009, 10:36:59 AM
You need to use G52 Xx Yy this is a local datum and is used like this :-

g54 g00 g90 g....... (initial start lines)
g52 x20. y20. (move x 20mm and y 20mm)
m98 p1 (call a sub or any lines of code)
g52 x0 y0 (cancel the shift)
g52 x40. y20. (move to next shift pos)
m98 p1
g52 x0 y0
etc.......

Graham

Title: Re: Multiple Parts
Post by: vanman on December 21, 2009, 11:34:51 AM
Thanks Graham, I'll give that a go.
Regards.
                                   Mick