0% found this document useful (0 votes)
77 views

G CODE Syntax Summary

The document provides an overview of programming a CNC 8040/55 machine. It discusses block programming, plane selection, units, coordinate systems, tool compensation, circular interpolation, additional preparatory functions, and programming in a high-level language. Programming can be done from the CNC or from a computer via DNC. The document also lists various G-codes for functions like feedrate, tool numbers, work zones, and zero offsets.

Uploaded by

Vojkan Milenovic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views

G CODE Syntax Summary

The document provides an overview of programming a CNC 8040/55 machine. It discusses block programming, plane selection, units, coordinate systems, tool compensation, circular interpolation, additional preparatory functions, and programming in a high-level language. Programming can be done from the CNC or from a computer via DNC. The document also lists various G-codes for functions like feedrate, tool numbers, work zones, and zero offsets.

Uploaded by

Vojkan Milenovic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

CNC 8040/55 TRAINING

The CNC is reading 20 blocks ahead and 50 blocks ahead with CPU TURBO; G4 previous block
Block numbers are not required.
Block labels are needed for making jumps.
Program Block:

ISO
HIGH LEVEL LANGUAGE > Control Sentences.
> Any type of expression
> Parenthesis
> Subroutines

End of block : is optional ; number of repetitions of the block (N0...9999) ; block comment.

Block Skip: /, /1 > BLKSKIP1


/2 > BLKSKIP2
/3 > BLKSKIP3

Programming from CNC, from the Computer > DNC.

Peripheral Device:
%FAGOR AUTOMATION,MX, <LF>
G00 X0 <LF>
X1.5 <LF> ; LF> ^J
N100 X2 <LF> ; CR> ^M
M30 <LF> ; EOT> ^D
<EOT>

PLANE SELECTION

G16 axis1, axis2 > enables selection of the desired work plane plus the direction. axis1> abscissa.
axis2>ordinate

G17 > XY
G18 > ZX
G19 > YZ

UNITS

G70 > Inches


G71 > Mms
G90 > Absolute
G91 > Incremental

PROGRAMMING OF COORDINATES

Cartesian Coordinates
Polar Coordinates
Cylindrical Coordinates
One Angle and Cartesian Coordinates

1
ROTARY AXIS.
WORK ZONES: Definition of the work zones; Using work zones.
REFERENCE SYSTEMS:

Machine Reference Zero


Part Zero
Machine Reference Point.

ZERO OFFSETS
Distance between the part zero ( point of the origin of the part) and the machine zero (point of the
origin of the machine)

G93 > Polar Origin Preset


G92 > Coordinate Preset
G54..G59 > Zero Offsets;
G58, G59 > Additive Zero Offsets.

Programming with respect to Machine Zero (G53)

PROGRAMMING BY ISO CODE

Preparatory Functions . . . . (G)


Axis Coordinates . . . . . . . . (X. . . C)
Feedrate . . . . . . . . . . . . . . . (F)
Spindle Speed . . . . . . . . . . .(S)
Tool Number . . . . . . . . . . . (T)
Tool Offset Number . . . . . .(D)
Auxiliary Functions . . . . . . (M)

FEEDRATE FUNCTIONS

G94 > mm/min; inches/min.


G95 > mm/rev; inches/rev.

TOOL NUMBER

A > Available
E > Worn out (life expired)
R > Rejected

CIRCULAR INTERPOLATION

G2, G3 > Cartesian; Polar.


G06 > Center of the arc in absolute coordinates.
G08 > Arc tangent to the previous path.
G09 > Arc defined by three points.
G37 > Tangential entry.
G38 > Tangential exit.
G36 > Radius blend.
G39 > Chamfer blend.
G33 > Threading.

2
ADDITIONAL PREPARATORY FUNCTIONS
G4 > Interruption of the block preparation.
G4 K? > Dwell
G05 > Round Corner
G07 > Square Corner
G10-11-12-13-14 > Mirror Image.
G72 > Scaling Factor

TOOL COMPENSATION
G41/G42 > (R+I)
G15, G43 > (L+K)

PROGRAMMING IN HIGH LEVEL LANGUAGE


Lexical description > capital letter.
Reserved words.
Numerical Constants > (TIMER = $5FF5E100)
Symbols > () “ = - * / ,
Variables:
General Purpose Parameters
General Parameters
Local Parameters

Variables associated w/ TOOLS


w/ ZERO OFFSETS
w/ MACHINE PARAMETERS
w/ WORK ZONES
w/ FEED
w/ COORDINATES
w/ SPINDLE
w/ PLC
w/ LOCAL PARAMETERS
w/ OTHERS
Constants, Operators, Expressions: Arithmetic; Relational.
PROGRAM CONTROL STATEMENTS
Assignment Statements Subroutine Statement
(P102 = FZLOY) (SUB integer)
Display Statements (RET)
(ERROR #, “Error text”) (PCALL expres., assgn. stat., assign. stat.)
(MSG “message”) (MCALL expres., assgn. stat., assign. stat.)
Enabling-Disabling Statements (MDOFF)
(ESBLK & DSBLK) (PROBE expres., assgn. stat., assign. stat.)
(ESTOP & DSTOP) (DIGIT expres., assgn. stat., assign. stat.)
(EFHOLD & DFHOLD) (TRACE expres., assgn. stat., assign. stat.)
Flow Control Statements Statements for Generating Programs
(GOTO N expression) (OPEN P expres., DNC1/2 AD)
(RPT N expression, N expression) (WRITE)
(IF <action1> ELSE <action2>)

You might also like