CAD CAM EDM DRO - Yahoo Group Archive

re:Re: G code Examples

Posted by ballendo@y...
on 2001-01-25 04:56:07 UTC
John,

Matt has given you step by step usage for EMC. I'll try to address
your 'conceptual' concerns...
(snips,inserts below)

<snip>and trying to understand what operational methods people
typically employ (locating origins, incremental versus absolute
positions, etc.)

I recommend you stay in absolute mode at first. And work with ONE of
the nine "move-able" coord systems available in EMC (as Matt
mentioned, default is G54). The others are G55-59,59.1,59.2,and 59.3

Remember you have MACHINE coords, PROGRAM coords, and PART coords.
You can "move" the machine coords to match the position of your
part/program coords. For example, you mention that your 'current'
home position is center of travel in XY, and 'up high' such that Z-10
is 1-1/2 inches above part surface. Just as you "chose" this home,
you can choose another...

You can use G92 to 'set' the CURRENT position to ANY coordinate
value. It is Best to use G92X0Y0Z0 at first, which just sets the
CURRENT position as absolute zero (this will be the zero for the G54
coordinate system, unless you have set a different coord system). Do
you understand the use of different coord systems as used by G53-G59
in EMC?

>2) With respect to origins, and absolute mode, etc. How are these
>set,and used both in the drawing package and the machine tool/G code.

Again, I suggest you work in absolute mode at first. The CAM part of
your drawing package should have a setting to output coords in
absolute mode. Most CAD/CAM will either use lower left, or center
screen as PART zero, by default. BE SURE YOU KNOW WHICH YOUR PROGRAM
IS DOING!
However, most CAM software will let you specify a point on the
drawing to be used as PROGRAM ZERO. The type of part will determine
the best place for this, but a beginner will do well to keep it
FIRMLY in mind, wherever it is placed... (I suggest lower left for
beginners)

>My mill is configured to "home" at the center of the X and Y Axis,

Does this mean you travel to a home switch at one end of the travel
in XY, and then move a distance in XY half the available travel; upon
arrival the counters (coords) are set to zero?

>with Z almost all the way up, and Z-10 around 1 1/2" from the >table.

The zero point for the Z axis is usually set at the part material
surface. Some shops use a "release plane" of .100 and set zero .100
above the part. I think this is confusing, and recommend you set the
z axis zero point to the material surface(using tool 'touchoff').
This way, a negative coord CUTS, and a positive coord doesn't
(assuming a flat material surface)!

A second suggestion: Since the Z is set up this way, why not be
consistent, and set XY the same way? Most large machining
centers "home" to the most POSITIVE position, and call that place
MACHINE zero. This way any move INTO the cutting area is a negative
coordinate (at least at the startup).

>I would think I might use some type of relative coordinate system
>(ignoring the positions EMC reports after homing) to allow me to
>locate the tool and touch off where I want the operation to start,
>then have the cut proceed from there.

Yes. This is 'relative' to MACHINE zero, which is zero in the G53
coord system. The system you will use is 'overlaid' onto the MACHINE
coords, and is called G54 (until, and unless, you change it).

This is the most confusing part of CNC for beginners, IMO. That there
are 'several' ZERO positions, and they each can be moved relative to
each other. So let's get them straight:

1)Machine zero: The position at which the home switches 'actuate'. As
I said, this is often the most positive position of XYZ on machining
centers.
NOTE: Engravers and routers usually home to the most negative
position in XY, and the most positive in Z.

Note that either way, this zero is set by the construction of the
machine and does not change! (most CNC controller software WILL let
you 'select' which "corner" of the machine travel is used for home)

2)Part zero: The point of the DRAWING which has coordinates X0Y0Z0.
Note that this MAY NOT BE ON THE PART! You would move this one around
by manipulating the drawing in CAD.

3)Program Zero: The point of the TOOLPATH which has coords of X0Y0Z0.
Again, this MAY not be on the part! You move this one around by
manipulating the CAM part of your package, if you have one; or by
choosing the coordinates of the toolpath, if you are hand coding the
part.

4)Absolute Reference Point: The point on the machine (in the CURRENT
coordinate system) which has the value X0Y0Z0. You move this one
around with G53-G59 (fixture offsets, which is another name for
additional coordinate systems),G92(which assigns a value to the
CURRENT position). Many PC CNC programs will also have a way to set
and/or move this point independant of Gcode programming.

>Another part I'd like to make involves a large half circle flat
>plate,which I would cut a contour to create the perimiter of the
>half circle. If my origin was the center of the circle, and the
>radius was almost the limit of a direction of travel, then I might
>have to start my operation near the -limit of the
>travel, i.e.:

+y
| ********
| * *
| * *
| * *
| * *
-x------*----------------*------ +x
| * *
| * *
| * *
| **********@*********
|
-y

><snip>My current part drawing has the origin of the drawing at
>the "@" sign. In order to cut this part, my initial start position
>would need to be close to -y. How is this properly set up, with
>respect to configuring my origin in my cad software, and configuring
>G code to cut this (absolute versus incremental coordines in my
>moves, and relative/absolute values in EMC)

If, as you say, the DRAWING(and so also the toolpath) have the
part/program zero at the @ sign, then you simply need to align the
machines' current coordinate system zero(this will be X0Y0 of the G54
coords set)TO the part/program zero(the @ sign). You can do this as
Matt suggested, by measuring the distance from machine zero (g53,
which does not change) TO the '@'. You would then enter these coords
into the g54 command as Matt presented... This has the effect
of "offsetting" the G54 coordinate system FROM the G53 MACHINE COORD
SYSTEM a specified amount. (this is how all the G54-59.3 "fixture
offsets coords systems are set)

You could also clamp the stock in the machine, jog to the position
where the "@" sign would be (in the real world, as marked on the
part). Then you would command (with MDI)a G92X0Y0 (assumes z has been
set by tool touchoff already). The coords will switch to X0 and Y0,
and then you run the part.


Think of it this way: When you start EMC, it is as if you have 10
sheets of graph paper, all lined up with each other. The 'bottom'
sheet is "fixed in place and can't move. ALL the others can be moved,
relative to the bottom(machine) one, and to each other...

And this is ALL assuming you are only using ABSOLUTE (G90)
positioning! Any use of Relative(G91) moves will be like
adding "temporary" pieces of graph paper to the stack. And can get
REAL confusing, REAL fast!

>I suspect that this has very little to do with EMC and much more with
>understanding how the G codes work.

YES!

>I apologize for this long winded attempt to convey this question.
>John Murphy

And I apologise for this even longer-winded answer!

Ballendo

P.S. this answer may not be as clear as a "fresh" description, since
I was trying to include your example, and specific questions... If I
have not made this clear, please ask for more explanation.

Discussion Thread

ballendo@y... 2001-01-25 04:56:07 UTC re:Re: G code Examples