An example of non-modal g-code execution follows – Rockwell Automation 8520-MUM 9/Series CNC Mill Operation and Programming Manual Documentation Set User Manual

Page 299

Advertising
background image

Introduction to Programming

Chapter 10

10-25

How the modal G-codes are executed is shown below, taking G00 and
G01, both classified into the same G--code group.

Example 10.9

Modal G- code Execution

G00 X1. Y2.;

G00 mode is effective

Y3. ;

G00 mode is in effect

G01 X2. Y1. F1;

G01 mode is made effective

X3. Y3. ;

G01 mode is in effect

G00 X1.Y2. ;

G00 mode becomes effective again

G01 G00 Y3, ;

G00 mode is in effect

G01 G91 Y2 ;

G01 and G91 both in effect

An example of non-modal G-code execution follows:

Example 10.10

Non-Modal G- code Execution

G00 X1. Y21 ;

G00 mode is effective

G28 X2.;

G28 mode, this block only

X2. Y1. ;

G00 mode is effective

G04 P2. ;

G04 active this block only

Important: When programming more than one G-code from the same
modal group in a block, the control will execute the block as the G-codes
occur sequentially from left to right. Any mode that is being changed in a
block only applies to the values to the right of the G-code. Characters to
the left of the G-code still use the old operating mode.

Example 10.11

Changing Modes Mid-Block

N10G90X10G91Y10;

X10 is absolute (G90) Y10 is
incremental (G91).

N20X20;

X20 is incremental (G91).

N30X30G90Y10;

X30 is incremental (G91), Y10 is
absolute (G90).

N40M30

Table 10.E breaks down the G-codes into their modal groups. For
example, G-codes in group 01 are modal only with other G-codes in group
01. G-codes in the 00 group are non-modal and are effective only in the
block in which they are programmed.

Advertising