CAD CAM EDM DRO - Yahoo Group Archive

re:Re[1]: Gcode shmecode.

Posted by ballendo@y...
on 2000-11-02 16:31:06 UTC
Terry wrote:
>g-codes are defined in rs274ngc.

Terry,

Actually, the "universal" g code specification is the
EIA RS 274-D from 1981. (Electronic Industries Association
Recommended Standard number 274, revision D.)

The word "recommended" has been pointed out in previous posts.

A correct statement would be, "The EMC G codes are defined in
rs274NGC". Which is still not really true, as the EMC project is not
a "recommended standard".

The 274NGC is a separately achieved standard done by the U.S. Air
Force for the "Next Generation Controller" project. And Yes, it IS
based on the old Allen Bradley "flavor" of gcode. Much of the NGC
standard is PHOTOCOPIED from A-B docs!

The NIST EMC is a "follow on" project of the Air Force project.
Most of the EMC implementation of G codes was/is done by Tom Kramer
under the direction of Fred Proctor, and represents their
interpretation of the NGC docs. Internally(and on the biblio's of
published papers), NIST refers to this paper as NCMS. It is VERY
poorly written.(NOT by NIST, BTW. Remember it came from the USAF
project.)

The references you cite ARE good stuff; Tom is an excellent
writer,IMO. But they are only the documentation of the g code
interpreter used by EMC. And NOT the "last word" re: g codes!

Wally wrote:
> How universal is the implementation of gcodes in different
>controllers. Are there times when gcodes have a conflicting
>function in different controllers?

There are really TWO questions in this question:

1) Do the same Gcode numbers/letters refer to the same thing on
different controls?
2) Do the G codes (as referred to) DO the same things in the same
ways?

We'll look at 1) first.

You can pretty much assume that a certain common group of G codes
will REFER to the same operation. For example G0 will be a rapid
move; G1 will be a linear interpolated feedrate move. Others which
are near universal are:

G02- CW circular interpolation (arcs)
G03- CCW circular interpolation (arcs)
G04- delay/pause
G17- xy plane (for arcs)
G18- xz plane (for arcs)
G19- yz plane (for arcs)
G20- inch units (newer controls, older used G70)
G21- metric units (usually mm, also newer ctrls, older used G71)
G28- Machine home (newer controls, older used many different codes)
G33- threading (lathe, constant lead)
G40- cancel cutter diameter compensation
G41- cutter diameter compensation, left
G42- cutter diameter compensation, right
G43- cutter length compensation
G49- cancel cutter length compensation
G53- use machine co ordinate system
G54-G59- six "fixture offsets" (so that parts can be made at
different points on the machine, and returned to when necessary)
G80- cancel "canned" drilling cycle(s)
G81- Canned drill cycle
G83- Canned "peck" drill cycle
G90- Use absolute coordinates
G91- Use relative coordinates (assume zero for this move is end of
last move)
G92- Pre-load counters (sets current position to given value)

In addition, common M codes are:

M00- Stop program
M01- optional stop (uses control panel switch to determine)
M02- End of program (or subroutine)
M03- Spindle on CW
M04- Spindle on CCW
M05- Spindle off
M06- Tool change
M07- coolant on (flood)
M08- coolant on (mist)
M09- Coolant(s) off
M30- Stop program and rewind/reset program to top (to run another
part)

Of course this is not a full list of G and M codes. It is a list of
the codes which will almost ALWAYS refer to the operation as
described above. (definition after each code)

Now, let's look at the second question:

2)Although we can almost always expect a G02 or G03 to be referring
to circular interpolation(arcs), WE CAN NOT always assume it will be
SPECIFIED the same way in each control. Most commonly, with G02 and
G03, the problem is whether an R (radius) can be used, and if not,
JUST HOW the I,J,K (distances to the arc center)values are specified.
Are they from current position to the center?; or from machine zero
to the center?, ETC.

Much of the specifics of typical g code usage has been covered in
past posts on this list. A search will provide lots of info. IMO,
Mike Lynch (CNC concepts) writes some of the clearest info re: gcodes.

> I read a post somewhere that EMC was based on a old allen bradley
>controller.

See above reply to Terry.

Hope this helps.

Ballendo

Discussion Thread

cnc002@a... 2000-11-02 15:24:01 UTC Re: [CAD_CAM_EDM_DRO] Re[1]: Gcode shmecode. ballendo@y... 2000-11-02 16:31:06 UTC re:Re[1]: Gcode shmecode.