Machsupport Forum

G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: dhookings on December 17, 2008, 05:27:38 AM

Title: G12 Problem
Post by: dhookings on December 17, 2008, 05:27:38 AM
Background: I am experimenting with making a solder mask for a pcb. My pcb layout programme gives me a list of x/y positions which indicate the centre of a pad. These need scaling by .0001 to represent inches, so at the start of my main programme I code g51 x.0001 y.0001. I have decided to use a circle to stencil a blob of paste on each land.
My milling tool is 32th, so for a 40th wide pad I use a subroutine:
O540 %40th wide pad
g0 z.004
g1 z-.004
g12 I.004
g0 z.1
m99

For some reason that code, when shown in the toolpath, gives a straight cut on the x axis to x0, wherever the starting coordinate position is, and no circle.
I have assumed no scaling on the I word as the manual says that scaling can apply to I and J but does not show the syntax for it. Anyway, the toolpath shows exactly the same path if I use g12 I4 instead.

I must be doing something obviously wrong, but I can't see it.

Dave
Title: Re: G12 Problem
Post by: dhookings on December 29, 2008, 05:11:07 AM
Sorry, I've just realised this is a statement and not a question.

What I omitted to say is can anyone suggest why my use of g12 is not responding as I was expecting?

Dave
Title: Re: G12 Problem
Post by: Graham Waterworth on December 29, 2008, 02:59:16 PM
Try the code like this

Graham


O540 (40th wide pad)
g0 z.004
g1 z-.004
g12 I.004
g0 z.1
m99

Title: Re: G12 Problem
Post by: dhookings on December 30, 2008, 11:39:55 AM
Thanks for that. I can only see a difference in the comment and changing that made no difference.

It did prompt me to have another look however, and what I had not mentioned was that in the calling programme I had a line G51 X.0001 Y.0001.
When I first wrote that I read that the scaling covered xyzabcij and that you selected which to apply it to on the same line. I had assumed that it only applied to X and Y, but adding G50 at the start of the subroutine and G51 X.0001 Y.0001 at the end made everything work as required, so the G51 worked on I and J automatically.

Dave