NC Mill SFTWR Manual

Download as pdf or txt
Download as pdf or txt
You are on page 1of 117

^1 SOFTWARE REFERENCE MANUAL

^2 PMAC NC FOR MILL APPLICATION

^3 Integrator/Software Manual

^4 3xx-603450-xSxx

^5 September 29, 2003

Single Source Machine Control Power // Flexibility // Ease of Use


21314 Lassen Street Chatsworth, CA 91311 // Tel. (818) 998-2095 Fax. (818) 998-7807 // www.deltatau.com
Copyright Information
© 2003 Delta Tau Data Systems, Inc. All rights reserved.
This document is furnished for the customers of Delta Tau Data Systems, Inc. Other uses are
unauthorized without written permission of Delta Tau Data Systems, Inc. Information contained
in this manual may be updated from time-to-time due to product improvements, etc., and may not
conform in every respect to former issues.
To report errors or inconsistencies, call or email:
Delta Tau Data Systems, Inc. Technical Support
Phone: (818) 717-5656
Fax: (818) 998-7807
Email: [email protected]
Website: http://www.deltatau.com
Operating Conditions
All Delta Tau Data Systems, Inc. motion controller products, accessories, and amplifiers contain
static sensitive components that can be damaged by incorrect handling. When installing or
handling Delta Tau Data Systems, Inc. products, avoid contact with highly insulated materials.
Only qualified personnel should be allowed to handle this equipment.
In the case of industrial applications, we expect our products to be protected from hazardous or
conductive materials and/or environments that could cause harm to the controller by damaging
components or causing electrical shorts. When our products are used in an industrial
environment, install them into an industrial electrical cabinet or industrial PC to protect them
from excessive or corrosive moisture, abnormal ambient temperatures, and conductive materials.
If Delta Tau Data Systems, Inc. products are directly exposed to hazardous or conductive
materials and/or environments, we cannot guarantee their operation.
PMAC NC for Mill Application

Table of Contents
INTRODUCTION .......................................................................................................................................................... 1
Hardware/Software Components.................................................................................................................................. 1
Hardware Components ............................................................................................................................................ 1
Software components:.............................................................................................................................................. 1
NC 32 BIT FOR MILL APPLICATION...................................................................................................................... 3
Introduction .................................................................................................................................................................. 3
NC Mill Basics ............................................................................................................................................................. 3
Tool Motion ............................................................................................................................................................. 3
Tool Movement Specification................................................................................................................................... 3
Axis Move Specification........................................................................................................................................... 4
Feed Specification ................................................................................................................................................... 4
Cutting Speed Specification ..................................................................................................................................... 4
Tool Movement Considerations ............................................................................................................................... 4
Coordinate Systems ................................................................................................................................................. 5
Machine Coordinates............................................................................................................................................... 5
Program Coordinates .............................................................................................................................................. 5
Absolute Coordinate Positions ................................................................................................................................ 6
Incremental Coordinate Values ............................................................................................................................... 6
Reference Point........................................................................................................................................................ 6
G Code Library............................................................................................................................................................. 7
CNC G-Codes .......................................................................................................................................................... 7
G Codes........................................................................................................................................................................ 9
G00 Rapid Traverse Positioning ............................................................................................................................. 9
G01 Linear Interpolation......................................................................................................................................... 9
G01.1 Spline Interpolation ...................................................................................................................................... 9
G02 Circular Interpolation CW (Helical CW) ...................................................................................................... 10
G03 Circular Interpolation CCW (Helical Interpolation CCW) ........................................................................... 11
G04 Dwell.............................................................................................................................................................. 12
G09 Exact Stop ...................................................................................................................................................... 12
G10 Programmable Data Input............................................................................................................................. 13
G10.1 PMAC Data Input By Program................................................................................................................... 13
G17/G18/G19 (XY/ZX/YZ) Plane Selection ........................................................................................................... 14
G25 Spindle Detect Off .......................................................................................................................................... 14
G26 Spindle Detect On .......................................................................................................................................... 14
G27 Reference Point Return Check ....................................................................................................................... 14
G28 Return to Reference Point .............................................................................................................................. 15
G29 Return from Reference Point.......................................................................................................................... 15
G30 Return to Reference Point 2nd - 3rd ............................................................................................................... 15
G31 Move Until Trigger ........................................................................................................................................ 15
G40/G41/G42 Cutter Compensation ..................................................................................................................... 15
Compensation Requirements ................................................................................................................................. 17
How PMAC Introduces Compensation.................................................................................................................. 18
Speed of Compensated Moves................................................................................................................................ 18
Treatment of Inside Corners .................................................................................................................................. 18
Treatment of Outside Corners ............................................................................................................................... 18
G43/G44/G49 Tool Length Compensation + /- and Cancel.................................................................................. 29
G45/G46/G47/G48 Single Block Tool Offsets ....................................................................................................... 29
G50/G51 Coordinate Scaling ................................................................................................................................ 29
G50.1/G51.1 Coordinate Mirroring ...................................................................................................................... 29
G52 Local Coordinate System Set ......................................................................................................................... 30
G53 Machine Coordinate Selection....................................................................................................................... 31
G54-59 Work Coordinate System 1-6 Selection .................................................................................................... 31
G61 Exact Stop Mode ............................................................................................................................................ 32

Table of Contents i
PMAC NC for Mill Application

G64 Cutting Mode ................................................................................................................................................. 32


G65 MACRO Instruction ....................................................................................................................................... 33
G68/G69 Coordinate System Rotation................................................................................................................... 33
G70 Bolt Hole Circle Pattern ................................................................................................................................ 33
G70.1 Bolt Hole, Center Hole Ignore Pattern ....................................................................................................... 34
G71 Arc Pattern..................................................................................................................................................... 35
G72 Bolt Line Pattern............................................................................................................................................ 35
G80-89 Canned Cycles .......................................................................................................................................... 36
G80 Canned Cycle Cancel..................................................................................................................................... 37
G81 Drilling Cycle ................................................................................................................................................ 37
G82 Boring, Spotfacing, Counter Sinking Cycle (Free Cutting) ........................................................................... 38
G83 Deep Hole (Peck) Drilling Cycle ................................................................................................................... 40
G84 Tapping Cycle ................................................................................................................................................ 41
G85 Reaming, Boring Cycle .................................................................................................................................. 42
G87 Boring Cycle (Manual or programmed quill return) ..................................................................................... 44
G88 Boring Cycle (Free cutting, manual or programmed quill return) ................................................................ 45
G89 Boring Cycle (Finishing cut, free cutting) ..................................................................................................... 46
G90/G91 Absolute/Incremental Mode ................................................................................................................... 47
G90.1/G91.1 Arc Radius Abs/Inc Mode ................................................................................................................ 47
G92 Work Coordinate System Set.......................................................................................................................... 47
G93 Inverse Time Feed.......................................................................................................................................... 48
G94/G95 Feed Per Min/Feed Per Rev................................................................................................................... 49
G98/G99 Canned Cycle Return Point.................................................................................................................... 49
M00 Program Stop ................................................................................................................................................ 50
M01 Optional Stop................................................................................................................................................. 50
M02 Program Rewind............................................................................................................................................ 50
M03 Spindle Clockwise.......................................................................................................................................... 50
M04 Spindle Counterclockwise ............................................................................................................................. 50
M05 Spindle Stop................................................................................................................................................... 50
M06 Tool Change .................................................................................................................................................. 51
M08 Coolant On .................................................................................................................................................... 51
M09 Coolant Off .................................................................................................................................................... 51
M19 Spindle Orient................................................................................................................................................ 51
M30 End of Program (and Rewind)....................................................................................................................... 51
M87 Start Data Gathering..................................................................................................................................... 52
M88 End Data Gathering ...................................................................................................................................... 52
M98 Subroutine Call.............................................................................................................................................. 52
M99 Return from Subroutine ................................................................................................................................. 54
T-Codes ...................................................................................................................................................................... 56
T-Code Format ...................................................................................................................................................... 56
Miscellaneous............................................................................................................................................................. 56
Block Delete Character: / ...................................................................................................................................... 56
PARAMETRIC PROGRAMMING ........................................................................................................................... 57
Introducing Parametric Programming ........................................................................................................................ 57
Example Programs ................................................................................................................................................ 57
Parametric Subroutines ......................................................................................................................................... 61
Variables................................................................................................................................................................ 62
Expressions............................................................................................................................................................ 69
Program Control......................................................................................................................................................... 72
Formatted Output .................................................................................................................................................. 75
Parameter Display................................................................................................................................................. 76
M Code Aliasing ........................................................................................................................................................ 77
General Concepts .................................................................................................................................................. 77
Aliasing M Codes................................................................................................................................................... 77
Integration .................................................................................................................................................................. 79

ii Table of Contents
PMAC NC for Mill Application

TOUCH PROBING FOR PMAC-NC......................................................................................................................... 81


PMAC-NC Probing Appendix ................................................................................................................................... 81
Hardware Integration Manual .................................................................................................................................... 81
Differences Between PMAC and PMAC2.............................................................................................................. 81
PMAC Wiring for Skip Signal................................................................................................................................ 81
Installing a Spindle and Table Probe .................................................................................................................... 83
Optical Interface.................................................................................................................................................... 83
Software Integration Manual...................................................................................................................................... 86
Probing Memory Map............................................................................................................................................ 86
Installation of Software.......................................................................................................................................... 86
Files Required for Installation............................................................................................................................... 86
Testing of the Probe............................................................................................................................................... 87
Testing G31 operation. .......................................................................................................................................... 87
Machining Center Operators Manual ......................................................................................................................... 88
Probing Cycles....................................................................................................................................................... 88
Calling Method ...................................................................................................................................................... 88
Calibration............................................................................................................................................................. 89
Safe Axis Movement............................................................................................................................................... 94
Measurement ......................................................................................................................................................... 95
Miscellaneous Macros ......................................................................................................................................... 105
Alarms ...................................................................................................................................................................... 109
Broken Tool ......................................................................................................................................................... 109
A Input Missing.................................................................................................................................................... 109
B Input Missing.................................................................................................................................................... 109
C Input Missing.................................................................................................................................................... 109
D Input Missing ................................................................................................................................................... 109
Data #130-#139 Missing ..................................................................................................................................... 110
Format Error ....................................................................................................................................................... 110
G65 Address Code Missing.................................................................................................................................. 110
G65 Nesting Level Exceeded ............................................................................................................................... 110
H Input Not Allowed ............................................................................................................................................ 110
M Input Not Allowed............................................................................................................................................ 110
No Feed Rate ....................................................................................................................................................... 110
No Tool Length Active ......................................................................................................................................... 110
Path Obstructed ................................................................................................................................................... 110
Probe Fail............................................................................................................................................................ 110
Probe Open.......................................................................................................................................................... 110
Runtime Error...................................................................................................................................................... 110
S Input Not Allowed ............................................................................................................................................. 110
SH Input Mixed .................................................................................................................................................... 110
ST Input Mixed..................................................................................................................................................... 110
T Input Missing .................................................................................................................................................... 110
T Input Not Allowed............................................................................................................................................. 111
TM Input Mixed ................................................................................................................................................... 111
Tool Out of Range................................................................................................................................................ 111
X Input Missing.................................................................................................................................................... 111
XY Input Missing.................................................................................................................................................. 111
XY Input Mixed .................................................................................................................................................... 111
XYZ Input Missing ............................................................................................................................................... 111
XYZ Input Mixed .................................................................................................................................................. 111
Y Input Missing .................................................................................................................................................... 111
Z Input Missing .................................................................................................................................................... 111
ZK Input Mixed .................................................................................................................................................... 111

Table of Contents iii


PMAC NC for Mill Application

iv Table of Contents
PMAC NC for Mill Application

INTRODUCTION
Although this manual discusses NC-32 in terms of the ADV810 Control Panel, it is equally applicable to
the ADV800 and ADV600, with regard to software and operation.
The manual assumes that the Control Panel package is already wired to the machine or is to be used with
the UMAC DEMO box.
Hardware/Software Components
Normally, the system is delivered with the following components installed:
Hardware Components
• ADV810 Control Panel
• UMAC
Software components:
• NCUI32
• CNC Auto Pilot
• Executive S/W to talk
• Turbo Setup Program
• PMAC Plot program

Introduction 1
PMAC NC for Mill Application

2 Introduction
PMAC NC for Mill Application

NC 32 BIT FOR MILL APPLICATION


Introduction
This chapter defines the basics of CNC Mills, and instructions for the PMAC-NC32 for Windows
application. The goal of this document is to provide descriptions of the software within the required
hardware environment and a detailed description of RS-274 style G-Code programming.
The default G-codes delivered with PMAC-NC32 are designed to emulate a Fanuc 10 style of G-codes.
Hence a CNC program posted for a Fanuc 10 should work without any changes.
NC Mill Basics
Unlike a lathe tool, which moves around the work piece to produce a shape, a rotating mill tool remains
stationary while the table moves, moving the work piece around the tool. But NC programmers describe
the operation of both machines in the same way, as if the tool moves around the work piece.
That is not a problem when dealing with a lathe, but this chapter discusses mill operation, from a
programmer’s perspective. So although we know that physically the table moves and not the tool, the
chapter discusses operation in terms of tool motion.
Tool Motion
The tool moves through lines and arcs within the table boundaries as required to manufacture a part. In a
working machine, the table is moved in relation to the rotating tool, so the actual table displacement will
be the reverse of commanded tool motion.

Tool Movement Specification


Program commands for NC machines are called the preparatory functions, also known as “G codes.” The
function of moving the table along straight lines and arcs is called interpolation. Preparatory functions
specify the type of interpolation used. The three basic interpolation preparatory functions are:
1. Table movement along straight line: G01
2. Table movement along circular arc: G02 / G03
3. Table movement along specified trajectory: G01.1
Reference to the axis position word executes motion. The PMAC controller coordinates the movement of
the axis motors to execute the command. In this document, the generalized form of the axis position word,
X__Y__Z__, is used.

NC 32 Bit for Mill Application 3


PMAC NC for Mill Application

Axis Move Specification


Last commanded position is the starting position of a move and the final position is the commanded
position. The final position may be either an absolute position (a point referenced to program zero) or a
relative move (signed incremental distance from the previous point). This is specified with axis move or
position words, the axis address letter followed by a numeric literal:
N100 X5.2Y0Z-.001 (length units in. or mm.)
Feed Specification
Movement of the table at a specified speed for cutting a work piece is called the “feedrate.” Feedrates can
be specified similarly with the feed word:
N100 F150.0 (length/time units in./min. or mm./min.)
Length units are within program control (see the G-code definitions in the next section). The machine
builder sets time units.

Tool Feedrate Example

Cutting Speed Specification


The relative rotational speed of the tool with respect to the work piece during a cut is called the spindle
speed. As for the CNC, the spindle speed can be specified in rpm units, using the S address letter
followed by the value:
N100 S250 (rpm units)
Tool Movement Considerations
At multiple move (or block) boundaries, the CNC applies a coordinated ramp of the vector velocity into
and out of the point without stopping. The result of this is called “move blending.” Because of blending,
corners are not cut sharply. If sharp corners are required to be cut, Exact Stop or Dwell must be
commanded in the block or set modally (see G04, G09, G61). This forces an in-position stop before
starting the next move. "In-position" means that the feed motor is within a specified range about the
commanded position.

4 NC 32 Bit for Mill Application


PMAC NC for Mill Application

Move Blending Example

Coordinate Systems
There are two types of coordinate systems. One is fixed by the machine mechanics and the other is a
relative coordinate system specified by the NC program that coincides with the part drawing. The control
is only aware of the fixed one. Therefore, to correctly cut the work piece as specified on the drawing, the
two coordinate systems must be specified at machine startup. When a work piece is set on the table, these
two coordinate systems are as follows:

• Coordinate system specified by the CNC: Machine Coordinates.


• Coordinate system specified by the part: Program Coordinates.
Machine Coordinates
The machine zero point is a standard reference point on the machine. The machine coordinate system is
established when the reference point return is first executed after the machine power is turned on or the
homing cycle is executed. Once the machine coordinate system is established, it is not changed. A G-
code program will not execute without the machine coordinate system being established first; i.e., all the
machine axes must be homed before a G-code program can be executed.
Program Coordinates
The Program coordinates are always within one of the Work coordinate systems, G54 through G59, and
are either absolute positions or incremental values. A Work coordinate offset, Woff, defines the position
within the Machine coordinate space. Within the Work coordinate system, a Local coordinate offset, Loff,
may define a Local coordinate system. When there are no Work or Local offsets in effect or the work
coordinates are zero then the Machine and Program coordinates are the same. It is possible that the
Machine zero position is not accessible by the tool.

NC 32 Bit for Mill Application 5


PMAC NC for Mill Application

Coordinate and Reference Point Examples

Absolute Coordinate Positions


The table moves to a point at "the distance from zero point of the coordinate system," i.e. to the position
of the coordinate values. Specify the table movement from point A to point B by using the coordinate
values of point B.
Incremental Coordinate Values
This specifies table moves relative to the current table position. A move from point A to point B will use
the signed difference between the two points. The term "Relative" is also used.
Reference Point
Aside from Machine zero, a machine tool may need to locate other fixed positions corresponding to
attached hardware, i.e.: a tool changer. This position is called the reference point (which may coincide
with Machine zero). The tool can be moved to the reference point in two ways; manually or
automatically.
In general, manual reference point return is performed first after the machine power is turned on. Usually
this is the same as the homing function, since the reference point is at a fixed offset from the Machine
zero position. In order to move the tool to the reference point for tool change thereafter, the function of
automatic reference point return is used.

6 NC 32 Bit for Mill Application


PMAC NC for Mill Application

G Code Library
CNC G-Codes

PMAC-NC32 for Windows


Machining Center G Code Library
Valid As Of 6/1/99

Bold indicates Default G Codes used at startup

G-Code Function
G00* Rapid Traverse
G01 Linear Interpolation
G01.1 Spline Interpolation
G02 Circular Interpolation, CW
G03 Circular Interpolation, CCW
G02 & G03 Helical Interpolation (X, Y, & Z in the G code command line)

G04 Dwell
G09 Exact Stop Check
G10 Program Data Input
G10.1 PMAC Data Input

G17 XY Plane Selection


G18 ZX Plane Selection
G19 YZ Plane Selection

G20 Inch Mode


G21 Metric Mode

G25 Spindle Speed Detect Off


G26 Spindle Speed Detect On

G27 Reference Point Return Check


G28 Return To Reference Point
G29 Return From Reference Point
G30 2nd Reference Point Return

G31 Move Until Trigger

G40 Cutter Compensation Cancel


G41 Cutter Compensation Left
G42 Cutter Compensation Right

G43 Tool Length Compensation, + Direction


G44 Tool Length Compensation, - Direction

G45 Tool Offset Increase


G46 Tool Offset Decrease
G47 Tool Offset Double Increase
G48 Tool Offset Double Decrease

49 Tool Length Compensation Cancel

G50 Scaling Cancel


G51 Scaling
G50.1 Mirror Cancel
G51.1 Mirror Image

NC 32 Bit for Mill Application 7


PMAC NC for Mill Application

G52 Local Coordinate System Setting


G53 Machine Coordinate System Setting

G54 Work Coordinate System 1


G55 Work Coordinate System 2
G56 Work Coordinate System 3
G57 Work Coordinate System 4
G58 Work Coordinate System 5
G59 Work Coordinate System 6

G61 Exact Stop Mode


G64 Cutting Mode (Cancel Exact Stop Mode)

G68 Coordinate System Rotation


G69 Coordinate System Rotation Cancel

G70 Bolt Hole Circle Pattern


G70.1 Bolt Hole, Center Hole Ignore Pattern
G71 Arc Pattern
G72 Bolt Line Pattern

G80 Canned Cycle Cancel


G81 Spot Drilling Canned Cycle
G82 Counter Boring Drilling Cycle
G83 Peck Drilling Cycle
G84 Tapping Cycle
G85 Fine Boring Canned Cycle
G86 Boring Canned Cycle
G87 Back Boring Canned Cycle
G88 Reverse Tapping Canned Cycle
G89 Canned Cycle Recall

G90 Absolute Command Mode


G91 Incremental Command Mode
G90.1 Arc Radius Abs/Inc Mode
G91.1 Arc Radius Abs/Inc Mode

G92 Absolute Zero Point Programming


G92.1 Absolute Zero Point Programming Cancel

G93 Inverse Time Feed


G94 Feed Per Minute
G95 Feed Per Revolution

G98 Return To Initial Point in Canned Cycle


G99 Return to R Point in Canned Cycle

8 NC 32 Bit for Mill Application


PMAC NC for Mill Application

G Codes
G00 Rapid Traverse Positioning
This is used to position the tool from the current programmed point to the next programmed point at
maximum traverse rate for all axes. G00 is group 01 modal. It is canceled by other group 01 functions.
The rapid move is not axis coordinated. Each axis has a different endpoint velocity ramp. Each axis may
also have a different maximum traverse rate. The axis with the longest move time (move distance/axis
velocity) will finish last and provide the final in-position for end of block registration. Rapid moves are
never blended with adjacent blocks.
SYNTAX: G00X__Y__Z__
EXAMPLE CODE:
N005 G49 G54 G20 G90 G40 G80
N010 S2500 M03
N015 G55
N020 G20 G90 G0 X0 Y0 (inch, abs, rapid to work piece x,y zero psn)
G01 Linear Interpolation
Linearly interpolates the position of the tool from the current point to the programmed point in the G01
block (see Figure 1). Segmentation control for all interpolation is controlled by the PMAC I13 parameter.
The speed of the tool is controlled by the modal feedrate word F and is the vector velocity of the tool path
defined by:
Lx Ly
Fx = F ∗ ; Fy = F ∗
2 2 2 2
Ly + Lx Ly + Lx
Linear moves may blend with adjacent interpolative blocks. If the G01 block contains a Dwell (G04) or
an Exact Stop (G09) a controlled deceleration to a stop with in-position going true will inhibit blending
with the next block. If the G61 modal Exact Stop is active no blending between linear blocks will occur
until canceled (G64 Cutting Mode). G01 is group 01 modal. It is canceled by other group 01 functions.
SYNTAX: G01X__Y__Z__F__
EXAMPLE CODE:
N030 X1.125 Y2.25
N040 G61 G1 Z-.02 F20 (exact stop mode, linear, plunge cutter, 20 ipm)
N050 G64 G3 X0.5 Y2.0 R0.375
G01.1 Spline Interpolation
Interpolates as a three point Cubic Spline, a segmented profile (trajectory of points) with no change in
acceleration at segment boundaries (smooth contouring). A fixed move time of: R/F for all segments is
specified indirectly with a segment size and feedrate in the initial G01.1 block with R and F, respectively.
Actual commanded velocities, a result of the Spline calculations, are smooth. Accelerations are matched
at segment boundaries. Subsequent blocks are blended to fit a 3-point cubic Spline with the adjacent
blocks until dwell, new segment word (R) or modal change (i.e. G00 or G01). Zero length intervals of
R/F time units are added at the endpoints to facilitate entry and exit of the Spline. The PMAC
segmentation parameter I13 does not effect Spline mode.
Intermediate positions are relaxed somewhat to meet the velocity and acceleration constraints imposed,
and may be calculated from the following equation:

err n =
[Seg n + 1 − Seg n ]
6

NC 32 Bit for Mill Application 9


PMAC NC for Mill Application

It applies to vector sum of axis components, for simultaneous multiple axis splines. If a segment size
within the block sequence deviates from that specified in the initial block R word, then the above
equation gives the error amount. G01.1 is modal in-group 01. It is canceled by other group 01 functions.
SYNTAX: G01.1R__X__Y__Z__F__
EXAMPLE CODE:
N6 Z.1 H1 M8
N7 G1.1 R.05 F150. (spline mode seg size of .05 in at 150 ipm)
N8 X10Y10 (point 1)
N9 X10.2236Y10.2236 (point 2)
N10 X10. 0.4729Y10. 0.4729 (point 3)
G02 Circular Interpolation CW (Helical CW)
Circular interpolation uses the axis information contained in a block, to move the tool in a CLOCKWISE
arc of a circle, up to 360 degrees. The velocity at which the tool is moved is controlled by the feedrate
word, and is a vector tangent in the interpolation plane:
2 2
Ft = fx + fy .
All circles are defined and machined by programming three pieces of information to the PMAC. They
are:
• START POINT of the arc
• END POINT of the arc
• ARC CENTER of the arc or ARC RADIUS
The START POINT is defined prior to the G02 line, usually by a G01 or G00 positioning move. The
END POINT is defined by the axis coordinates within the G02 line. The ARC CENTER is defined by the
I, J and K values (vector incremental from the start point) or the R value within the G02 line. The full
format for a G02 line must reflect in which plane the arc is being cut. This is accomplished by use of a G
code to define the interpolation plane and the letter addresses I, J, and K.
• G17 (XY - PLANE) Letter address I for X Letter address J for Y
• G18 (XZ - PLANE) Letter address I for X Letter address K for Z
• G19 (YZ - PLANE) Letter address J for Y Letter address K for Z
The I, J and K vector incremental values are signed distances from where the tool starts cutting (START
POINT) the arc to the ARC CENTER. For 90 degree corners or fillets the I, J and K values can be
determined easily. The G17 (XY - PLANE) is the default or power on condition. If another axis not
specified in the circular interpolation is programmed then helical cutting will be effected. The feedrate of
the linear axis will be:
F x (length of linear axis / length of arc).
SYNTAX: [G17/G18/G19]G02X__Y__Z__I__J__K__F__
[G17/G18/G19]G02X__Y__Z__R__F__
EXAMPLE CODE:
N040 G73 G1 Z-.02 F20
N050 G64 G2 X0.5 Y2.0 R0.375 (cut mode, cw circle)
N060 G1 Y1.5625

10 NC 32 Bit for Mill Application


PMAC NC for Mill Application

Circular Interpolation Example

G03 Circular Interpolation CCW (Helical Interpolation CCW)


Circular contouring control uses the axis information contained in a block, to move the tool in a
COUNTERCLOCKWISE arc of a circle, up to 360 degrees. The velocity at which the tool is moved is
2 2
controlled by the feedrate word and is vector tangential Ft = fx + fy . All circles are defined and
machined by programming three pieces of information to the control, they are:

• START POINT of the arc


• END POINT of the arc
• ARC CENTER of the arc
The START POINT is defined prior to the G03 line, usually by a G01 linear positioning move. The END
POINT is defined by the X- and Y-axis coordinates within the G03 line when in the XY - PLANE. The
ARC CENTER is defined by the I, J and K values (vector incremental from the start point) when in the
X-Y - PLANE, or the R value within the G03 line. The full format for a G03 line must reflect in which
plane the arc is being cut. This is accomplished by use of a G code to define the plane and the letter
addresses I, J, and K.

• G17 (XY - PLANE) Letter address I for X Letter address J for Y


• G18 (XZ - PLANE) Letter address I for X Letter address K for Z
• G19 (YZ - PLANE) Letter address J for Y Letter address K for Z
The I, J and K vector incremental values are signed distances from where the tool starts cutting (START
POINT) the arc to the ARC CENTER. For 90 degree corners or fillets the I, J and K values can be
determined easily. The G17 (XY - PLANE) is the default or power on condition.

NC 32 Bit for Mill Application 11


PMAC NC for Mill Application

Circular Interpolation Example


If another axis not specified in the circular interpolation is programmed then helical cutting will be
effected. The feedrate of the linear axis will be:
F x (length of linear axis / length of arc).
SYNTAX: [G17/G18/G19]G03X__Y__I__J__F__
[G17/G18/G19]G03X__Y__R__F__

EXAMPLE CODE:
N4 G0 G90 G17 S500 M3
N5 X0 Y1.0156
N6 Z.1 H1 M8
N7 G03 I1 J1 Y0 X2 F150.
G04 Dwell
When programmed in a block following some motion such as G00, G01, G02 or G03, all axis motion
will be stopped for the amount of time specified in the F, P or X word in seconds. Only axis motion is
stopped; the spindle and machine functions under PLC control are unaffected. The numerical range is
from .001 to 99999.999 seconds. If no parameter is specified then a default value of 0 seconds dwell is
executed.
SYNTAX: G04X__
EXAMPLE CODE:
N4 G0 G90 S500 M3
N5 X0 Y1.0156
N6 Z.1 H1 M8
N7 G04 X10 (dwell 10 seconds)
N8 G04 P0.055 (dwell 0.055 seconds)
G09 Exact Stop
This forces a controlled deceleration to a stop, with in-position registration, at the end of the block. This is
used to prevent move blending with the next block (i.e. sharp corners are cut). G09 is not modal. It is

12 NC 32 Bit for Mill Application


PMAC NC for Mill Application

valid for the current block only and is affected by issuing a dwell of zero time (see G73 for modal Exact
Stop).
SYNTAX: G09
EXAMPLE CODE:
N030 X1.125 Y2.25
N040 G73 G1 Z-.02 F20 (exact stop mode, linear, plunge cutter, 20 ipm)
N050 G64 G3 X0.5 Y2.0 R0.375
G10 Programmable Data Input
R_, IP_ represents the X, Y, Z, U, V, W, A, B or C offsets to change. R is used when changing a
cutter compensation value. An axis value must be present to get its offset value altered. If the current
mode is in incremental, the offsets are incremented by the IP_ point. Otherwise, the IP_ is substituted for
the current offset. P represents the offset to change as follows. If P is between 1 and 6 the offset changed
is the work offset. P1 will change G54, P2 will change G55 up through P6 for G59.
EXAMPLE CODE:
G10 P1 X-10 Z-30 (Set G54 offsets)
G10 P2001 X-0.001 Z-0.001 R0.025 (Set tool wear offsets & cutter comp)
G10 P1001 X-5 Z-5 (Set tool geometry offsets and cutter comp)
G10.1 PMAC Data Input By Program
Allows configuration of PMAC I-variables from NC program. The I, Q, and P are addresses for the
PMAC like variables. The K address holds the value.
SYNTAX: G10.1 I__ K__
G10.1 Q__ K__
G10.1 P__ K__
EXAMPLE CODE:
G10.1 I125 K1228804 (I125=1228804)
G10.1 Q10 K8 (Q10=8)
G10.1 P11 K7 (P11=7)

PMAC Data Input By Program

NC 32 Bit for Mill Application 13


PMAC NC for Mill Application

G17/G18/G19 (XY/ZX/YZ) Plane Selection


When cutting motion is for X and Y using circular interpolation, the G17 plane must be in effect. The
G17 plane is a power on default, so normally is not programmed. When cutting motion Is for Z and X
using circular interpolation, the G18 plane must be in effect. When cutting motion is for Y and Z using
circular interpolation, the G19 plane must be in effect.
SYNTAX: G17/G18/G19
EXAMPLE CODE:
N4 G0 G90 G17 S500 M3
N5 X0 Y1.0156
N6 Z.1 H1 M8
N7 G03 I1 J1 Y0 X2 F150
G25 Spindle Detect Off
G25 sets the system flag, SPND_SPEED_DETECT, false. This will be interpreted by the CNC as
cancellation of Spindle Speed detect. This will make the CNC program disregard whether the spindle is
at speed.
SYNTAX: G25
G26 Spindle Detect On
G26 sets the system flag, SPND_SPEED_DETECT, true. The CNC will prevent the next block from
executing until spindle rpm's are within a specified percentage of the commanded value.
Programmer's note: This is reported via system flags: CS_SPND_AT_SPEED and
CS_SPND_AT_ZERO.
SYNTAX: G26
G27 Reference Point Return Check
G27 positions the tool at rapid traverse to the optional intermediate point (ip) and then the reference point.
The ip is saved for subsequent use by G29.
SYNTAX: G27 (X__Y__Z__)
EXAMPLE CODE:
N4 G0 G90 S500 M3
N5 G27 X0 Y1.0156 Z.1

14 NC 32 Bit for Mill Application


PMAC NC for Mill Application

Reference Point Return Check Example

G28 Return to Reference Point


The tool is returned to the reference point via an intermediate point (ip) specified in the block. The ip is
saved for subsequent use by G29.
SYNTAX: G28(X__Y__Z__)
EXAMPLE CODE:
N4 G0 G90 S500 M3
N5 G74 X0 Y1.0156 Z.1
G29 Return from Reference Point
The tool is moved to the point specified in the block via the ip stored by G28/G27.
SYNTAX: G29X__Y__Z__
G30 Return to Reference Point 2nd - 3rd
Implementation may be machine dependent. The system integrator provides this functionality. In general,
the tool is moved to the second reference point (the P address) via the ip specified in the block. The ip is
saved for subsequent use by G29.
SYNTAX: G30P__(X__Y__Z__)
G31 Move Until Trigger
Does a move until trigger (skip). When the skip signal occurs, the move will decelerate to a stop and the
location at which the skip signal occurred will be stored for later use.
SYNTAX: G65 P9810 X__Y__F__
G40/G41/G42 Cutter Compensation
While cutting the programmed contours of lines and curves, being dependent on the direction of cutting
and spindle rotation, the operator must keep the tool consistently oriented to the cutting surface, at the
offset needed to maintain the depth of cut and surface finish called for in the print. Calculations involving

NC 32 Bit for Mill Application 15


PMAC NC for Mill Application

moving surface normals and curve tangencies are usually required. Cutter radius compensation will
automatically provide cutter orientation and tool offset.
The control will offset the tool normal to the instantaneous surface tangent of the work piece with respect
to the direction of tool motion in the compensation plane. This allows a programmer to compensate for
cutters of different radial dimensions without the need for complex trigonometric code changes. Climb
milling will use G41 to instate cutter radius compensation. Conventional milling will use G42 to instate
cutter radius compensation. Of greatest concern is how to position the tool just prior to the start up of
cutter radius compensation. PMAC-NC will not engage compensation unless a move having a vector
component in the compensation plane is commanded.

• G40 - Cancel Cutter Radius Compensation


• G41 - Cutter Compensation, Tool on the Left of the work piece (in the feed direction)
• G42 - Cutter Compensation, Tool on the Right of the work piece (in the feed direction)
When activating cutter compensation (G41/G42), care must be taken in selecting a clearance move in the
compensation plane. On start up, the tool will move a vector distance equal to the offset value + the initial
compensation in-plane move. The tool must be positioned so that as the compensation engages the tool
begins cutting normal to the surface. In addition, the center of the cutter must be at least the cutter radius
away from the first surface to be machined. Cutter radius compensation is modal. Once cutter radius
compensation is correctly engaged, it will remain in effect until it is canceled.
Make any zero component compensation plane axis moves before cutter compensation. Make an axis(es)
startup move, having a non-zero component in the compensation plane (G17/18/19), on or immediately
after the G41 or G42 block. The compensation adjustment will be vectored with this move.
The programmer must consider this effect when moving out of the current plane, as in depth changes in
pocket milling. Execute a move whose vector component in the compensation plane parallel to the last in-
plane compensation move, but of opposite direction is interpolated with the intended out-of-plane axis
move.

16 NC 32 Bit for Mill Application


PMAC NC for Mill Application

Cutter Radius Compensation Example


When deactivating cutter compensation (G40), care must be taken in selecting a clearance move. If the
move is omitted, the control will not cancel cutter radius compensation. (and resulting axis motion) until a
block with a non-zero move component in the compensation plane is executed. DO NOT cancel
cutter compensation on any line that is still cutting the part. Cancel of cutter compensation may be a
one- or two-axis move. When cutter compensation is active, the control applies a virtual cutter of zero
diameter. The physical or actual diameter of the cutter is stored in the control by the operator on the page
that contains the cutter tool lengths and diameters. The tool length is addressed by an H word, and the
tool diameter is addressed by a D word. A tool offset number (T word) addresses both, using values
stored in the Tools page.
Normally the tool length and the tool diameter are assigned the same tool offset number. Cutter
compensation takes the stored value for the diameter and calculates the cutter path offset from that value.
Because of look-ahead, care must be taken that programmed moves do not violate the called-for
compensation.
Compensation Requirements
Plane
Several parameters must be specified for the compensation. First, the plane in which the compensation is
to be performed must be set. Any plane in xyz-space may be specified. Executing G17/G18/G19 does
this. For example, G17, by describing a vector parallel to the z-axis in the negative direction, specifies
the xy-plane with the normal right/left sense of the compensation. (This same command also specifies the
plane for circular interpolation.)
Radius
The amount of compensation must be set using the d address and data word, as in: G42x.5d1. The units of
the argument are the user units of the x, y, and z-axes. Negative and zero values for radius are possible,
although not necessarily useful.
Direction
The direction of compensation is determined by the G41/G42. As mentioned above, the compensation is
turned on by the rs-274 G-codes G41 and G42, respectively. The compensation is turned off by G-code
G40.

NC 32 Bit for Mill Application 17


PMAC NC for Mill Application

How PMAC Introduces Compensation


Any change in compensation is introduced gradually and linearly over the move immediately following
the change. The change could be turning compensation on, turning compensation off, or changing radius.
All are treated the same – as a change in compensation radius. When compensation is off, it is effectively
zero radius. When the direction of offset is changed (left to right or vice versa), the endpoint of the move
is changed (extended or shortened) so that the next move will start on the proper side of the corner. The
path of the move to that point is not changed. When the change in compensation is introduced over a
linear move, the compensated tool path will be at a diagonal to the programmed move path. When the
change in compensation is introduced over a circular arc move, the compensated tool path will be a spiral.
Speed of Compensated Moves
Tool center speed for the compensated path remains the same as that programmed by the F parameter.
On an arc move, this means that the tool edge speed (the part of the tool in contact with the part) will be
different from that programmed by the fraction Rtool/Rarc.

Treatment of Inside Corners


Inside corners are still subject to blending. The longer the acceleration time, the larger the rounding of
the corner. (The corner rounding starts and ends a distance F*TA/2 from the compensated, but
unblended corner.) The greater the portion of the blending is S-curve, the squarer the corner will be.
When coming to a full stop at an inside corner, PMAC will stop at the compensated, but unblended
corner.
Treatment of Outside Corners
For outside corners, PMAC introduces an arc move to cover the additional distance around the corner.
The starting and ending points for the arc are points offset from the programmed corner point,
perpendicular to the path on each side at the corner point, by an amount equal to the cutter radius
compensation. The arc has its center at the programmed corner point. (Any outside corner with a change
in angle less than 1 degree does not introduce an arc; it simply blends the offset corner using TA and TS.)
When coming to a full stop at an outside corner (e.g. Step, Quit, or DWELL at the corner), PMAC
includeS the added arc move around the outside of the corner before stopping.
SYNTAX: G41/G42X__Y__F__D__
G40X__Y__F__

18 NC 32 Bit for Mill Application


PMAC NC for Mill Application

a) When going around an inside corner

i) Linear Linear ii) Linear Circular


a a

Programmed path

r: Offset amount
r r
r
CC2 CC2
S L Tool center path
S
C
L L
Tool center path Programmed path

b) When going around the outside corner

i) Linear Linear ii) Linear Circular


CC2 CC2
a a

Programmed path
L L
r r
r
r

C S Tool center path C S


L
C

Tool center path Programmed path

S = Intersection
L = Linear
C = Circular

Offset Start-up (Sheet 1 of 2)

NC 32 Bit for Mill Application 19


PMAC NC for Mill Application

c) When going around the outside of an acute angle

i) Linear Linear ii) Linear Circular


L L

CC2 CC2

r
r
a a

Programmed path

C r C r

S L Tool center path S


C

Tool center path Programmed path

d) When the tool goes around the outside linear at an acute


angle less than 1 degree, compensation is performed as follows

S L Tool center path

r
Programmed path
CC1
r
less than 1 deg.

S = Intersection
L = Linear
C = Circular

Offset Start-up (Sheet 2 of 2)

20 NC 32 Bit for Mill Application


PMAC NC for Mill Application

a) When going around an inside corner

i) Linear Linear ii) Linear Circular


a a

Programmed path

r
r
r r
CC2 CC2
S L Tool center path S

C
L L

Tool center path

iii) Circular Linear iv) Circular Circular


a
a
Programmed path

r
CC2 CC2
S L Tool center path S

C
C
C
Programmed path

Tool center path

v) Straight line to Straight line


S
Tool center path

r
CC1
C

Programmed path
r

Offset Mode (Sheet 1 of 3)

NC 32 Bit for Mill Application 21


PMAC NC for Mill Application

b) When going around an outside corner at an obtuse angle

i) Linear Linear ii) Linear Circular

CC2
CC2

a
a L
L
Programmed path
r
r

r r

L Tool center path C


C
Programmed path
C

Tool center path

iii) Circular Linear iv) Circular Circular

CC2 CC2

a a
C C
Programmed path

r r

r
r
C C
L Tool center path
Programmed path
C

Tool center path

NOTE: When the change in angle is less than 1 (a>179 ),


no circular segment is added. There is simply the blending
from the incoming segment to the outgoing segment over one TA time.

Offset Mode (Sheet 2 of 3)

22 NC 32 Bit for Mill Application


PMAC NC for Mill Application

c) When going around an outside corner at an acute angle

i) Linear Linear ii) Linear Circular

L L

CC2 CC2

S S
r r
a a
Programmed path

C r C r

L Tool center path


Programmed path
Tool center path

iii) Circular Linear iv) Circular Circular

C C
CC2
CC2
C C

r r
a L a
Programmed path
C
C r C r

L Tool center path


C Programmed path
Tool center path

Offset Mode (Sheet 3 of 3)

NC 32 Bit for Mill Application 23


PMAC NC for Mill Application

i) Linear Linear ii) Linear Circular


C
Tool center path
r L C
r
Programmed path
L CC1
L Tool center path r CC1
CC2 r
Programmed path
CC2 CC2
L L
r
CC2 r
L

iii) Circular Circular iv) Circular Circular

Scroll Tool center path Scroll Circle


L C
P P
CC2 CC2 r
r Tool center path
r Programmed path r

CC1 CC1Programmed path

v) When an intersection is not obtained if offset is normally performed

i) Linear Linear
S L

r
Programmed pathCC2 CC1 CC1

r L Offset vector
Tool center path
L S

CC1
Programmed path
CC2

Tool center path S


L
ii) Linear Circular

L r r Tool center path

CC1 CC2 CC2


Programmed path
r = CCR r r
S = Intersection
L = Linear
C = Circular C C
P = Parabloic

Change of Offset Direction

24 NC 32 Bit for Mill Application


PMAC NC for Mill Application

a) When going around an inside corner

i) Linear Linear ii) Circular Linear


a a
CC2
Programmed path

r CC2
r
r
CC0 r CC0
Tool center path L S S
C
L L
Programmed path Tool center path

b) When going around the outside corner

i) Linear Linear ii) Circular Linear


CC0 CC0
a a
CC2
Programmed path
L L
r CC2 r
r r

Tool center path L S C S C


C

Programmed pathTool center path

S = Intersection
L = Linear
C = Circular

Offset Cancel (sheet 1 of 2)

NC 32 Bit for Mill Application 25


PMAC NC for Mill Application

c) When going around the outside of an acute angle

i) Linear Linear ii) Circular Linear


L L

CC0 CC0

a a

Programmed path

r C r C

Tool center path L


CC2
C
CC2
Programmed path Tool center path

d) When the tool goes around the outside linear at an acute


angle less than 1 degree, compensation is performed as follows

S L Tool center path

r
CC2 Programmed path
(CC0) less than 1 deg.

S = Intersection
L = Linear
C = Circular

Offset Cancel (sheet 2 of 2)

26 NC 32 Bit for Mill Application


PMAC NC for Mill Application

i) Machining an inside corner at a radius smaller than the cutter radius

Tool center path CC1

Programmed path

The PMAC does not


stop, overcutting occurs

ii) Machining a groove smaller than the tool diameter

Tool center path CC2

Programmed path

The PMAC does not


stop, and overcutting occurs

Over cutting by Cutter Compensation (Sheet 1 of 2)

NC 32 Bit for Mill Application 27


PMAC NC for Mill Application

iii) When machining a step smaller than the tool radius

Circular movement
CC2 Tool center path

L Programmed path

L
L

PMAC backs up to correct


when intersection is determined
(at 1 block ahead)

The PMAC does not


stop, and overcutting occurs

iv) Machining small segments

PMAC backs up to correct

(at 1 block ahead)

when intersection is determined

L
L L
L L L L

The PMAC does not


Many small segments stop, and overcutting occurs

The PMAC calculates trajectory 2 blocks ahead. If the radius


of compensation is sufficiently large and programmed
segments are short. Overcutting can occur.

Turbo calculates in segments. If there are too many segments,


overcutting can occur.
Overcutting by Cutter Compensation (Sheet 2 of 2)

28 NC 32 Bit for Mill Application


PMAC NC for Mill Application

G43/G44/G49 Tool Length Compensation + /- and Cancel


Program zero is a point of reference for coordinates in a part program, usually from a key location on the
work piece. The position of the tool's center in X and Y does NOT change as the tool changes. In the Z-
axis, this is not the case. If the length of the tool changes, so does the distance from the tip of each tool to
the program zero point in Z. Note that each tool has a different distance from the tip of the tool to a
surface on the part.
Tool length compensation lets the control call out the Z axis movements in a program as the tool changes,
although, physical interference problems between the work piece and the tool must still be overcome by
the programmer.
The programmer initializes tool length compensation in each tool's first Z-axis approach move to the
work piece. This initialization command includes a G43/G44 word and an H or T word to invoke the
desired tool offset. It must also contain a Z-axis positioning move. Tool length compensation is modal.
Once instated it remains in effect until cancelled or changed. G49 Cancels tool length compensation that
is in effect.
SYNTAX: G43Z__
G44Z__
EXAMPLE CODE:
N020 G20 G90 G0 X0 Y0
N025 G43 Z0.25 H1 (move to z0+.25 with tool offset comp)
N030 X1.125 Y2.25
G45/G46/G47/G48 Single Block Tool Offsets
Single block increase and decrease of stored tool offset. It uses the last modal H code.
G45 Increase offset by stored value
G46 Decrease offset by stored value
G47 Increase offset by stored value X 2
G48 Decrease offset by stored value X 2
SYNTAX: G45/G46/G47/G48
G50/G51 Coordinate Scaling
G51 is coordinate scaling. X_Y_ Z_ is the center of scaling. These parameters are meaningful only in
absolute mode. I_ J_ K_ is the scaling magnification of the X-, Y-, and Z-axis, respectively. When
performing circular interpolation specified by a Radius, the maximum value of the scaling magnification
for the appropriate plane is applied to the Radius component. For example, if the selected plane is the X-
Z plane then the maximum magnification of X Z is used to scale R. Likewise. if the selected plane is the
X-Y plane the maximum magnification of Y is used to scale R. When performing circular interpolation
with I J K components, each component is magnified by its appropriate scale factor.
Coordinate scaling is canceled with G50.
SYNTAX: G51X__Y__Z__I__J__K__
G50
G50.1/G51.1 Coordinate Mirroring
G51.1 is mirroring. X_Y_Z_ is the axis to mirror about. The value of this parameter is meaningful only
in absolute mode. It indicates the line about which mirroring occurs. In incremental mode, only the axis
letter is meaningful and the actual value may be anything.
Mirroring is canceled with G50.1.

NC 32 Bit for Mill Application 29


PMAC NC for Mill Application

G51 G-Code Values


Mirrored Program Positions Mirrored Program Positions
(Absolute Moves) (Incremental Moves)
G1 G90 X0 Y0 X 0.0000 Y 0.0000 G1 G90 X0 Y0 G91 X 0.0000 Y 0.0000
G51.1 X3 X 0.0000 Y 0.0000 G51.1 X3 X 0.0000 Y 0.0000
X1 X 5.0000 Y 0.0000 X1 X -1.0000 Y 0.0000
Y1 X 5.0000 Y 1.0000 Y1 X -1.0000 Y 1.0000
G50.1 X 5.0000 Y 1.0000 G50.1 X -1.0000 Y 1.0000

Mirroring is canceled with G50.1.


EXAMPLE CODE:
SYNTAX: G51.1X__Y__Z__
G50.1
G52 Local Coordinate System Set
While programming in a work coordinate system, it is sometimes more convenient to have a common
coordinate system within all the work coordinate systems. This coordinate system is called a local
coordinate system. The G52 specifies the local coordinate system. The Local CS (X'Y') is offset from the
Work CS (XY) by the vector (A) that makes the current tool point in the Local CS equal to the position
word in the G52 block (G52X100Y100). When a local coordinate system is set, the move commands in
absolute mode (G90), which is subsequently commanded, as are the coordinate values in the local
coordinate system. The local coordinate system can be changed by specifying the G52 command with the
zero point of a now local coordinate system in the work coordinate system. To cancel the local coordinate
system, specify G52X0Y0.
SYNTAX: G52X__Y__Z__
EXAMPLE CODE:
N4 G0 G90 S500 M3
N5 G52 X.0157 Y1.0156 Z0

30 NC 32 Bit for Mill Application


PMAC NC for Mill Application

Local Coordinate System Example

G53 Machine Coordinate Selection


The machine zero point is a standard point on the machine. A coordinate system having the zero point at
the machine zero point is called the machine coordinate system. The tool cannot always move to the
machine zero point. The machine coordinate system is established when the reference point return is first
executed after the power is on. Once the machine coordinate system is established, it is not changed by
reset, change of work coordinate system (G92), local coordinate system setting (G52) or other operations
unless the power is turned off. Occasionally it is desired to move the axes to a specific position in relation
to machine zero, and ignore any tool and work offsets that are active. This is accomplished using G53 for
machine coordinate programming. Machine coordinates are always expressed as absolute coordinates. If
the G91 incremental mode is active, the G53 command is ignored. All G92 codes and offsets are ignored.
The interpolation mode must be either G00 or G01. The tool is moved to the absolute Machine
coordinates expressed in the G53 block.
SYNTAX: G53X__Y__Z__
EXAMPLE CODE:
N4 G53 X0 Y0 Z0
G54-59 Work Coordinate System 1-6 Selection
Six coordinate systems proper to the machine tool are set in advance, permitting the selection of any of
them by G54 to G59.

• Work coordinate system 1 G54


• Work coordinate system 2 G55
• Work coordinate system 3 G56
• Work coordinate system 4 G57

NC 32 Bit for Mill Application 31


PMAC NC for Mill Application

• Work coordinate system 5 G58


• Work coordinate system 6 G59
The six coordinate systems are determined by setting distances (work zero offset values) in each axis
from the machine zero point to their respective zero points. The offsets are saved in the OFS page of the
PMAC-NC program.
EXAMPLE CODE: G55G00X20.0Z100.0;
X40.0Z20.0;
In the above example, positioning is made to positions (X=20.0, Z=100.0) and (X=40.0, Z = 20.0) in
work coordinate system 2. Where the tool is positioned on the machine depends on work zero point offset
values.
Work coordinate systems 1 to 6 are established after reference point return (or homing) after the power is
turned on. When the power is turned on, G54 coordinate system is selected by default.
SYNTAX: G54-59
G61 Exact Stop Mode
G61 causes a stop between block moves so that no corner rounding or blending between the moves is
done (i.e. sharp corners are cut). When G61 is commanded, deceleration is applied to the end point of the
cutting block, and the in-position check is performed every block thereafter. The G61 is valid until G64
(cutting mode) or G73 (tapping mode) is commanded. Cutting mode (G64) is the startup default.
SYNTAX: G61

Exact Stop Mode Example

G64 Cutting Mode


When G64 is commanded, deceleration at the end point of each block is not performed thereafter, and
cutting is blended to the next block. This command is valid until G61 (exact stop mode), or G63 (tapping
mode) is commanded. However, in G64 mode, feed rate is decelerated to zero and in-position check is
performed in the following cases:

• Positioning mode (G00)


• Block with exact stop check (G09)
• Next block is a block without movement command

32 NC 32 Bit for Mill Application


PMAC NC for Mill Application

SYNTAX: G64
G65 MACRO Instruction
See Appendix I.
G68/G69 Coordinate System Rotation
A programmed shape can be rotated about a point. By using this function, it becomes possible, for
example, to modify a program using a rotation command when a work piece has been placed with some
angle rotated from the programmed position on the machine. Further, when there is a pattern comprising
some identical shapes in the positions rotated from a shape, the time required for programming and the
length of the program can be reduced by preparing a subprogram of the shape and calling it after rotation.
The angle of rotation (" + " is the CCW direction) is command with a signed angle value in decimal
degrees using the R address in the G68 block. The center of rotation is specified in the block with axis
address data; X, Y, and Z. After this command is specified, subsequent commands are rotated by the
specified parameters. Command the angle of rotation (R) within the range of –360 to 360 degrees.
A rotation plane must be specified (Gl7, G18, G19) when G68 is designated, although not required to be
designated in the same block. G68 may be designated in the same block with other commands. Tool
offsets, such as cutter compensation, tool length compensation, or tool offset, is performed after the
coordinate system is rotated for the command program. The coordinate system rotation is cancelled by
G69.
SYNTAX: G68X__Y__Z__R__
G69
EXAMPLE CODE:
N4 G17 G69 X1 Y1 R90 (90 Degree rotation, CCW in the XY plane, about X1Y1)
G70 Bolt Hole Circle Pattern
When commanded, the tool will first drill a center hole, and then drill holes located at points equally
distributed on the circle. This G-code must be preceded by a valid canned drilling cycle (i.e., G81 ~
G88). The canned cycle G-code must precede G70 to establish the method of drilling for the pattern
cycle. The X_ and Y_ parameters specified on the line containing the G81 ~ G88 determine where the
center of the pattern will reside. The drilling canned cycle cannot reside on the same line as the drilling
pattern cycle, G70.
SYNTAX: G70 I_ J_ L_
I: Radius of circle must be greater than 0.
J: Angle formed by X axis and vector from center of circle to start point.
L: Number of points in the circle.
PROGRAMMING EXAMPLE:
G83 X_ Y_ Z_ R_ L_
G70 I3 J45 L8
G80
G84 X_ Y_ Z_ R_ L_ F_ P_ Q_
G70 I3 J45 L8
G80

NC 32 Bit for Mill Application 33


PMAC NC for Mill Application

The code excerpt above would first drill the center hole, then drill a hole at the points in the picture with a
peck drill cycle, then would tap holes with the tap drill cycle at the same points.
G70.1 Bolt Hole, Center Hole Ignore Pattern
When commanded, the tool will first locate, but not drill a center hole, then drill holes located at points
equally distributed on the circle. This G-code must be preceded by a valid canned drilling cycle (i.e., G81
~ G88). The canned cycle G-code must precede G70.1 to establish the method of drilling for the pattern
cycle. The X_ and Y_ parameters specified on the line containing the G81 ~ G88 determine where the
center of the pattern will reside. The drilling canned cycle cannot reside on the same line as the drilling
pattern cycle, G70.1.
SYNTAX: G70.1 I_ J_ L_
I: Radius of circle must be greater than 0.
J: Angle formed by X axis and vector from center of circle to start point.
L: Number of points in the circle.
PROGRAMMING EXAMPLE:
G83 X_ Y_ Z_ R_ L_
G70.1 I3 J45 L8
G80
G84 X_ Y_ Z_ R_ L_ F_ P_ Q_
G70.1 I3 J45 L8
G80

The code excerpt above would first reference, BUT NOT DRILL the center hole, then drill a hole at the
points in the picture with a peck drill cycle, then would tap holes with the tap drill cycle at the same
points.

34 NC 32 Bit for Mill Application


PMAC NC for Mill Application

G71 Arc Pattern


When commanded the tool is located at points distributed equally on an arc. This G-Code must be
preceded by a valid canned cycle (i.e. G81, G82, G83, G84, G85, G86, G87, G88). The canned cycle g-
code must precede G71 to establish the method of drilling for the pattern cycle. The X_ and Y_
parameters specified on the line containing G81- G88 determine where the center of the pattern will
reside. The canned cycle G81-G88 cannot reside on the same line as the pattern cycle G71.
SYNTAX: G71 I_ J_ K_ L_

I: Radius of arc must be greater than 0.


J: Angle formed by X axis and vector from center of arc to start point.
L: Number of points in the arc
K: Angle between points on the arc
PROGRAMMING EXAMPLE:
G83 X_ Y_ Z_ R_ L_
G71 I3 J0 L8
G80
G70.1
G84 X_ Y_ Z_ R_ L_ F_ P_ Q_
G71 I3 J0 L8
G80

The code excerpt above would first drill a hole at the points in the picture with a peck drill cycle then
would tap holes with the tap cycle at the same points.
G72 Bolt Line Pattern
When commanded the tool is located at points distributed equally on a line. This G-Code must be
preceded by a valid canned cycle (ie. G81, G82, G83, G84, G85, G86, G87, G88). The canned cycle g-
code must precede G72 so as to establish the method of drilling for the pattern cycle. The X_ and Y_
parameters specified on the line containing G81- G88 determine where the start of the pattern will reside.
The canned cycle G81-G88 cannot reside on the same line as the pattern cycle G72.
SYNTAX: G72 I_ J_ L_
I: Distance between drill points, must be greater than 0.
J: Angle formed by X axis and vector of line.
L: Number of points on the line.
PROGRAMMING EXAMPLE:
G83 X_ Y_ Z_ R_ L_
G72 I1 J45 L5
G80
G84 X_ Y_ Z_ R_ L_ F_ P_ Q_
G72 I1 J45 L5
G80

NC 32 Bit for Mill Application 35


PMAC NC for Mill Application

The code excerpt above would first drill a hole at the points in the picture with a peck drill cycle then
would tap holes with the tap cycle at the same points.
G80-89 Canned Cycles
A canned cycle simplifies programming through the use of single G codes to specify machine operations
normally requiring several blocks of NC code. The canned cycle consists of a sequence of five operations
as shown here.
1. Position of axes.
2. Rapid to initial point.
3. Hole body machining.
4. Hole bottom operations.
5. Retract to reference point.
A canned cycle has a positioning plane and a drilling axis. The positioning plane is the G17 plane. The Z-
axis is used as the drilling axis. Whether the tool is to be returned to the reference point or to the initial
point is specified according to G98 or G99. Use G99 for the first drilling, and use G98 for the last
drilling. When the canned cycle is to be repeated by L in G98 mode, the tool is returned to the initial level
from the first time drilling. In the G99 mode, the initial level does not change even when drilling is
performed.

Canned Cycle Example

36 NC 32 Bit for Mill Application


PMAC NC for Mill Application

The drilling data can be specified following the G and a single block can be formed. This command
permits the data to be stored in the control unit as a modal value. The machining data in a canned cycle is
specified as shown below.
G80 Canned Cycle Cancel
Cancels any active canned cycles.
G81 Drilling Cycle
When this cycle is commanded, the tool is located to the specified X, Y at rapid traverse rate, followed by
a rapid traverse to the R-value. Normal drilling is then performed at the specified feedrate to the specified
Z position. The tool is then immediately retracted from the bottom of the hole at rapid traverse rate. The
return point in Z is either the value of Z when the canned cycle is called if G98 mode is active.
Otherwise, the return point in Z is the value of R specified on the G81 line if G99 mode is active. This
cycle will occur on every line, which includes an X and Y move until the mode is canceled with G80
canned cycle cancel.
SYNTAX: G81 X_ Y_ Z_ R_ F_ L_
X: Center location of hole along X
Y: Center location of hole along Y
Z: Depth to drill to
R: Reference plane in Z
F: Cutting feedrate
L: Number of repeats
PROGRAMMING EXAMPLE:
G99G81X-3.Y-2.75Z-0.05R0.1F250L2
X-2.75
X-2.5L2
X-2.25
G80

Drilling Cycle with G99 Active

NC 32 Bit for Mill Application 37


PMAC NC for Mill Application

PROGRAMMING EXAMPLE:
G98G81X-3.Y-2.75Z-0.05R0.1F25.0L2
X-2.75
X-2.5L2
X-2.25
G80

Drilling Cycle with G98 Active

G82 Boring, Spotfacing, Counter Sinking Cycle (Free Cutting)


When this cycle is commanded, the tool is located to the specified X, Y at rapid traverse rate, followed by
a rapid traverse to the R-value. Normal drilling is then performed at the specified feedrate to the specified
Z position. A dwell then occurs at the bottom of the hole for P seconds. The tool is then retracted from
the bottom of the hole at rapid traverse rate. The return point in Z is either the value of Z when the
canned cycle is called if G98 mode is active. Otherwise, the return point in Z is the value of R specified
on the G82 line if G99 mode is active. This cycle occurs on every line that includes an X and Y move
until the mode is canceled with G80 canned cycle cancel.
SYNTAX: G82 X_ Y_ Z_ R_ F_ L_
X: Center location of hole along X
Y: Center location of hole along Y
Z: Depth to drill to
R: Reference plane in Z
F: Cutting feedrate
L: Number of repeats
P: Number of seconds of bottom dwell

38 NC 32 Bit for Mill Application


PMAC NC for Mill Application

PROGRAMMING EXAMPLES:
G99G8.2X-3Y-2.75Z-0.05R0.1F25.0L2P2
X-2.75
X-2.5L2
X-2.25
G80

Boring, Spotfacing, Counter Sinking Cycle with G99 Active


PROGRAMMING EXAMPLES:
G98G8.2X-3Y-2.75Z-0.05R0.1F25.0L2P2
X-2.75
X-2.5L2
X-2.25
G80

Boring, Spotfacing, Counter Sinking Cycle with G98 Active

NC 32 Bit for Mill Application 39


PMAC NC for Mill Application

G83 Deep Hole (Peck) Drilling Cycle


When this cycle is commanded, the tool is located to the specified X, Y at rapid traverse rate, followed by
a rapid traverse to the R-value. Normal drilling is then performed at the specified feedrate to a depth of K
below the R-value. The tool is then retracted from the bottom of the hole at rapid traverse rate to the R-
value.
The tool is then moved at rapid traverse rate to the height of the last drilling plus the R parameter.
Normal drilling is then repeated to a depth of K below the last hole. The tool is then once again retracted
from the bottom of the hole at rapid traverse rate to the R-value.
This pattern is repeated until the depth of the Z parameter is achieved. This cycle permits intermittent
cutting feed to the bottom of the hole, to assist in removing chips from the hole.
The return point in Z is the value of Z when the canned cycle is called if G98 mode is active. Otherwise,
the return point in Z is the value of R specified on the G83 line if G99 mode is active. This cycle occurs
on every line that includes an X and Y move until the mode is canceled with G80 canned cycle cancel.
SYNTAX: G83X_ Y_ Z_ R_ F_ L_ K_
X: Center location of hole along X
Y: Center location of hole along Y
Z: Depth to drill to
R: Reference plane in Z
F: Cutting feedrate
L: Number of repeats
K: Peck depth
PROGRAMMING EXAMPLES:
G83X-2Y-1Z-0.600K0.150R0.1F25
G80
G98
G83X-2Y-1Z-0.600K0.150R0.1F25
G80

Deep Hole (Peck) Drilling Cycle Example

40 NC 32 Bit for Mill Application


PMAC NC for Mill Application

G84 Tapping Cycle


When this cycle is commanded, the tool is located to the specified X, Y at rapid traverse rate, followed by
a rapid traverse to the R-value. Linear movement is then performed at the programmed feedrate to the
specified Z position. At this point a dwell of P seconds occurs. The spindle direction is then reversed and
Z is fed linearly to the R-value. The return point in Z is the value of Z when the canned cycle is called if
G98 mode is active. Otherwise, the return point in Z is the value of R specified on the G84 line if G99
mode is active. This cycle occurs on every line that includes an X and Y move until the mode is canceled
with G80 canned cycle cancel. During this cycle, manual feedrate override is ignored.
SYNTAX: G84 X_ Y_ Z_ R_ F_ L_ P_
X: Center location of hole along X
Y: Center location of hole along Y
Z: Depth to drill to
R: Reference plane in Z
F: Cutting feedrate, IPM (RPM * (1 / number of threads per inch))
L: Number of repeats
P: Dwell in seconds at bottom of Z travel
PROGRAMMING EXAMPLES:
G99
G84X-2Y-1Z-0.5Q1R0.1F15.625P.5
X-3 Y-1
G80
G98
G84X-2Y-1Z-0.5Q1R0.1F15.625P.5
X-3 Y-1
G80

Tapping Cycle Example

NC 32 Bit for Mill Application 41


PMAC NC for Mill Application

G85 Reaming, Boring Cycle


When this cycle is commanded, the tool is located to the specified X, Y at rapid traverse rate, followed by
a rapid traverse to the R-value. Linear movement is then performed at the programmed feedrate to the
specified Z position. Z is then fed linearly to the R-value. The return point in Z is the value of Z when
the canned cycle is called if G98 mode is active. Otherwise, the return point in Z is the value of R
specified on the G85 line if G99 mode is active. This cycle occurs on every line that includes an X and Y
move until the mode is canceled with G80 canned cycle cancel. During this cycle, manual feedrate
override is ignored.
SYNTAX: G85 X_ Y_ Z_ R_ F_ L_
X: Center location of hole along X
Y: Center location of hole along Y
Z: Depth to drill to
R: Reference plane in Z
F: Cutting feedrate
L: Number of repeats
PROGRAMMING EXAMPLES:
G99
G85X-3.Y-2.75Z-0.005P.5R0.1F25.0
X-2.75
X-2.5
G80
G98
G85X-3.Y-2.75Z-0.005P.5R0.1F25.0
X-2.75
X-2.5
G80
G86 Boring Cycle (Finishing cut)
When this cycle is commanded, the tool is located to the specified X, Y at rapid traverse rate, followed by
a rapid traverse to the R-value. Linear movement is then performed at the programmed feedrate to the
specified Z position. At this point, the spindle is stopped and a dwell of P seconds will occur. Z is then
fed rapidly to the R-value. The return point in Z is either the value of Z when the canned cycle is called if
G98 mode is active. Otherwise, the return point in Z is the value of R specified on the G85 line if G99
mode is active. This cycle occurs on every line that includes an X and Y move until the mode is canceled
with G80 canned cycle cancel. During this cycle, manual feedrate override is ignored.

42 NC 32 Bit for Mill Application


PMAC NC for Mill Application

Reaming, Boring Cycle Example


SYNTAX: G86 X_ Y_ Z_ R_ F_ P_ L_
X: Center location of hole along X
Y: Center location of hole along Y
Z: Depth to drill to
R: Reference plane in Z
F: Cutting feedrate
P: Dwell in seconds at the bottom of the cut
L: Number of repeats
PROGRAMMING EXAMPLES:
G99
G86X-3.Y-2.75Z-0.005P.5R0.1F25.0
X-2.75
X-2.5
G80
G98
G86X-3.Y-2.75Z-0.005P.5R0.1F25.0
X-2.75
X-2.5
G80

NC 32 Bit for Mill Application 43


PMAC NC for Mill Application

Finishing Cut Boring Cycle Example

G87 Boring Cycle (Manual or programmed quill return)


When this cycle is commanded, the tool is located to the specified X, Y at rapid traverse rate, followed by
a rapid traverse to the R-value. Linear movement is then performed at the programmed feedrate to the
specified Z position. At this point the spindle is stopped. The Z-axis is returned either manually or with
programmed instructions.
SYNTAX: G87 X_ Y_ Z_ R_ F_ L_
X: Center location of hole along X
Y: Center location of hole along Y
Z: Depth to drill to
R: Reference plane in Z
F: Cutting feedrate
L: Number of repeats
PROGRAMMING EXAMPLES:
G99
G87X-3.Y-2.75Z-0.005P.5R0.1F25.0
X-2.75
X-2.5
G80
G98
G87X-3.Y-2.75Z-0.005P.5R0.1F25.0
X-2.75
X-2.5
G80

44 NC 32 Bit for Mill Application


PMAC NC for Mill Application

Manual o Programmed Quill Return Example

G88 Boring Cycle (Free cutting, manual or programmed quill return)


When this cycle is commanded, the tool is located to the specified X, Y at rapid traverse rate, followed by
a rapid traverse to the R-value. Linear movement is then performed at the programmed feedrate to the
specified Z position. At this point, a dwell of P seconds is performed and then the spindle is stopped.
The Z-axis is returned either manually or with programmed instructions.
SYNTAX: G88 X_ Y_ Z_ R_ F_ P_ L_
X: Center location of hole along X
Y: Center location of hole along Y
Z: Depth to drill to
R: Reference plane in Z
F: Cutting feedrate
P: Dwell in seconds at the bottom of the cut
L: Number of repeats
PROGRAMMING EXAMPLES:
G99
G88X-3.Y-2.75Z-0.005P.5R0.1F25.0
X-2.75
X-2.5
G80
G98
G88X-3.Y-2.75Z-0.005P.5R0.1F25.0
X-2.75
X-2.5
G80

NC 32 Bit for Mill Application 45


PMAC NC for Mill Application

Free Cutting, Manual or Programmed Quill Return Example

G89 Boring Cycle (Finishing cut, free cutting)


When this cycle is commanded, the tool is located to the specified X, Y at rapid traverse rate, followed by
a rapid traverse to the R-value. Linear movement is then performed at the programmed feedrate to the
specified Z position. At this point a dwell of P seconds is performed. Z is then fed linearly to the R-
value. The return point in Z is the value of Z when the canned cycle is called if G98 mode is active.
Otherwise, the return point in Z is the value of R specified on the G85 line if G99 mode is active. This
cycle occurs on every line that includes an X and Y move until the mode is canceled with G80 canned
cycle cancel. @During this cycle, manual feedrate override is ignored.
SYNTAX: G88 X_ Y_ Z_ R_ F_ P_ L_
X: Center location of hole along X
Y: Center location of hole along Y
Z: Depth to drill to
R: Reference plane in Z
F: Cutting feedrate
P: Dwell in seconds at the bottom of the cut
L: Number of repeats
PROGRAMMING EXAMPLES:
G99
G88X-3.Y-2.75Z-0.005P.5R0.1F25.0
X-2.75
X-2.5
G80
G98
G88X-3.Y-2.75Z-0.005P.5R0.1F25.0
X-2.75
X-2.5
G80

46 NC 32 Bit for Mill Application


PMAC NC for Mill Application

Finishing Cut, Free Cutting Example

G90/G91 Absolute/Incremental Mode


Program commands for movement of the axes may be programmed either in incremental movement
commands or in absolute coordinates. The absolute mode is selected automatically when the power is
turned on or the control is reset. In the absolute mode (G90), all axis word dimensions are referenced
from a single program zero point. The algebraic signs (+ or -) of absolute coordinates denote the position
of the axis relative to program zero.
In the incremental mode (G91), the axis word dimensions are referenced from the current position. The
input dimensions are the distance to be moved. The algebraic sign (+ or -) specifies the direction of travel.
SYNTAX: G90 (Absolute mode)
G91 (Incremental mode)
EXAMPLE CODE:
N020 G20 G90 G0 X0 Y0 (inch, abs, rapid to work piece x,y zero psn)
N025 G43 Z0.25 H1
N030 X1.125 Y2.25
G90.1/G91.1 Arc Radius Abs/Inc Mode
Program commands for movement of the axes may be programmed either in incremental or absolute
movement commands.
SYNTAX: G90 (Absolute mode)
G91 (Incremental mode)
G92 Work Coordinate System Set
This command establishes the work coordinate system so that a certain point of the tool, for example the
tool tip, becomes IP in the established work coordinate system. Any subsequent absolute commands use
the position in this work coordinate system. Meet the programming start point with the tool tip and
command G92 at the start of program (G92X25.2Z23.0). When creating a new work coordinate system with
the G92 command, a certain point of the tool becomes a certain coordinate value; therefore, the new work
coordinate system can be determined irrespective of the old work coordinate system. If the G92
command issued to determine a start point for machining based on work pieces, a new coordinate system
can be created even if there is an error in the old work coordinate system. If the relative relationships

NC 32 Bit for Mill Application 47


PMAC NC for Mill Application

among the G54 to G59 work coordinate systems are correctly set at the beginning, all work coordinate
systems become new coordinate systems as desired.
SYNTAX: G92X__Y__Z__
EXAMPLE CODE:
N4 G53X0Y0Z0
N5 G92X0 Y1.0156
N6 Z.1 H1 M8

Work Coordinate System Set Example

G93 Inverse Time Feed


G93 specifies inverse time mode: move is specified by move time. F word is in time units of seconds and
is derived from the Rate x Time = Distance equation applied to the specific block move: (∆Xin / Fipm ) x
60 = ∆Tsec
EXAMPLE:
Assume X is at zero.
Specify the following as Inverse Time.
G01X1F100
a. Solve for move time.
Fipm = 100; ∆Xin = 1
∆Tsec = (1 ÷ 100) x 60 = .6sec.
b. Recode the block
G01G93X1F0.6
SYNTAX: G93F__

48 NC 32 Bit for Mill Application


PMAC NC for Mill Application

G94/G95 Feed Per Min/Feed Per Rev


The G94 preparatory function code specifies the feed rate in terms of vector per unit time. The G95
preparatory function code specifies feed rate in terms of vector feed per spindle revolution. The G94 and
G95 preparatory functions are modal and remain in effect until replaced by the opposite code. The mode
is set to G94 by power on, data reset and the M30 code.
SYNTAX: G94/G95
G98/G99 Canned Cycle Return Point
Used in a canned cycle block to determine the return point. G98: Initial point. G99: clearance plane or
reference point. G98 causes the tool to return to the point from which it was first called. G99 causes the
tool to return to the point specified by the R address.
SYNTAX: G98/G99
EXAMPLE CODE:
N4 X0Y0
N5 G98
N6 G81X1 Y1R0.1Z-3
.
.
.
N4 Z5
N5 G99
N6 G81X1Y1R0.1Z-3

M Code Library – CNC M-Codes


PMAC-NC32 for Windows
Machining Center M & T Code Library
Valid As Of 6/1/99
Bold indicates Default M Codes used at startup

G-Code Function

M00 Program Stop


M01 Optional Stop
M02 Program End & Rewind
M03 Spindle CW
M04 Spindle CCW
M05 Spindle Stop
M06 Tool Change
M08 Coolant On
M09 Coolant Off
M19 Spindle Orient
M30 Program End & Rewind
M87 Start Data Gathering
M88 End Data Gathering
M98 Subprogram Call
M99 Subprogram Return

NC 32 Bit for Mill Application 49


PMAC NC for Mill Application

M00 Program Stop


Unconditional stop of part program at current block. The coolant and spindle are stopped with this
command. Machine state does not change until restart or rewind.
M01 Optional Stop
Same as M00, but conditional on Optional stop switch setting.
EXAMPLE:
. . .
X-1.25
X-1.
G80
M1 (OPT STOP M1)
M02 Program Rewind
This resets the program buffer to the beginning of the program, cancels tool compensation and resets
coolant and spindle to OFF.
EXAMPLE:
. . .
G0G49X0Y0Z0
Z.5M5M9
G90G0G49M5M9
X0Y0Z0
M2
M03 Spindle Clockwise
Starts the spindle in the Clock-wise direction (CW) using the current setting for speed.
EXAMPLE:
. . .
N30 G54 G0 X-3.7185 Y-.1649
N40 S5000 M3 T1
N50 G43 H1 Z.1
. . .
M04 Spindle Counterclockwise
Starts the spindle in the counter-clockwise direction (CCW) using the current setting for speed.
M05 Spindle Stop
Turns off the coolant and stops the spindle.
EXAMPLE:
. . .
N1940 G28 X0. Z0.
N1945 M5
N1947 G4 X2.
N1950 M2
. . .

50 NC 32 Bit for Mill Application


PMAC NC for Mill Application

M06 Tool Change


Moves to the tool change position and blinks the tool change lighted pushbutton. Note: the tool change
position is above the home position.
EXAMPLE:
. . .
G0G49X0Y0
T3M6
M3S100
M8
G0X1.5Y-1.5
. . .
M08 Coolant On
Engages the coolant pump.
EXAMPLE:
. . .
G43Z0.5H10
M8
. . .
M09 Coolant Off
Disengages the coolant pump.
EXAMPLE:
. . .
X-4.1657Y-5.4552
G2X-4.2073Y-5.4421I-0.0056J0.0547
G0Z0.5M5M9
. . .
M19 Spindle Orient
The spindle rotates to a known angle.
EXAMPLE:
. . .
X-4.1657Y-5.4552
M19
Z-2.01
. . .
M30 End of Program (and Rewind)
Same as M2.
EXAMPLE:
. . .
Z.5M5M9
G90G0G49M5M9
X0Y0Z0
M30

NC 32 Bit for Mill Application 51


PMAC NC for Mill Application

M87 Start Data Gathering


Setup the Data Gathering buffer and begin gathering data.
EXAMPLE:
. . .
Z.5M5M9
G90G0G49M5M9
X0Y0Z0
M87
M88 End Data Gathering
End the Data Gathering.
EXAMPLE:
. . .
Z.5M5M9
G90G0G49M5M9
X0Y0Z0
M88
M98 Subroutine Call
SYNTAX
M98 [l____] [P____ ] [;]
M98 [L____] (C:\…) [;]
M98 [L____] [O___ ] [;]
Where:
L____ - specifies the number of times to execute the program
O____ - specifies a program name of the form O____.nc
P____ - specifies a program name of the form P____.nc
(C:\…) - specifies a program name as a path and
filename in a comment.
DESCRIPTION
M98 is the NC program's method of transferring control to another program from an executing program.
When an M98 command is encountered in a currently executing program, the calling program, control is
transferred to the specified program in the M98 block, the called program. The name of the calling
program is saved by the Control. The called program can transfer control back to the calling program
with an M99 block.
There are three ways of specifying a called program in an M98 block. They are:
1. P Code Specification
2. Comment Specification
3. Code Specification
P Code Specification: The most used and standard method is by referencing a program number with a P
address code. This is the method that is suggested if you wish to run your programs on other controls.
When the control sees a Pnnnn code on the M98 line, it constructs a filename from the number following
the P address code. The filename is of the following form: Onnnn.nc. The "nc" part of the filename is
called the file extension. By default the file extension is nc. The control then searches the directory that
the calling program was executed from for the program that has that filename. If the program is not

52 NC 32 Bit for Mill Application


PMAC NC for Mill Application

found, an alarm is issued and program execution stops. Otherwise, that program is loaded and program
execution continues from the first block in the called program, the subroutine.
Comment Specification: Another way to specify a program is by specifying a full path and filename in a
comment that is on the M98 line. This is a way to transfer control to routines that are not in the same
directory as the calling routine. All that is necessary is to place a valid file path name in the comment. If
the path or filename is invalid, then an alarm is issued.
Note:
When specifying a filename explicitly (C:SUBPROG.NC), the full path is not
necessary. If the full path is not specified NCUI will look for the file in the
directory specified by the "Start in" property of the windows shortcut that launched
the program.
O Code Specification: When neither of these methods is present in a block, the control constructs a
filename using the number associated with the most recently invoked O address code. This means that
you can use O just like a P code.
Note:
When in MDI mode the calling program exists in the directory specified by the
"Start in" property of the windows shortcut that launched the NCUI. This means
that when in MDI mode the subprograms identified by an O should reside in the
"Start in" directory. MDI mode does not support subprograms calls, such as
"M98P100."
Note:
If you forget to place a P code or comment on an M98 line and you have an O
code at the top of your program, the program will be called again recursively.
If more than one of these methods exists, the control selects a method based on priority. Only one
method is selected. The priorities are first P cod, then Comment, and finally O code. So if you have a P
and O address code on the same block, the P code is used to construct a filename for program execution.
A called program (subroutine) can return control back to the calling program by executing an M99.
The number of subroutines that can be "nested" is limited only by PC memory. However, you should nest
no more than 10 levels deep. This value is often encountered in other controls.
A subroutine can be called more than once within the same block. This is called looping. The number of
loops is specified with the L address code. M98 P10 L4; would execute program O10.nc four
consecutive times.
EXAMPLES
Program O98.nc calls O100.nc once and PRG.nc 100 times.
--- Program O98.nc ---
%
O98 (Subroutine call example) ;
G04 X1 ;
M98 P100 ;
M98 (C:\CNC\PRG.NC) L100 ;
G04 x2 ;
M30 ;
%

NC 32 Bit for Mill Application 53


PMAC NC for Mill Application

--- Program O100.nc in the same directory as program O10.nc ---


%
O100
G91 G81 X.5Z-1.0 F30;
G90 M99 ;
%
--- PRG.NC is aN NC program with a M99 for a return from subprogram. ---
%
(PRG.NC)
G1 X5 Z5 ;
(. . . ) ;
G0 X2 ;
M99 ;
%

M99 Return from Subroutine


SYNTAX
M99 [L____ ] [P____] [;]
Where:
L____ - specifies the number of times to execute the program
P____ - specifies a program block to branch to.
DESCRIPTION
M99 transfers program control to a calling program or to a different location of the current program being
executed. The action of M99 is different depending on whether M99 is encountered in a subroutine or in
the main program.
Subroutine program action of M99 is as follows:

• If M99 is encountered in a subprogram and no L or P address code is in the block, processing is


transferred to the first block after the M98 block or the calling program that called the current
program.
• If an L is on the M99 line, the subroutine resumes execution at the first block of the subroutine and
loops L times. This L overrides any L in the calling M98 block. In a subroutine, control is always
transferred to the first block, even if there is a P on the M99 line.
• If a P address code is on the M99 line in a subroutine, execution is resumed in the calling program,
not at the line after the M98 call, but at the first N address code found after the M98 call matching the
P address code. The control searches from the first block after the block with the M98 address code
to the end of the program, and then continues from the top of the program to the block containing the
M98. If no match is found an alarm is issued the program execution stops.
Main program action of M99 is as follows:
• If M99 is encountered in the main program and no L or P code is in the block, processing is
transferred to the first block of the program. In this manner a program can be commanded to loop
indefinitely.
• If an L is on the M99 line, the program loops L times and then executes an M30.
• If a P address code is on the M99 line, processing is transferred to a block that contains a matching N
address code. The control searches from the first block after the block with the M99 address code, to
the end of the program and then continues from the top of the program to the block containing the

54 NC 32 Bit for Mill Application


PMAC NC for Mill Application

M99. Control is transferred to the first block found with a matching N address code in it. If no
match is found, an alarm is issued and program execution stops.
EXAMPLES
Program O99.nc performs initialization and loops indefinitely.
--- Program O99.nc ---
%
O99 (M99 example) ;
(…) ;
(Initialization code. Executed one time only) ;
(…) ;
N50 ;
(…) ;
(The part program. Executed indefinitely) ;
(…) ;
M99 P50 ;
%
Program O990.nc calls O991.nc twice. Each time O991.nc loops 5 times and returns.
--- Program O990.nc ---
%
O990 (M99 example)
G90
M98 O991
G0 X-5.0 '
M98 P991
M30
%
--- Program O991.nc. Called by O990.nc ---
%
O991 (Subroutine)
G91
G81 X.5 Z-.5 F30.0 ;
X.4 ;
X,2 ;
G90 G80
M99 L5 ;
%

NC 32 Bit for Mill Application 55


PMAC NC for Mill Application

T-Codes
T-Code Format
Tnn Where nn specifies tool number from TOOLS page in NC display.
EXAMPLE:
(TOOL 4 = .437 DRILL)
(TOOL 3 = 1/2-13 TAP)
G90G80G49G40G20G17G56
T4M6
M3S3000
M8
G0X1.5Y-1.5
. . .

Miscellaneous
Block Delete Character: /
Prevents execution of the block when block delete is on. Must be the first character in the block.

56 NC 32 Bit for Mill Application


PMAC NC for Mill Application

PARAMETRIC PROGRAMMING
Introducing Parametric Programming
Parametric programming is an extension to NC (Numeric Control) programming. It gives the
programmer of NC products the ability to use variables and to perform conditional branching within an
NC program. Subroutines are extended to accept arguments. Predefined functions such as sine and
cosine can be used. Expressions can be evaluated. With parametric programming it is possible to create
libraries of routines that can be used and reused. Custom canned cycles and families of parts can be
programmed with less effort. Parametric programming increases the productivity and versatility of
machine tools and reduces the cost of machined products. Parametric programming is not meant to be
used in lieu of CADCAM systems. It is provided to add flexibility to the NC control and to provide
compatibility to controls that have made use of parametric programming in the past.
Delta Tau offers two forms of parametric programming. The programmer has the ability to program in
PMAC native code, or he can program in FANUC compatible (macros) parametric programming. This
chapter describes the parametric programming that is compatible with FANUC macro code.
Example Programs
This section contains example programs. Several applications are presented here to give an idea of the
power of parametric programming. Each program is described by three paragraphs.
• PURPOSE explains the program and includes supporting documentation to fully explain the
program.
• ROUTINES contains commented listings of supporting routines used in the main program.
• PROGRAM is a commented listing of the main program.
The following is a list of example programs exhibited in this section.
• Clearing Global Variables.
• Drilling Custom Bolt-hole Patterns.
• Simple Pocket Milling
Clearing Global Variables
Purpose:
This is an example of how you can initialize variables. The program calls a generalized subroutine that
initializes a range of variables. The program is identified on disk as O100.NC and the parametric
subroutine as O9400.NC. Start and ending numbers define the range of variables. If no value is passed in
argument V, the range is initialized to #0 which indicates that the variables value is undefined. If the
range of variables is invalid an alarm is generated. The range checking is not necessary in the sense that if
you passed an invalid variable, the control will automatically alarm. In a subroutine like the one below
you may wish to limit the range of variables to protect variables reserved for the application.
Routines:
%
O9400 (INIT VARIABLES);
(V=VALUE TO WRITE TO RANGE OF VARIABLES);
(S=VARIABLE NUMBER TO START WRITING TO);
(E=VARIABLE TO END WRITING TO);
(WRITE V INTO VARIABLES STARTING WITH S THRU AND INCLUDING);
(VARIABLE E. S MUST BE LESS THAN E AND BOTH ARGUMENTS MUST);
(BE SUPPLIED AND VALID. V IS ALWAYS USED TO WRITE TO VARIABLES);

Parametric Programming 57
PMAC NC for Mill Application

IF [#19 EQ #0] GOTO N9410 (S NOT PASSED);


IF [#8 EQ #0] GOTO N9410 (E NOT PASSED);
(INVALID S ARGUMENT);
IF [[#19 GE 1] AND [#19 LE 33]] GOTO 9402 (1..33 IS OK);
IF [[#19 GE 100] AND [#19 LE 199]] GOTO 9402 (100..199 IS OK);
IF [[#19 GE 500] AND [#19 LE 599]] GOTO 9402 (500..599 IS OK);
GOTO 9420 (ERROR)
N9402
(INVALID E ARGUMENT);
IF [[#8 GE 1] AND [#8 LE 33]] GOTO 9404 (1..33 IS OK);
IF [[#8 GE 100] AND [#8 LE 199]] GOTO 9404 (100..199 IS OK);
IF [[#8 GE 500] AND [#8 LE 599]] GOTO 9404 (500..599 IS OK);
GOTO 9420 (ERROR)
N9404
IF [#19 GE #8] GOTO N9420 (ERROR IF S>=E);
WHILE [#19 LE #8] DO1;
#[#19]=#22 (ASSIGN V TO VARIABLES S THRU E);
#19=#19+1; (INCREMENT DESTINATION);
END1;
GOTO 9499 (SUCCESSFUL RETURN);
(ALARMS FOLLOW);
N9410 #3000=941(MISSING ARGUMENT);
N9420 #3000=942(VARIABLE RANGE DEFINITION ERROR);
N9499 M99;
%
Program:
%
O94 (MAIN PROGRAM THAT DEMONSTRATES VARIABLE INITIALIZATION)
G65 P9400 S500 E589 (GLOBAL VARIABLES ARE UNDEFINED)
G65 P9400 S590 E599 V0.0 (SET 590..599 TO 0.0)
G65 P9400 S500 E600 (GENERATES AN ALARM)
M30
%
Drilling Custom Bolt-Hole Patterns
Purpose:
This example shows how you can program a routine to drill and tap a custom bolt hole pattern. Here, the
bolt hole pattern is for a standard clamp that you may use in holding parts on a fixture. The subroutine can
be saved and used later for drilling the bolt holes on other fixtures.
The bolt-hole pattern is a simple rectangular pattern. The absolute position of the center of the bolt-hole
pattern is passed in arguments X and Y. The height and width of the bolt spacing is passed as arguments
H and W. The rotation of the pattern is passed in A. The initial position plane is passed in R and the
incremental hole depth from R is passed in Z. Assume ¼-20 tap is being used. To use this routine you
must have a drill and tap set up in tool holders 1 and 2 and pass the appropriate arguments. This routine

58 Parametric Programming
PMAC NC for Mill Application

could be improved by adding a center drilling operation or by passing a feed rate parameter to
accommodate various materials.

Routines:
%
O9600 (DRILL AND TAP A RECTANGULAR BOLT-HOLE PATTERN);
(X=ABSOLUTE X LOCATION OF CENTER OF BOLT-HOLE PATTERN);
(Y=ABSOLUTE Y POSITION OF CENTER OF BOLT-HOLE PATTERN);
(H=Y DISTANCE BETWEEN HOLES WITH 0 ROTATION)
(W=X DISTANCE BETWEEN HOLES WITH 0 ROTATION);
(A= ANGULAR ROTATION OF PATTERN IN DEGREES);
(R = RETURN PLANE OF REFERENCE, Z START PLANE);
(Z = INCREMENTAL Z DEPTH TO TAP HOLES);
(ASSUME ¼-20 TAP IS TO BE MADE);
(GENERATE FOUR TAPPED HOLES GIVEN THE LOCATION OF THE);
(CENTER OF THE RECTANGULAR PATTERN, THE ROTATION AND);
(THE DEPTH OF THE HOLES.);
(IF X AND Y ARE NOT PASSED ASSUME CENTER IS AT CURRENT);
(LOCATION);
(IF A IS NOT PASSED, ASSUME NO ROTATION);
(IF R IS NOT PASSED, ASSUME R IS AT CURRENT Z POSITION);
IF [#11 EQ #0] GOTO9610 (H NOT PASSED);
IF [#23 EQ #0] GOTO9620 (W NOT PASSED);
IF [#26 EQ #0] GOTO9630 (Z NOT PASSED);
(RECORD R, X, AND Y; IF THEY ARE NOT PASSED);
IF [#24 EQ #0] THEN #24=#5041 (CURRENT X POSITION);
IF [#25 EQ #0] THEN #25=#5042 (CURRENT Y POSITION);
IF [#18 EQ #0] THEN #18=#5043 (CURRENT Z POSITION);
(CALCULATE X AND Y OFFSET FROM CENTER USING H AND W);
#31=#11/2;
#32=#23/2;
(MOVE TO TOOL CHANGE POSITION)
G0 G53 Z0
G0 G53 X0 Y0
(SELECT DRILL T1, #7 .201 DRILL)
T1 M06

Parametric Programming 59
PMAC NC for Mill Application

S1000 M3 (SPINDLE ON)


M8 (COOLANT ON)
G0 X#24 Y#25 (MOVE TO XY LOCATION);
Z#26 (MOVE TO R PLANE);
(ROTATE IF REQUESTED);
IF [#1 EQ #0] GOTO9602
G68 R#1;
N9602
(DRILL FOUR HOLES AT INCREMENTAL OFFSETS FROM CENTER);
G81 X[#24+#31] Y[#25+#32] Z#26 F5. (UPPER RIGHT);
X[#24 - #31] Y[#25 +#32] (UPPER LEFT);
X[#24 - #31] Y[#25 - #32] (LOWER LEFT);
X[#24 + #31] Y[#25 - #32] (LOWER RIGHT);
G69 (CANCEL ROTATION);
M5 (SPINDLE OFF);
M9 (COOLANT OFF);
(MOVE TO TOOL CHANGE POSITION)
G0 G53 Z0
G G53 X0 Y0
(SELECT DRILL T2, ¼-20 TAP)
T2 M06
S100 M3 (SPINDLE ON)
M8 (COOLANT ON)
G0 X#24 Y#25 (MOVE TO XY LOCATION);
Z#26 (MOVE TO R PLANE);
(ROTATE IF REQUESTED);
IF [#1 EQ #0] GOTO9604
G68 R#1;
N9604
(TAP FOUR HOLES AT INCREMENTAL OFFSETS FROM CENTER);
G84 X[#24+#31] Y[#25+#32] Z[#26-.2] F5. (UPPER RIGHT);
X[#24 - #31] Y[#25 +#32] (UPPER LEFT);
X[#24 - #31] Y[#25 - #32] (LOWER LEFT);
X[#24 + #31] Y[#25 - #32] (LOWER RIGHT);
G69 (CANCEL ROTATION);
M5 (SPINDLE OFF);
M9 (COOLANT OFF);
GOTO 9699 (SUCCESSFUL RETURN);
(ALARMS FOLLOW);
N9610 #3000=961(MISSING H);
N9620 #3000=962(MISSING W);
N9630 #3000=963(MISSING Z);

N9699 M99;

60 Parametric Programming
PMAC NC for Mill Application

%
Program:
%
O96 (MAIN PROGRAM THAT DEMONSTRATES BOLT-HOLE PATTERNS);
G65 P9600 X1.0 Y1.0 H1.25 W1.75 Z-.75 (CLAMP 1);
G65 P9600 X7.0 Y8.0 H1.25 W1.75 Z-.75 A-135 (CLAMP 2);
M30
%
Parametric Subroutines
A parametric subroutine is an extended version of an M98 subroutine. The following list identifies the
features that make up a parametric subroutine.
Numeric arguments can be passed from the calling program to the subroutine.
Each subroutine called has access to its own private variables that are not altered by other subroutine
calls. These variables are “local” to the subroutine.
Subroutines can be aliased.
The parametric subroutine is invoked with a line containing G65 and a P code.
Ex: N100 G65 P50 A1.0 B2.0 C3.0
In the above example, block 100 invokes program 50 as a parametric program. It passes to program 50
arguments A, B and C.
The G65 command loads the subroutine into memory and allocates a set of local variables for its use. The
local variables of the calling routine are saved and will be restored when the subroutine returns with an
M99. This concept of saving and restoring of local variables is known as nesting. In the Delta Tau NC
nesting is limited to 4 levels. The main program is considered to be nesting level 0.
Following is an example of how nesting takes place and how variables are allocated in G65 and M98
subroutines.

Parametric Programming 61
PMAC NC for Mill Application

There are 33 local variables allocated when G65 is invoked. They are initialized to an “undefined” value,
indicating that they have no value assigned to them. This value is called “undefined” and its symbol is
#0. If arguments are passed to the subroutine, the values of the arguments are stored into the local
variables of that subroutine. Address codes G, L, N, O and P cannot be used as arguments. Refer to the
section on local variables for more information.
Variables
Variables are what make parametric programming possible. Variables are used to replace literal values in
your programs. A literal value is a constant that cannot be changed.
Ex: G1 X1.2 Y3.5 (examples of literal constants)
Ex: #1=1.2
#2=3.5
G1 X#1 Y#2 (example of replacing literals with variables)
Variables can be modified in a program by using assignment statements. Variables are floating point
numbers. They are referenced by using a #<integer> notation where <integer> is a positive integral
number. The value of <integer> is restricted, (i.e. you can only use values defined in this manual).
Variables can be accessed in an indirect method by replacing <integer> with [<expr>], where <expr> is
any expression. The following all refer to the same variable.
Ex: #1

62 Parametric Programming
PMAC NC for Mill Application

Ex: #[1]
Ex: #[[1+2+3]/6]
Ex: #2=1
#[#2]
Ex: #[SIN[90.0]]
Variables can be used in conditional expressions, assignment expressions, GOTO expressions and address
code expressions.
Ex: IF [#1 EQ 3.0] GOTO#5;
Ex: #3=#3+2;
Ex: G1 X#1 Y-#2 Z#3;
The categories of variables in a FANUC compatible parametric program are:

• Undefined #0
• Local
• Common
• System
Each category is discussed in detail below.
In order to determine if a program is executing correctly, it is necessary to be able to view variables as
they are being modified in the program. The parameter display is ideal for this. Screens for displaying
Local and Common variables are predefined on the parameter display. Refer to the PARAMETER
DISPLAY section for details on how to access and use this useful tool.
Undefined #0
A variable that has not been assigned a value is called “undefined.” It is referenced in an NC program
with #0. Undefined variables allow the programmer to determine if a subroutine is being called correctly
or to determine if a certain logic path has been taken. Allowing variables to be undefined requires special
processing.
Algebraic expressions convert undefined variables to 0.0. If the equation is singular, then the expression
evaluator returns undefined.
Ex: #1=#0; (#1 is undefined);
Ex: #3=#1 (#3 is undefined);
Ex: #4=#1+#3 (#4 is 0.0);
Ex: #5=#1*3 (#5 is 0.0);
Address Codes using variables that evaluate to undefined are ignored. This means that if an address code
is parsed with an undefined variable it is just as if the parser didn’t see that address code.
Ex: #1=#0;
#2=3.5;
G1 X#1 Y#2 (same as G1 Y3.5);
Ex: X[#1+#0] (same as X0.0);
Ex: Z-[#1] ( Z is ignored);
Conditional expressions convert undefined values to 0.0 in the same manner as algebraic expressions. If
the algebraic expression results in an undefined value it is treated as 0.0 except for EQ and NE.
Conditional #1 = #0 #1 = 0
[#1 EQ #0] TRUE FALSE
[#1 NE 0] TRUE FALSE

Parametric Programming 63
PMAC NC for Mill Application

[#1 EQ 0] FALSE TRUE


[#1 GE #0] TRUE TRUE
[#1 GT 0] FALSE FALSE
[#1 LT 0] FALSE FALSE
If you are using a variable as, say, a counter and comparing for 0.0, use 0.0. If you are comparing to see
if a variable has been assigned to, use #0. It is important to distinguish between the two.
Local Variables
Local variables, as discussed above, are allocated and initialized each time a G65 is executed. Local
variables are numbered #1..#33. They are initialized to “undefined” which is equivalent to #0. Thus, if
the conditional phrase [#1 EQ #0] evaluates to TRUE, then #1 has never been assigned a value and either
argument A was not passed to the current level of nesting or argument A was #0.
M98 differs from G65 in that the local variables are not nested. M98 subroutines can still access local
variables. In an M98 subroutine the local variables that are accessed belong to the most recent G65
nesting level.
M99 in a G65 subroutine will unnest local variables and the values are lost. M99 in a M98 subroutine do
not unnest local variables.
Local variables are used to hold arguments passed to a G65 parametric subroutine call. Local variables
can be tested against #0 to determine if an argument with a value was passed. Address code arguments
are passed according to the following table.
Address Code Local Variable
A #1
B #2
C #3
D #7
E #8
F #9
H #11
I #4
J #5
K #6
M #13
Q #17
R #18
S #19
T #20
U #21
V #22
W #23
X #24
Y #25
Z #26
Address codes G, L, N, O and P cannot be used as arguments. Note that the mapping is irregular. This
follows the FANUC convention.
A subroutine can access arguments by referring to the associated variable name.
Ex: #31=#1 * 2 (assign to variable #31 the argument A times 2);
Ex: G1 G91 X#24 (Feed X the incremental amount of argument X);

64 Parametric Programming
PMAC NC for Mill Application

Note that subsequent assignments will destroy the value of the passed argument.
Common Variables
Common variables are always accessible in an NC program. Another term used is global variables.
Common variables are numbered #100 through #199 and #500 through #599.
Variables #100..#199 are initialized to undefined when the control is turned on. Variables #500..#599
values are maintained between power up and down conditions.
Common variables can be used to pass information from one parametric subroutine to another. Once a
value is set, it remains available, regardless of nesting level, until it is later modified.
System Variables
System variables give the NC programmer access to static parameters built into the control. Occasionally
the programmer needs access to these parameters in order to alter or automate Machine setup. A
summary of system variables is below:
Variable # Description
#1000-#1031 Discrete Inputs
#1100-#1131 Discrete Outputs
#2000-#2999 Tool Compensation
#3000 User Alarm with message
#3001-#3002 System Timers
#3003-#3004 Single block and override suppression
#3006 Programmable Stop with message
#3007 Mirroring
#4001-#4120 Look ahead time modal information
#4201-#4320 Run time modal information
#5001-#500n Target work coordinate position of last executed
block. Tool offset included.
#5021-#502n Commanded machine coordinate position, Tool
offset not included.
#5041-#504n Commanded work coordinate position,
Tool offset not included.
#5061-#506n Current work coordinate skip position,
Tool offset not included.
#5081-#508n Current tool offset applied
#5101-#511n Current following error
#5201-#520n Common work coordinates
#5221-#522n G54
#5241-#524n G55
#5261-#526n G56
#5281-#528n G57
#5301-#530n G58
#5321-#532n G59
#7001-#795n G54.1 P1..P48 extra offsets

The remainder of this section details System variables, how to use them and what restrictions exist, if any.
#1000-#1031 Discrete Inputs
Parametric programming allows use of discrete inputs in the NC program. These inputs are from #1000 to
#1031, total 32 inputs. Each number represents a Bit.

Parametric Programming 65
PMAC NC for Mill Application

Requirements:
• Input card (Acc34 Style) to be map as discrete input.
• Code in the control panel PLC to read inputs.
Example:
//-----------------
// ACC34 board 2 IN
//-----------------
IN_2_CHNG_M = ACC34_2A
IF (IN_2_M != IN_2_CHNG_M) // has one or more input bit(s) changed?
IN_2_M=IN_2_CHNG_M // update change flag
ENDIF
How to Use in the NC program:
Here is the example for using ACC34_2A as discrete input.
In the ADDRESS.H we have input images for the inputs.
IN_2_M M231
#1000 represents the LSB input Bit and #1031 represents MSB input bit.
1. Start the NC program. Make sure to enable New Diagnostic feature. (Pages.DAT)
2. Select DIAG (F7) menu and select Common Variable #100 to #131 page as we are using #100 in the
program.
3. In the MDI mode write the following program:
G103 P1
#100 = #1000
#101 = #1001
#102 = #1002
#131 = #1031
M30 (Use M99 for continuous execution)
4. Execute the MDI program by pressing Cycle Start.
If the inputs are connected, then in the DIAG page status will be displayed.
If the inputs are not connected, then using PEWIN32 write M231 = 7 and the DIAG page will display
#100 = 1, #101 = 1 and #102 = 1.
Discrete outputs #1100 - #1131
Parametric programming allows using discrete output in the NC program. These outputs are from #1100
to #1131, total 32 outputs. Each number represents a Bit.
Requirements:
• Output card (Acc34 Style) to be mapped as discrete outputs.
• Code in the control panel PLC to read output.

66 Parametric Programming
PMAC NC for Mill Application

Example:
//-----------------
// ACC34 board 2 IN
//-----------------
IN_2_CHNG_M = ACC34_2A
IF (IN_2_M != IN_2_CHNG_M) // has one or more output bit(s)
changed?
IN_2_M=IN_2_CHNG_M // update change flag
ENDIF
How to Use in the NC program:
Here is the example for using ACC34_2A as discrete output.
In the ADDRESS.H we have output images for the outputs.
OUT_2_M M251
#1100 represents the LSB output bit and #1131 represents MSB output bit.
1. Start the NC program. Make sure to enable New Diagnostic feature. (Pages.DAT)
2. Select DIAG (F7) menu and select Common Variable #100 to #131 page as we are using #104 in the
program.
3. In the MDI mode write the following program…
G103 P1
#1100 = #104
#1101 = #104
#1102 = #104
M30 (Use M99 for continuous execution)
4. Execute the MDI program by pressing Cycle Start.
If the outputs are connected then in the DIAG page set #104 a value the outputs will be operated.
If the outputs are not connected then using PEWIN32 set #104 to 7 in DIAG page #104 = 7 and read
M251 in PEWIN32.
#2000-#2999 Tool Compensation
For a Mill, Tool compensation system variables are organized by H and D codes. The following are
reserved for tool geometry and wear.
#2000 Always returns zero when used in an expression, Associated with H0 and D0.
#2001-#2200 H code Geometry for tool 1..200 (Tool Length offset).
#2201-#2400 H code Wear for tool 1..200 (Tool Length Wear).
#2401-#2600 D code Geometry for tool 1..200 (Tool Diameter offset).
#2601-#2800 D code Wear for tool 1..200 (Tool Diameter Wear).
These system variables are associated with the values of the tool offsets on the tool offset display. For
instance tool 004 would be referenced with system variables #2004,#2204,#2404, and #2604 for Z
GEOM, Z WEAR, CC GEOM and CC WEAR respectively.
The values of the tool offsets can be read from and written to by use of the above system variables.
When Tool offsets are modified with an assignment statement, the PC side block look ahead is halted and
look ahead processing is not continued until the look ahead queue is exhausted. Assignment to a tool
offset sends a G10 through the rotary buffer to be executed by PMAC.

Parametric Programming 67
PMAC NC for Mill Application

#3000 User Alarm with message


Fatal alarms can be generated from within a parametric program by assigning a value to #3000. The alarm
generated will have this value as a reference in the alarm message. If a comment is on the block
assigning #3000, it will be displayed on the error page.
Example: IF [#24 NE #0] GOTO 5 ;
#3000=1024 (X ARGUMENT REQUIRED) ;
N5 (CONDITIONAL WAS TRUE, X ARGUMENT PASSED)
#3001-#3002 System Timers
These timers are millisecond timers. Timer #3001 is continuously running and will wrap around after 49.7
days of running. #3001 is initialized to zero at power up. Timer #3002 is an hour timer based on #3001.
Hours are accrued only when a program is running. #3002 is saved at power down and is restored on
power up. Both of these timers can be initialized with an assignment statement.
Example: dwell 3.5 seconds
#31=#3001;
N1 IF [#3001 LT [#31+ 3500]] GOTO1 ;
#3003-#3004 Single block and override suppression
#3006 Programmable Stop with message
A programmable stop (M00) can be generated from within a parametric program by assigning a value to
#3006. A comment can be placed on the block to assist the operator in what operation is to be performed.
Ex: #3006=2001 (MESSAGE FOR THE OPERATOR) ;
#3007 Mirroring
#4001-#4026 Look ahead time modal group information
These variables can be used by the programmer to determine what the look ahead time code is for any
group. These variables contain the modal group information for the last parsed G-code block. #4001
through #4026 correspond to groups 1 through 26. For example, if you want to know if cutter
compensation is off, check to make sure that group 7 is 40.
IF [#4007 EQ 40] GOTO ??? (cutter compensation is off)
#4101-#4126 Look ahead time modal address code information
These variables can be used by the programmer to determine what the look ahead time value is for any
address code A through Z. These variables contain the value of the most recently parsed address codes.
#4101 through #4126 correspond to A through Z and are mapped in the same manner as the address
codes are (see the Local Variables section). For example, if you want to know what the last commanded
S code was, inspect #4119.
IF [#4119 GT 1500] GOTO ??? (excess spindle RPM)

68 Parametric Programming
PMAC NC for Mill Application

#5001-#500n Target work coordinate position


#5021-#502n Current machine coordinate position
These variables return the current position, in machine coordinates, of the specified axis. #5021 returns
the machine coordinate of PMAC’s #1 axis, #5022 returns the machine coordinate of PMAC’s #2 axis,
etc. Tool offsets are not included.
#5041-#504n Current work coordinate position
These variables return the current position, in work coordinates, of the specified axis. #5021 returns the
work coordinate of PMAC’s #1 axis, #5022 returns the work coordinate of PMAC’s #2 axis, etc. The
work coordinate is determined by the currently set group 14 code, G54..G59, any active G52 (local work
coordinate), any active G92, and any scaling or mirroring active. Tool offsets are not included.
#5061-#506n Current work coordinate skip position
These variables return the most recent position sensed as a “skip” or “trigger” during a G31 move. The
position is returned in work coordinates. #5061 returns the skip position of PMAC’s #1 axis, #5062
returns the skip position of PMAC’s #2 axis, etc. Tool offsets are not included.
#5081-#508n Current tool offset applied
#5101-#511n Current following error
#5201-#520n Common work coordinates
These variables return the common work coordinates in effect at look ahead time. Fanuc also refers to
these as “external” work coordinates. The common work coordinates can be modified in a G code
program by assigning values to these variables. When these variables appear on the left of an assignment
statement, the PC side look ahead queue is allowed to empty and the coordinates will change before
further look ahead is allowed. #5201 corresponds to PMAC’s #1 axis, #5202 corresponds to PMAC’s #2
axis.
These variables do NOT refer to G92.
#5221-#522n G54
Same as common work coordinates but applies to G54.
#5241-#524n G55
Same as common work coordinates but applies to G55.
#5261-#526n G56
Same as common work coordinates but applies to G56.
#5281-#528n G57
Same as common work coordinates but applies to G57.
#5301-#530n G58
Same as common work coordinates but applies to G58.
#5321-#532n G59
Same as common work coordinates but applies to G59.
#7001-#795n G54.1 P1..P48 extra offsets
Same as common work coordinates but applies to extra offsets.
Expressions
The evaluation of an expression is how data is created and how decisions are made in a parametric
program. This section explains expressions. It defines how they are formed and where they can be used
in a program.
An expression is made of three elements. These elements are operands, operators, and precedence
brackets.

Parametric Programming 69
PMAC NC for Mill Application

An operand is a variable or literal number. Variables appear as #<integer>. Literals are constants such as
1.0, 5, or 0.
An operator is a function that uses operands and derives a resultant operand. Operators are single
character operators like + and /. They can be functions like SIN[ ] or LOG[ ]. Or operators can be
conditional operators like EQ or GT.
Order of evaluation is from left to right. As an expression is evaluated from left to right, operations are
either performed immediately or deferred based on the operators precedence.
Operators with higher precedence are executed first. So that in the following expression,
#5=4+ 5 * 9
#5 will be assigned the value of 49. This is because multiplication has a higher priority than addition and
its operation is executed first even though the addition comes first in a right to left scan of the expression.
Brackets can override the default order of evaluation determined by operator precedence. The precedence
brackets are [ and ], i.e. square brackets. The following table defines the precedence of operators in the
Delta Tau control.
Symbol Meaning Precedence
EQ Equal (cond.) 1
NE Not equal to (cond.) 1
GT Greater than (cond.) 1
GE Greater than or equal to (cond.) 1
LT Less than (cond.) 1
LE Less than or equal to (cond.) 1
+ Binary Addition 2
- Binary Subtraction 2
OR Bitwise Logical or 2
XOR Bitwise Exclusive or 2
* Multiplication 3
/ Division 3
AND Bitwise Logical product 3
MOD Remainder 3
+ Unary + 6
- Unary - 6
POPEN Peripheral I/O device open 7
PCLOS Peripheral I/O device close 7
DPRNT Print to Device 7
#[ Indirect operation 7
ABS Absolute value 7
ACOS Arccosine 7
ASIN Arcsine 7
ATAN Arctangent 7
COS Cosine 7
EXP Exponentail 7
FIX Truncation (floor) 7
FUP Round up (ceiling) 7
LN Log (natural, base e) 7
ROUND Round off 7
SIN Sine 7
SQRT Square root 7
TAN Tangent 7

70 Parametric Programming
PMAC NC for Mill Application

FANUC differs from the above table in that FANUC defines the conditional operators to have the same
precedence as binary addition. If you are concerned about portability of your programs. You should
include precedence brackets around the operands of a conditional expression. For example:
[ 0.0 LT [#1+#2] ]
instead of [ 0.0 LT #1+#2 ]
Examples of expressions follow:
#1 Singular expression
3.14159 Literal constant <literal>
#1/2 compound expression
[#1+#3]/2 compound expression with precedence override
[#1 NE #0] Logical expression
SIN[#1] / COS[#2] Expression using functions
When discussing the syntax of parametric programming we will need to identify how expressions can be
used. In the following we identify any general expression, like the examples above, by <expr>.
There are four places where expressions can be used in a parametric program. Expressions are used in the
following syntactical forms:
• Assignment statements
• Address codes
• Conditional expressions
• GOTO expressions
They are defined below.
Assignment statements <assign> allow you to modify variables. Assignment statements have the
following form.
1.) #<integer>=<expr> ; Simple assignment

A simple assignment explicitly states what variable you wish to modify.


Ex: #1=5.0;
#3000=5(ALARM);
An indirect assignment allows you to state the variable that you want to modify with an expression.
Ex: #[#1]=0.0; #1 contains the number of the modified variable.
#[500+#1]=#0; #1 contains the index into the common variables.
Address code statements can use expressions in the following form.
1.) X<literal> address code using literal value.
2.) X[<expr>] address code using expression to define value.
3.) X-[<expr>] address code negating value of expression.
If an address code is followed by an expression that results in #0, “undefined,” the address code in the
block is ignored.
Ex: #1=#0
#2=1.1
G0 X#1 Y#2 (same as G0 Y1.1)
Conditional expressions make use of the following conditional operators.

Parametric Programming 71
PMAC NC for Mill Application

EQ Equal to
NE Not equal to
GT Greater than
GE Greater than or equal to
LT Less than
LE Less than or equal to
These conditional operators are binary operators that return a value of 1.0 or 0.0. If the condition
represented by the operator is TRUE, the value of 1.0 results. If the condition represented by the operator
is FALSE, 0.0 results.
Thus a conditional expression has the following general form.
[<expr>]
In most cases a conditional expression will be less general and look something like.
[<expr> <cond> <expr>] where: <cond>:: EQ|NE|GT|GE|LT|LE
To maintain FANUC compatibility, this form of a conditional expression should be adhered to.
GOTO expressions <goto> can be followed by an expression. The form of the GOTO is explained in the
section on program control.
Program Control
Parametric programming allows additional control of program processing. The following constructs,
when combined, provide the NC programmer with complete flexibility and control of the program.
Branching GOTO
Conditional block execution IF
Iteration WHILE
Pause or abort #3006=n(stop), #3000=n(alarm)
Branching is available with the GOTO statement. The GOTO statement must be followed by an
expression that evaluates to the N code of a block. The block is searched for in the currently executing
main program or subroutine.
Searching is performed in the following manner.
If the expression evaluates to a positive number the search starts from the currently parsed block and
proceeds to the end of the program. If the target block is not found, then searching resumes from the
beginning of the program and continues through to the current block.
If the expression evaluates to a negative number searching is performed in the reverse direction working
toward the beginning of the program from the current block.
If the search fails to find the target block number then an alarm is generated.
If the block is found, program execution is transferred to that block.
The GOTO statement <goto> can be used in the following forms:
GOTO<integer> Branch searching forward
GOTO-<integer> Branch searching backward
GOTO<expr> N code is derived from expression

72 Parametric Programming
PMAC NC for Mill Application

The GOTO statement, when alone on a line, is called an unconditional branch. That is, the branch always
occurs. Here are some examples.
Ex: N10 GOTO20 (FORWARD BRANCH)

N20

Ex: N30 GOTO-20 (BACKWARD BRANCH)
Ex: #1=10 (MYSTERY PROGRAM?)
#2=1
N10 #2=#2+#3*.5
N20 #2=#2-#2*.4
N30 #2=#2+#2*.3
N40 #2=#2-#2*.2
N50 #2=#2+#2*.1
#1=#1+10
GOTO#1 (EXAMPLE OF <expr>)
N60 M0 (Pause so variables do not clear)
M30
Conditional block execution allows the programmer to execute a statement based on a conditional
expression. This is accomplished with the IF statement. The IF statement has the following forms:
IF [<expr><cond><expr>] <goto>
IF [<expr><cond><expr>] THEN <assign>
In the above <expr><cond><expr> is a conditional expression containing one of the conditional operators
EQ, NE, GT, GE, LT, LE. In general the bracketed syntax can be any expression, but for FANUC
portability it is best to follow the above syntax. Conditional operators always return 0.0 or 1.0.
If the conditional expression evaluates to 0.0 (FALSE) then the statement following the conditional
expression is not performed and the next block is executed.
On TRUE (not 0.0 and not #0) the statement following the conditional is performed. This means that any
expression that evaluates to a non-zero value is considered to be TRUE, not just 1.0.
Form 1.) will branch conditionally, whereas form 2.) will perform the assignment statement. The
keyword THEN is optional.
Ex: IF [#24 EQ #0] GOTO99 (NO X ARGUMENT);
Ex: N10 #1=0;
N20 #1=#1+1;
N30 IF [#1 LT 10] GOTO20 (LOOPING) ;
Ex: IF [#500 NE 0.0] THEN #500=0.0 (ASSIGNMENT);
Iteration is available with the WHILE statement. The WHILE statement has the following form:
WHILE [<expr><cond><expr>] DOn

ENDn
Or: DOn

ENDn
Where: n=1..3

Parametric Programming 73
PMAC NC for Mill Application

And WHILE can be replaced with WH


In the above, each WHILE statement must have matching DO and END words. The DO and END labels
for any WHILE must match in number. For example:
WHILE [#1 GT 0.0] DO1

END1
WHILE [#500 NE #550] DO2

END2
DO, of the WHILE loop, will branch to the first block after its matching END block if the conditional
statement preceding it is FALSE; otherwise execution continues to the block just following the DO
statement. If there is no conditional on the block, DO-END is looped through forever.
Each program, subroutine, or parametric subroutine can have up to 3 WHILE-DO-END loops active at
any one time. The DO loops of the subroutines are all independent. This means that you can call
subroutines from within a while loop, and that subroutine will have three more while loops available to it.
When the calling program is returned to, any WHILE loops that were active prior to the call are restored.
WHILE loops can be nested as the following example shows.
N10 WHILE [#1 NE 0.0] DO1
N20 WHILE [#2 NE 0.0] DO2
N30 WHILE [#3 NE 0.0] DO3
N40 END3
N50 END2
N60 END1
WHILE loops can be repeatedly used in the same program.
N10 WHILE [#1 NE 0.0] DO1
N20 END1

N60 WHILE [#1 NE 0.0] DO1
N70 END1
Branching outside of a while loop is allowed. Branching CANNOT be made into a WHILE loop. The
following code is allowed.
N20 WHILE [#1 LT 10] DO1
N30 …
N40 IF [#100 NE 1.0] GOTO 70
N50 …
N60 END1
N70

74 Parametric Programming
PMAC NC for Mill Application

WHILE loops CANNOT overlap. The following is incorrect code and will alarm.
WHILE [#1 NE 0.0] DO1
WHILE [#1 NE 0.0] DO2
END1
END2
Pausing or aborting the program is another form of program control. Writing to system variables #3006
and #3000 will accomplish these. A program stop can be generated by writing to system variable #3006.
An alarm can be generated, and servos stopped, by writing to #3000. Refer to the system variables section
for more on #3000 and #3006.
N10 #3006=1(TURN PART OVER);
N20 #3000=1(G43 IS NOT INVOKED);
Formatted Output
Formatted Output is the way that a part program can send ASCII text strings to a serial port or a file. The
program can generate reports as a part is run, allowing for run time generation of positional data. This
data can be used later for quality assurance. The following is a list of FANUC compatible commands that
Delta Tau’s NC control supports.
DPRNT
This sends out ASCII text or formatted variables to the current output file or device. The current output
file is determined by a registry entry as described in the INTEGRATION section below. In addition, the
output file can be set in the motion applet under the probing tab. The syntax follows:
DPRNT [ <ASCII text>|<formatted variable>…] ;
Where:
ASCII text : is A..Z, 0..9,*,/,#,+,-
And
Formatted variable has the form:
#<var integer>[<whole integer><decimal integer>]
where:
var integer is any valid local or global variable number.
Whole integer is the number of places to reserve for the
Whole part of a floating point number.
Decimal integer is the number of places to reserve for the
Fractional part of a floating point number.
Examples:
Given:
#1 = 4.13
#24 = 7.9
#100= -5.9
Then
DPRNT[A=#1[22], X=#24[34] AND VARIABLE #100=#100[34]]
Sends out:
A=4.13, X=7.9000 AND VARIABLE #100=-5.9000
Given:
#9 = 30.0

Parametric Programming 75
PMAC NC for Mill Application

#24 = -.125
#25 = 1.0
Then
DPRNT[G1 X#24[44] Y-#25[44] F#9[30]]
Sends out:
G1 X-0.1250 Y-1.0000 F30
Given:
#500 = 100
#501 = #0
Then
DPRNT[THIS IS PART #501[30] OF #500[30].]
Sends out:
THIS IS PART 0 OF 100.
POPEN
This prepares or opens the output file or device for output. It should be included prior to any DPRNT
statement for FANUC compatibility.
PCLOS
This closes any output device opened by POPEN. For FANUC compatibility it should be used before
terminating a program.
The proper sequence for POPEN, PCLOS and DPRNT is illustrated in the skeleton subroutine below.
O999 (DPRNT UTILITY)
POPEN (Open device for output)
.
.
.
DPRNT[…] ;
DPRNT[…] ;
.
.
.
PCLOSE
M99
Parameter Display
The parameter display is an important tool for developing and determining if a parametric program is
working as expected. The programmer can use the parameter display to view local and global parametric
variables. The operator of the machine tool can view the value of these variables at any time, regardless of
the level of parametric subroutine nesting that the program is at. The user is allowed to change the values
of these parameters, thus giving the program a rudimentary form of operator input. Below is a picture of
the first page of local variables on the Parameter display. You can access the parameter display by
pressing F7, the DIAG soft key. It is arranged as two columns of 17 fields, enough room for the 33 local
variables. The first field of the first column is the real time value of the G65 nesting level. If you want to
see the variables for the current nesting level, make sure that the page that you are viewing matches this
number. As PMAC-NC is shipped, there are five pages of local variables corresponding to nesting levels
0 to 4 and 8 pages of global variables. The parameter display is a powerful tool for viewing system
parameters.

76 Parametric Programming
PMAC NC for Mill Application

Note:
You can modify the display to show any address in dual ported ram or within the
PMAC. To see how this can be done, review the commentary at the beginning of
the pages.dat file located in the starting directory of the ncui32.exe application. It
is strongly recommended that the end-user not change the pages.dat file. It is
meant to be set up by the machine tool OEM or integrator.

M Code Aliasing
This section describes the parametric programming feature of aliasing codes to G65 Pnnnn calls. This
feature is available on the NCUI32 product. It allows the NC programmer to alias Address codes to a
G65 Pnnnn macro subroutine or an M98 subroutine.
General Concepts
Address code aliasing is a powerful feature that allows the NC programmer to modify the behavior of the
standard codes supplied by the OEM manufacturer. Standard G-code programming and familiarity with
parametric programming is required to modify standard codes. As an example, suppose a programmer
wanted to increment a part counter every time M30 was executed. The programmer could increment the
counter prior to every M30 as in the following code:
#510=#510+1 (part counter)
M30
If this approach were used the programmer would have to modify all existing programs. But with code
aliasing he can redesign M30 to increment the part counter automatically. In this case no programs have
to be modified. The programmer would just alias M30 to a program that executes the above code.
Currently, in the Delta Tau control, only M codes can be aliased.
Aliasing M Codes
M Address codes can be aliased by adding an M code definition into the alias.ini file. The definition must
be under the section titled M_CODE_G65_ALIAS in the alias.ini file. It must have the following format.

Parametric Programming 77
PMAC NC for Mill Application

Mnnn.nn= <program specifier>


<program specifier> := <Ocode> or <file name>
where: nnn - is a positive integer from 0..999 (M98 and M99 cannot be aliased.)
.nn - is an optional extended M code specifier
Ocode - is a positive 5 digit integer corresponding to a program number. The
program is found in the current working directory and has the form of
Onnnnn.nc
file name - if the Ocode form is not used, a file name can be specified. Any file name
with path can be specified. If the file name does not include a path, the
current working directory will be searched.
Examples of properly formed definitions follow:
M30 =9021
M9 =O9022.nc
M5 =C:\Nc_Programs\Aliases\M5.nc
M3.1=9022
Only 10 M codes can be aliased at a time. Any additional definitions in alias.ini beyond the first 10 are
ignored. Any Ill-formatted definitions are ignored. You will not receive a control alarm when a definition
is ill-formed. So Be Careful. You should always test any M code definition that has been added to the
alias.ini file.
When you alias an M code the M code is replaced with G65 <program specifier>, where <program
specifier> is either Pnnnn or a comment indicating what the filename is.
An aliased M code must be the first address code on the line after any N, L, or O code.
Any address code following the aliased M code will be passed to the macro subroutine as arguments.
This is just as in the case of a standard G65 macro subroutine call.
No M code is sent for processing, (added to the rotary buffer), for any aliased M code. If any aliased M
code program, or any subroutine called from that program, has the same M code as that being aliased
then that M code is treated as a normal M code definition and it is sent to the control for processing,
(down the rotary buffer).
The alias.ini file is more flexible than FANUC's method of aliasing M codes. With FANUC, you are
limited to using programs O9020 to O9029. You may want to limit your aliased M code programs to
these values if you are concerned with maintaining FANUC compatible code. In addition, FANUC is
limited to M codes 1 to 97.
Examples
The following is an example of how you can alias M6 to do tool management. In this example, tools 1
through 10 are for program use and are considered slot 1 tools. Tools 11 through 20 are backup tools and
are considered slot 2 tools. When the main tool (1..10) exceeds its wear limit then the back up tool will
be used. This program can be expanded upon and can be made more complete. It indicates what can be
done.
alias.ini definition file
[M_CODE_G65_ALIAS]
M06=9026
Program O9026.nc

78 Parametric Programming
PMAC NC for Mill Application

%
O9026 (Modifies M6 Tnn behavior)
(assume that the tool wear was measured prior)
(to this tool change and the tool length wear)
(was updated)
(var. 551..559 contains the current tool being)
(used, 1 or 11, 2 or 12, 3 or 13, etc.)
(check for valid tool number)
IF [[#20 LT 1] OR [#20 GT 10]] GOTO97
N5
#3=1 (first slot attempted)
#1=#[550+#20] ( get the current tool slot)
IF [[#1 EQ #20] OR [#1 EQ [#20+10]]] GOTO10
#1=#20 ( use slot 1 as default)
N10 (test wear)
#2=#[2200+#1] ( get the tool length wear )
IF [#2 GT .0015] GOTO30
N20 (use the tool in the current slot)
#[550+#20]=#1 ( save which slot is being used)
M06 T#1
M99
N30 (try the other slot)
IF [#3 GE 2] GOTO98
#3=#3+1 (second slot attempted)
IF [#1 LT 11] GOTO40 (current is slot 1)
#1=#20
GOTO10 (try slot 1)
N40
#1=#20+10
GOTO10 (try slot 2)
N97 #3000=9026(ALARM: ILLEGAL TOOL NUMBER)
N98 #3006=9026(STOP: REPLACE FIRST SLOT TOOL SPECIFIED IN ARGUMENT 20)
(REMEMBER to set the tool length wear to zero)
#[550+#20]=#20
GOTO5
%
Integration
This section describes system parameters that are used by parametric programming. If these parameters
are set incorrectly, parametric programming may not exhibit correct behavior or it may not work at all.
In the following read BASE1 as
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Pmac
and read BASE2 as
HKEY_CURRENT_USER\Software\Delta Tau
Set bPCdoesMacroCall in the registry to 1.

Parametric Programming 79
PMAC NC for Mill Application

This registry variable is found in the following registry path.


\BASE1\Device0\Nc0\Code

Set UseNewDiagnostics to 1.
This registry variable is found in the following registry path.
\BASE2\NCUI 32
Insure that CallHighSpeedMachProg is set to 1065.
This registry variable is found in the following registry path.
\BASE1\Device0\Nc0\Code\Group0
Insure that macroCall is set to 65.
This registry variable is found in the following registry path.
\BASE1\Device0\Nc0\Code\Group0
BlockLookAheadDefault is set to three (3) by default.
This registry variable is in the following registry path.
\BASE1\Device0\Nc0\SYSTEM
This variable controls the PC side look ahead parsing of G code and it is not related to PMAC’s look
ahead. When set to 3 it conforms to the traditional FANUC look ahead amount. When this variable is set
to zero (0), PC side look ahead is wide open. That is, G code blocks will be parsed ahead in the PC as far
as memory permits. You can then limit look ahead, when required, by placing G103 P3 into your G code.
G103 P3 limits block look ahead to three blocks. Alternately, you can leave the Default set to 3, and
place G103 P0 into your G code.

The DPRNT output file is specified in the following location:


\BASE1\Device0\Nc0\Probing\ReportFile

80 Parametric Programming
PMAC NC for Mill Application

TOUCH PROBING FOR PMAC-NC


PMAC-NC Probing Appendix
This section outlines in detail the necessary steps to implement RENISHAW or MARPOSS probing on
the PMAC-NC. It assumes that you have a working CNC installation where you can communicate with
PMAC via the PEWIN executive.
Hardware Integration Manual
This section explains the differences that must be understood when installing probing on a Delta Tau
control. It explains and outlines the hookups necessary for the probing interfaces. After reading this
section the implementers should be able to install a spindle probe or table probe and have it working and
ready for use and testing with Delta Tau’s Software.
Differences Between PMAC and PMAC2
PMAC and PMAC2 have different capabilities when it comes to capturing current position data through
the internal position capture register. This impacts probing because probing makes use of the triggering
mechanism available with position capture, (see the PMAC manual for further information). The PMAC
has limited inputs available for triggering the position capture latch. As a result, in the PMAC, the home
flag must serve double duty as both the input for the probe skip signal and input for the home flag. Since
these functions are mutually exclusive, there is no problem. One does not probe while homing nor home
while probing. The PMAC2, has additional inputs for triggering the position capture register. The
PMAC2 uses the USERn flag for probe skip signal input. It is easier to wire and implement probing on
the PMAC2. However there is no difference in the functionality between PMAC and PMAC2 when the
probing interfaces are fully integrated.
The following paragraphs outline the wiring for a PMAC and a PMAC2. Identify which PMAC version
you have and review the section that is appropriate for your installation. You can see immediately which
flavor of PMAC you have by entering the TYPE command within the PMAC executive.
PMAC Wiring for Skip Signal
This section explains how to setup a PMAC to accept a skip signal for probing and how to wire it to use
the HMFLn flag for position capture.
Although the PMAC-NC package insures that PMACs properly configured for probing, you may not be
running PMAC-NC when hooking up your probe. The following is a list of I variables and the values you
should set them to for wiring and testing probe installation.
Encoder n capture flag control.
I903=0 - X axis uses Home flag to trigger position capture.
I908=0 - Y axis uses Home flag to trigger position capture.
I913=0 - Z axis uses Home flag to trigger position capture.
When the probe SKIP signal occurs, all enabled axes must be triggered to capture their current position.
Use the following wiring to make this occur.

Touch Probing for PMAC-NC 81


PMAC NC for Mill Application

PMAC2 Wiring for Skip Signal


This section explains how to setup a PMAC2 for probing and how to wire it to use the USERn flag for
position capture.
Although the PMAC-NC package insures that PMACs properly configured for probing, you may not be
running PMAC-NC when hooking up your probe. The following is a list of I variables and the values you
should set them to for wiring and testing probe installation.
Encoder n capture flag control.
I913=2 X axis uses USER flag to trigger position capture.
I923=2 Y axis uses USER flag to trigger position capture.
I933=2 Z axis uses USER flag to trigger position capture.
When the probe SKIP signal occurs, all active axes must be triggered to capture their current position.
Use the following wiring to make this occur.

82 Touch Probing for PMAC-NC


PMAC NC for Mill Application

Note
Currently the G31 is configured to command axes X, Y, and Z. If you do not specify any
motion on an axis, the control will command PMAC to the same location. If any axis is
not receiving its skip signal, you may see a dwell after the skip has occurred. This
indicates a line break. In addition, if you plan to use only one or two axes and you are
not wiring an axes capture flag, then you will have to modify the G31 code in mill.g by
removing the unused axes in the “move-until-trigger” command.

Installing a Spindle and Table Probe


This section describes what is required for connecting an optical interface to a Delta Tau control.
After the PMAC side of the SKIP signal input is available, the machine side needs to be addressed. This
is different depending on what signaling method the machine is using weather it be optical or hardwired,
and who the manufacturer is. You should always refer to the probe manufacturers wiring specifications
when wiring the probes. Here we include sample diagrams for both RENISHAW and MARPOSS probe
systems.
It is convenient if one wiring harness is used to collect power and signal wires entering and leaving the
PMAC-NC. Below is a suggestion for a probe wiring harness using a DB-9 connector.
DB-9 CONNECTOR PIN ASSIGNMENTS
1- BLACK AGND (PMAC analog ground) (out)
2- RED TABLE PROBE SELECT SIGNAL (out) \ Signal pins
3- GREEN SKIP SIGNAL (in) /
4- WHITE START ENABLE SIGNAL (out) -
5- NOT USED
6- BLACK Common 24 VOLT (out) -
7- GREEN CHASSIS GROUND (out) \ Power pins
8- RED + 24 VOLT (out) /
9- WHITE AVAILABLE -
Optical Interface
Two relays must be available. One for the Start Spindle Probe signal sent to the optical interface. And
another for selecting the table probe. It is suggested that discrete input 13 be used for the Start Spindle
Probe signal and the discrete input 14 be used for selecting the table probe. Any two relays can be used
providing the defined variables used by M codes supplied with PMAC-NC are modified to reflect this. As
shipped PMAC-NC uses these relays by default.

Touch Probing for PMAC-NC 83


PMAC NC for Mill Application

Renishaw
This wiring chart is based on the Renishaw MI-12, the OMM, and the M18 interface unit. The chart
addresses both the spindle and table probe. The pin designations use cc(pp) where cc is the component
and pp is the pin on the component.
Renishaw Wiring Chart Key Components
------------------------------------
PP = PROBE HARNESS POWER PIN OW = OMM WIRE
SP = PROBE HARNESS SIGNAL PIN TW = TABLE PROBE WIRE
OI = OPTICAL INTERFACE PIN (MI12)
HI = HARDWIRE INTERFACE PIN (M18)
MI12 SW3 SET TO 1-2-3-4
MI12 SW2 SET TO 1-2-3-4
MI8 OUTPUT SET TO 1 (N/C normally closed)
PROBE SIGNAL PINS
-----------------
SP( 1) - BLACK - OI(23) (AGND Analog ground)
SP( 2) - GREEN - OI(23) (Table probe select)
SP( 3) - RED - OI(24) (SKIP signal)
SP( 4) - WHITE - OI(21) (Probe Enable)
PROBE POWER PINS
----------------
PP( 6) - BLACK - OI(17) (Common 24V)
PP( 7) - GREEN - OI(18) (Chassis ground)
PP( 8) - RED - OI(16) (+24V)
OMM WIRES
---------
OW - YELLOW - OI( 1)
OW - GREY - OI( 2)
OW - WHITE - OI( 3)
OW - GREEN - OI( 4)
OW - BROWN - OI( 5)
OW - YLW/GRN - OI(18) (Shield)
TABLE PROBE INTERFACE
---------------------
HI(A1) - BLUE - TW
HI(A2) - RED - TW
HI(A3) - - TW (Shield)
HI(A4) - - OI(18) (Chassis ground)
HI(A5) - RED - OI(16) (+24V)
HI(A6) - BLACK - OI(17) (Common 24V)
HI(B6) - GREEN - OI(24) (SKIP signal, through relay M949)
HI(B7) - YELLOW - OI(23) (AGND Analog ground)
MISC
----
OI(17) – BLACK - OI(22)

84 Touch Probing for PMAC-NC


PMAC NC for Mill Application

Marposs
This wiring chart is based on the Marposs E83 optical transmission system. The chart addresses both the
spindle and table probe. The pin designations use cc(pp) where cc is the component and pp is the pin on
the component.
Marposs Wiring Chart Key Components
------------------------------------
PP = PROBE HARNESS POWER PIN OW = OMM WIRE
SP = PROBE HARNESS SIGNAL PIN TW = TABLE PROBE WIRE
OI = OPTICAL INTERFACE PIN (E83)
E83 INTERFACE DIP SWITCH SET TO 0-0-1-1-0-1-0-1-0-1
(where the right most digit is switch 1)
PROBE SIGNAL PINS
-----------------
SP( 1) - BLACK - OI(12)
SP( 2) - GREEN - OI(25)
SP( 3) - RED - OI(13)
SP( 4) - WHITE - OI(11)
PROBE POWER PINS
----------------
PP( 6) - BLACK - OI(17)
PP( 7) - GREEN - OI(18)
PP( 8) - RED - OI(16)
OMM WIRES
---------
OW - WHITE - OI( 1)
OW - PURPLE - OI( 2)
OW - GREEN - OI( 3)
OW - BLUE - OI( 4)
OW - RED - OI(19)
OW - BLACK - OI(20)
TABLE PROBE INTERFACE
---------------------
OI( 9) - RED - TW
OI(10) - BLUE - TW
MISC
----
OI(16) - GREY - OI(26)
OI(12) - BLACK - OI(14)

Touch Probing for PMAC-NC 85


PMAC NC for Mill Application

Software Integration Manual


This section describes the installation and testing of the probing software. Before you can test the probe,
you must install the latest version of the software required for probing. Before loading the software, it is
probably a good idea to review the section describing the variables and the variable map for the probing
software. If your application uses any of these areas, you will need to address these issues. It is strongly
recommended that you modify your application rather than the probing software.
Probing Memory Map
The following list identifies PMAC variables reserved for use by probing software. Note the extensive
use of P variables for probing.
M0..500 (Standard Delta Tau reserved M codes)
P100..199 (Probing variables)
P250..499 (Standard Delta Tau reserved P codes)
P500..599 (Probing variables)
P600..799 (G65 nesting stack space for probing variables)
P950..989 (G65 Miscellaneous variables)
P990..1023 (32 bit selection mask)
Q0..350 (Standard Delta Tau reserved Q codes)
Installation of Software
Execute the following procedure to insure that all of the software required to run probing is installed. It is
recommended that you install probing in a working CNC system. The following is a list of software
required for probing. If you have probe ready software then all of your files should be configured to
install and work as is.
Files Required for Installation
Renish.pmc FANUC to PMAC translated probing routines.
Probe.plc Initializes probe, monitors skip signal.
Errors.dat Contains text of alarms specific to probing.
Dprnt.enu Contains Text of Dprnt statements.
Mill.g With G31, G65, G103 installed.
Mill.m With M51 (Probe On),
M52 (Table probe select)
M62 (Spindle probe select, default)
and M61 (Probe Off).
Mill.t Updated T codes that allow M06 to operate within
G65 motion program.
Oem.h 1.68 or later.
Registry default report file.
Redistry G65 definition.
1. Inspect the *.cfg file for your machine. If you are adding probing to an existing system insure that
the *.cfg file includes probe.pmc and probe.plc.
2. Within PEWIN, save a copy of the current Configuration. If something goes wrong, you can use this
to restore a working environment.
3. Download your *.cfg file.
4. If you have any problems successfully downloading the *.cfg file you are probably using an old copy
of PEWIN. You need a copy of PEWIN in which conditional compilation is working properly.
5. Enable PLC’s by typing ENABLE PLC 1..31 and I5=2.
6. Save the configuration to flash by typing SAVE in PEWIN.

86 Touch Probing for PMAC-NC


PMAC NC for Mill Application

Testing of the Probe


At this point, you are ready to test the probing hardware. Before any probe cycles can be run. You must
insure that the SKIP signal is being received by PMAC and that PMACs responding to the skip signal.
You will first need to verify that the spindle probe and the table probe generates a proper signal when
triggered. This can best be done in PEWIN through the executive. Then you must insure that servos stop
when a trigger occurs. This is best done through the NC interface using G31 for testing.
Use the following procedure to test for proper operation of the probe.
Testing for a SKIP signal.
1. Enter PMAC-NC.
2. Home all axes.
3. Select the spindle probe by executing M62 from MDI.
4. Enable the spindle probe by executing M51 from MDI.
5. Exit the NC interface and PEWIN, the executive.
6. Inspect M5 either via a watch window or by typing M5.
7. Deflect the spindle probe with your finger.
Inspect M5 or type M5 again.
You should be able to see the value of M5 changing as you toggle the probe. If you do not, check your
wiring, and the battery in the probe. The probe interface should not be in an error condition.
The interface should be set as a normally open circuit.
1. Check the dip switches. Check the voltage levels to the interface units.
2. Use the same procedure to insure that the table probe is working.
If both a spindle and table probe are connected to the same interface unit, it is IMPORTANT to
insure that both are functioning properly. Additional voltage shunted to a table probe may cause the
spindle probe to stop functioning or vice-verse.
3. Stop the spindle probe by entering M61 from MDI.
4. Select the table probe by entering M62 from MDI.
5. When you are sure that PMACs receiving a SKIP signal, Test the G31 command.
Testing G31 operation.
1. Enter the PMAC-NC interface.
2. Home all axes.
3. Insure that the work cell is clear.
4. Place the probe into the spindle.
5. Select the spindle probe by executing M62 from MDI.
6. Enable the spindle probe by executing M51 from MDI.
7. Execute the following G code. G31 G91 X-5.0 F30.
8. During table feed deflect the probe with your finger. The table should stop before reaching the 5.0
inch destination. This indicates that the spindle is functioning.
9. Perform a similar test on the table probe.

Touch Probing for PMAC-NC 87


PMAC NC for Mill Application

Machining Center Operators Manual


Probing Cycles
This section describes the probing cycles that are supplied with the Delta Tau control. It is currently a
subset of probing routines supplied with RENISHAW probes. Probing cycle software supplied by
RENISHAW and MARPOSS are usually written in the FANUC extension to G-code, referred to as
MACROS. Delta Tau translates FANUC macro statements into native PMAC code and stores them as
subroutines which can be called with a G65 command.
The probing cycles are divided into the following categories.
CALIBRATION
• Spindle Probe length calibration
• Spindle Probe Stylus offset from spindle center
• Spindle Probe Ball radius
• Spindle Probe Ball radius (vector measuring)
• Table Probe Length Calibration
• Table Probe X-Y Calibration
SAFE AXIS MOVEMENT
• Protected Positioning
MEASUREMENT
• Surface measure of X,Y or Z planes
• Web/Trough measurement
• Bore/Boss measurement
• Internal corner location
• External corner location
• Tool length setting
• Tool diameter setting
VECTOR MEASUREMENT
• Deviation of distance to angled surface in the X-Y plane
• Width deviation of an angled web or pocket
• Three point bore/boss measurement
MISCELLANEOUS
• Bolt pattern bore/boss measurement
• Calculate feature to feature distance
• X-Y plane surface angle measurement
Calling Method
Use G65 P.... to invoke the probing cycle. The system will stop look ahead based on an internal list of O
codes designated as programs that must stop look ahead. In the descriptions that follow any address code
that follows G65 P.... is an argument to the cycle called by P.... Optional arguments are designated by
brackets [].

88 Touch Probing for PMAC-NC


PMAC NC for Mill Application

Calibration
These probing macros are used to ascertain dimensional features of the probe. The features are stored and
later used by various probe cycles to adjust for these attributes.
Spindle Probe Length Calibration
This cycle moves the Z axis toward a reference surface. When the probe is triggered, the machine
coordinate is saved and stored as the probe calibration length in the offset designated by the currently
active H code.

G65 P9801 Z T
T - The current active tool offset H code. Usually the tool that the spindle probe resides in. Must be the
same as the active H code.
Z - Reference plane value in the current work coordinate. Typically Z0.
Program Example:
N9801(TEST PROBE LENGTH CALIBRATE)
G90 G80 G40 G0
M19 (ORIENT SPINDLE)
G54 X1.1 Y0 (X-Y POSITION ABOVE PLANE)
G43 H1 Z.75 (Z POSITION, SELECT OFFSET)
G65 P9810 Z.25 F30. (PROTECTED MOVE CLOSER)
G65 P9801 Z.0 T1 (CALIBRATE LENGTH)
G65 P9810 Z.25 (PROTECTED AWAY)
Spindle Probe Stylus Offset from Spindle Center Calibration
This cycle determines how far the probe stylus ball is from the spindle centerline. A calibration ring
should be placed in the work cell where the diameter and exact location of the center is known.
Optionally a pre-machined bore can be used. The probe must be positioned exactly on the bore center
inside the bore. The cycle moves the X and Y axes from the center of the calibration ring until the bore
surface is found. Upon completion of the cycle the X and Y stylus offsets are retained for use in other
probing cycles. The X axis offset is stored in variable P502 and the Y axis offset is stored in variable
P503.

Touch Probing for PMAC-NC 89


PMAC NC for Mill Application

G65 P9802 D [Z]


D - Actual bore diameter, (average).
Z - Current work coordinate Z axis measuring position when measuring an external boss. Omit if a bore is
being measured.
Program Example:
N9802 (TEST PROBE X-Y OFFSET CALIBRATE)
G90 G80 G40 G0
M19 (ORIENT SPINDLE)
G54 X0 Y0 (X-Y POSITION ABOVE PLANE)
G43 H1 Z.75 (Z POSITION, SELECT OFFSET)
G65 P9810 Z-.2 F30. (PROTECTED MOVE CLOSER)
G65 P9802 D2.0 (CALIBRATE STYLUS OFFSET)
G65 P9810 Z.25 (PROTECTED AWAY)
Spindle Probe Ball Radius Calibration
This cycle determines the probe stylus radius (from stylus center) for the X and Y directions. A
calibration ring should be placed in the work cell where the diameter and approximate center location is
known. The probe must be positioned inside the bore. The cycle moves X and Y axes to determine the
two radii. Upon completion of the cycle the X and Y stylus radii are retained for later use. The X axis +/-
radius is stored in variable P500 and the Y axis +/- radius is stored in variable P501.

90 Touch Probing for PMAC-NC


PMAC NC for Mill Application

G65 P9803 D [Z]


D - Actual bore diameter, (average).
Z - Current work coordinate Z axis measuring position when measuring an external boss. Omit if a bore is
being measured.
Program Example:
N9803 (TEST PROBE BALL RADIUS CALIBRATE)
G90 G80 G40 G0
M19 (ORIENT SPINDLE)
G54 X0 Y0
G43 H1 Z.75 (SELECT TOOL OFFSET, Z APPROACH)
G65 P9810 Z-.2 F30. (PROTECTED MOVE)
G65 P9803 D2.0 (CALIBRATE STYLUS RADIUS)
G65 P9810 Z.25 (PROTECTED DEPART)
Spindle Probe Ball Radius (Vector Measuring) Calibration
This cycle determines the probe stylus radius (from stylus center) for the X and Y directions. In addition,
8 other directions are determined in order to calculate accurate data for vectored measuring cycles. A
calibration ring should be placed in the work cell where the diameter and approximate center location is
known. The probe must be positioned inside the bore. The cycle moves X and Y axes to determine the
ten radii. Upon completion of the cycle the radii are retained for later use. The X axis +/- radius is stored
in variable P500 and the Y axis +/- radius is stored in variable P501. Additional radii are store according
to the table below.

Touch Probing for PMAC-NC 91


PMAC NC for Mill Application

VECTORED RADIUS STORAGE


PMAC DIRECTION
VARIABLE DEGREES
P500 0-180
P501 90-270
P510 30
P511 60
P512 120
P513 150
P514 210
P515 240
P516 300
P517 330

G65 P9804 D [Z]


D - Actual bore diameter, (average).
Z - Current work coordinate Z axis measuring position when measuring an external boss. Omit if
a bore is being measured.
Program Example:
N9804(TEST PROBE VECTOR STYLUS RADIUS CALIBRATE)
M19 (ORIENT SPINDLE)
G90 G80 G40 G0
G54 X0 Y0
G43 H1 Z.75 (SELECT TOOL OFFSET, Z APPROACH)
G65 P9810 Z-.2 F30. (PROTECTED MOVE)
G65 P9804 D2.0 (CALIBRATE STYLUS RADII)
G65 P9810 Z.25 (PROTECTED DEPART)
Table Probe Length Calibration
This cycle determines the actual machine location for the Z axis surface of a table probe. The calibration
is accomplished using a calibration arbor of precise known length. To calibrate place the arbor in the
spindle and position it directly over and on center of the table probe stylus surface. The cycle touches off
of the stylus three times. When the calibration is complete the stylus surface location is stored in PMAC
variable P520.

92 Touch Probing for PMAC-NC


PMAC NC for Mill Application

ARBOR Z0

ZREF

P520
STYLUS

G65 P9851 K
K - Calibration length of reference arbor, (ZREF).
Program Example:
N9851 (CALIBRATE ARBOR LENGTH TO TABLE PROBE)
G90 G80 G40 G0
G49 (CANCEL TOOL LENGTH OFFSET)
G54 X0 Y0 (POSITION ABOVE TABLE PROBE)
G65 P9851 K6.0 (CALIBRATE LENGTH, ARBORE IS 6.0 INCHES)
Table Probe X-Y Calibration
This cycle determines the size of the probe stylus using a reference arbor of precise known diameter. The
reference probe is place into the spindle and positioned above the probe stylus approximately on center.
The cycle touches off two sides of the probe stylus and determines the exact width of the stylus at the tool
measure position. The width is stored in variable P522 for use when measuring tool diameters.

Touch Probing for PMAC-NC 93


PMAC NC for Mill Application

ARBOR

K Z
STYLUS

G65 P9852 S K [Z]


K - Table probe stylus diameter, (average).
S - Calibration arbor diameter.
Z - Incremental distance from start plane to touch off point.
Optional, default distance is -.4 inch.
Program Example:
N9853 (CALIBRATE ARBOR DIAMETER TO TABLE PROBE)
G90 G80 G40
G49 (CANCEL TOOL LENGTH OFFSET)
G54 X0 Y0 (POSITION ON CENTER OF TOOL TEST POSITION)
G65 P9852 S1.1255 K.500 Z-.8
Safe Axis Movement
Protected Positioning
This cycle typically utilizes G31 to move to a location. It is programmed just like G31. If the path is
obstructed, then motion is stopped with an alarm, whereas G31 will go on to the next block and will not
alarm. It is used when moving about the work cell with the probe in the spindle. If the probe is deflected
because an object hits it in an unanticipated manner, then all motion will stop.
G65 P9810 X Y Z [F]
F - Modal feed rate for the interpolated move. Once set it is not necessary to place in each protected
positioning block.
X Y Z - Axis destination linearly interpolated at feed F.

94 Touch Probing for PMAC-NC


PMAC NC for Mill Application

Program Example:
N9810 (PROTECTED POSITIONING MOVES)
G90 G80 G40
G65 P9810 X0 Y0 F30. (APPROACH POSITION)
. (DO)
. (SOME)
. (PROBING)
G65 P9810 X10. Y5.0 (DEPART POSITION)
Measurement
These probing cycles are the most commonly used measurement cycles. They have the ability to
optionally set tool or work offsets, record true position, or print output, based on input arguments supplied
through the application.
Surface Measure of X, Y or Z Planes
This cycle measures the position of a surface parallel to the X Y or Z plane. The surface can be used to
set a tool offset. It can be used to adjust a work offset. The surface position can be reported to a file.

G65 P9811 X | Y | Z [F Q S T W]
F - Modal feed rate for the interpolated move. Once set it is not necessary to place in each protected
positioning block.
Q - Maximum search distance beyond target surface before alarming.
S - Work offset to adjust to surface S1=G54 .. S6=G59. The work offset is adjusted by the error from the
programmed value.
T - Tool offset to update when probe trigger occurs
W - Print results to the currently selected output file.
W1 - Increment the feature number.
W2 - Increment component number, set feature number to 1.
X Y Z - Axis destination linearly interpolated at feed F.

Touch Probing for PMAC-NC 95


PMAC NC for Mill Application

Program Example:
N9811 (SINGLE SURFACE MEASURE)
M19 (ORIENT SPINDLE)
G90 G80 G40 G0
G54 Y.5 (WORK COORD, APPROACH Y)
G43 H1 Z.75 (TOOL OFFSET, APPROACH Z)
G65 P9810 Z-.5 F50. (PROTECTED APPROACH)
(FEATURE 1)
G65 P9811 YO W1 (REPORT Y EDGE, SHOULD BE 0)
G65 P9810 Z1.0 F50. (PROTECTED DEPART)
G0 Z.75
Web/Trough Measurement
This cycle measures the size of a web or trough feature parallel to the X or Y plane. The feature can be
used to set a tool offset. It can be used to adjust a work offset. The feature size can be reported to a file.

R -R
Z
Z0

SIZE SIZE SIZE


G65 P9812 X WEB
| Y [Z F Q R S T W] TROUGH 1 TROUGH 2
F - Modal feed rate for the interpolated move. Once set it is not necessary to place in each protected
positioning block.
Q - Maximum search distance beyond feature surface before alarming.
R - Added to X Y SIZE when determining decent position of probe. When R is +, the feature is a WEB.
When -, the feature is TROUGH 2.
S - Work offset to adjust to surface S1=G54 .. S6=G59. The work offset is adjusted by the error from the
programmed value.
T - Tool offset to update when probe trigger occurs
W - Print results to the currently selected output file.
W1 - Increment the feature number.
W2 - Increment component number, set feature number to 1.
X Y - The features nominal SIZE, web or trough, measured in X or Y.
Z - Absolute Z location to touch off. If not present TROUGH 1 is assumed

96 Touch Probing for PMAC-NC


PMAC NC for Mill Application

Program Example:
N9812 (POCKET MEASURE)
M19 (ORIENT SPINDLE)
G90 G80 G40 G0
G54 X-1.25 Y-3.25 (WORK COORD, X Y APPROACH
G43 H1 Z.75 (SELECT OFFSET, Z APPROACH)
G65 P9810 Z-.2 F50. (PROTECTED APPROACH)(FEATURE 2)
G65 P9812 X2.0 W1 (REPORT ON WIDTH OF 2.0 POCKET)
G65 P9810 Y-3.25 (PROTECTED DEPART)
Bore/Boss Measurement
This cycle measures the size of a bore or boss feature in the X-Y plane. Measurements are made at 0, 90,
180 and 270 degrees to determine feature size. The feature can be used to set a tool offset. It can be used
to adjust a work offset. The feature size can be reported to a file.

R -R
Z
Z0

DIA DIA DIA


BOSS BORE 1 BORE 2
G65 P9814 D [Z F Q R S T W]
D - The features nominal diameter (DIA), bore or boss.
F - Modal feed rate for the interpolated move. Once set it is not necessary to place in each protected
positioning block.
Q - Maximum search distance beyond feature surface before alarming.
R - Added to X Y SIZE when determining decent position of probe. When R is +, the feature is a BOSS.
When -, the feature is BORE 2.
S - Work offset to adjust to surface S1=G54 .. S6=G59. The work offset is adjusted by the error from the
programmed value.
T - Tool offset to update when probe trigger occurs
W - Print results to the currently selected output file.
W1 - Increment the feature number.
W2 - Increment component number, set feature number to 1.
Z - Absolute Z location to touch off. If not present BORE 1 is assumed

Touch Probing for PMAC-NC 97


PMAC NC for Mill Application

Program Example:
N9814 (4-POINT BORE MEASURE)
M19 (ORIENT SPINDLE)
G90 G80 G40 G0
G54 X-6.75 Y-1.25 (WORK COORD, X-Y APPROACH)
G43 H1 Z.75 (SELECT TOOL OFFSET, Z APPROACH)
G65 P9810 Z-.2 F50. (PROTECTED APPROACH)
G65 P9823 D2.0 W1 (REPORT BORE SIZE)
G65 P9810 Z.25 (PROTECTED DEPART)
G0 Z.75
Internal Corner Location
This cycle measures the location of an internal corner at the intersection of two planes. The planes do not
have to be orthogonal (90 degrees) to each other. The feature can be used to set a tool offset. It can be
used to adjust a work offset. The feature location can be reported to a file.

J I

Y
XY
X
G65 P9815 X Y [B F I J M Q S W]
B - Maximum allowable angular plane deviation of each surface. B5.0 is +/- 5 degrees.
F - Modal feed rate for the interpolated move. Once set it is not necessary to place in each protected
positioning block.
I - Incremental distance along X axis to move for 2nd touch off point.
J - Incremental distance along Y axis to move for 2nd touch off point.
Q - Maximum search distance beyond feature surface before alarming.
R - Added to X Y SIZE when determining decent position of probe. When R is +, the feature is a BOSS.
When -, the feature is BORE 2.
S - Work offset to adjust to surface S1=G54 .. S6=G59. The work offset
is adjusted by the error from the programmed value.
W - Print results to the currently selected output file.
W1 - Increment the feature number.
W2 - Increment component number, set feature number to 1.
X Y - Expected work coordinate location of internal corner.

98 Touch Probing for PMAC-NC


PMAC NC for Mill Application

Program Example:
N9815 (INTERNAL CORNER)
M19 (ORIENT SPINDLE)
G90 G80 G40 G0
G54 X-7.3 Y-3.3 (COORD SYSTEM, X Y APPROACH)
G43 H1 Z.75 (SELECT OFFSET, Z APPROACH)
G65 P9810 Z-.2 F50. (PROTECTED APPROACH)
G65 P9815 X-7.75 Y-3.75 I.4 J.4 W1 (REPORT SW INTERNAL CORNER)
G65 P9810 Z.75 F50. (PROTECTED DEPART)
G0 Z.75
External Corner Location
This cycle measures the location of an external corner at the intersection of two planes. The planes do not
have to be orthogonal (90 degrees) to each other. The distance to the first touch off point is the same
distance from the probe start point to the X Y corner position. The feature can be used to set a tool offset.
It can be used to adjust a work offset. The feature location can be reported to a file.

X Y Position Y X XY
of corner Position

J
I
Probe start Probe start
ii Equidistant ii Equidistant

G65 P9816 X Y [B I J Q S W]
B - Maximum allowable angular plane deviation of each surface. B5.0 is +/- 5 degrees.
F - Modal feed rate for the interpolated move. Once set it is not necessary to place in each protected
positioning block.
I - Incremental distance along X axis to move for 2nd touch off point.
J - Incremental distance along Y axis to move for 2nd touch off point.
Q - Maximum search distance beyond feature surface before alarming.
S - Work offset to adjust to surface S1=G54 .. S6=G59. The work offset is adjusted by the error from the
programmed value.
W - Print results to the currently selected output file.
W1 - Increment the feature number.
W2 - Increment component number, set feature number to 1.
X Y - Expected work coordinate location of external corner.

Touch Probing for PMAC-NC 99


PMAC NC for Mill Application

Program Example:
N9816 (ZERO ON NE EXTERNAL CORNER)
M19 (ORIENT SPINDLE)
G90 G80 G40 G0
G54 X.2 Y.2 (X Y APPROACH)
G43 H1 Z.75 (Z APPROACH)
G65 P9810 Z-.5 F50. (PROTECTED APPROACH)
G65 P9816 X0 Y0 I-.5 J-.5 S1 W1 (REPORT NE CORNER)
G65 P9810 Z.75 F50. (PROTECTED DEPART)
Table Probe Tool Length Setting
This probing cycle determines the length of a tool as referenced from machine zero. The cycle can be
used to automatically set tool length offsets or to detect a broken tool. The tool must be positioned on
center and just above the probe stylus prior to invoking the cycle. The table probe must first be
calibrated.

TOOL

STYLUS

G65 P9851 T [Q S Z]
Q - Maximum search distance beyond feature surface before alarming.
S - Tool diameter, for tools required to rotate (shell mills).
Positive (+) for right handed tools.
Negative (-) for left handed tools.
T - Tool offset number to update with length.
Z - Incremental depth for measurement from the start position.
Default is -.4 inch.

100 Touch Probing for PMAC-NC


PMAC NC for Mill Application

Program Example:
N9851 (AUTOMATICALLY SET TOOL 8 LENGTH)
M52 (SELECT TABLE PROBE)
M19 (ORIENT SPINDLE)
G49 (CANCEL TOOL OFFSET)
G54 X0 Y0 (SELECT COORD, APPROACH STYLUS CENTER)
G65 P9851 T8 Q4.0 (SET TOOL LENGTH H8, ALLOW 4 INCHES OVERTRAVEL)
Tool Diameter Setting
This probing cycle determines the diameter of a tool. The cycle can be used to automatically set tool
diameter offsets or to detect a broken tool. The tool must be positioned on center and just above the
probe stylus prior to invoking the cycle. The table probe must first be calibrated.

TOOL

G65 P9852 S D [Z R]
D - Tool radius offset number to update.
R - Radial clearance when traveling down the side of the stylus. Default .16 inches.
S - Tool diameter, for tools required to rotate (shell mills).
Positive (+) for right handed tools.
Negative (-) for left handed tools.
Z - Incremental depth for measurement from the start position. Default is -.6 inch.
Program Example:
G53 G1 X-10.0 Y0 (MOVE TO TOOL CHANGE POSITION)
G53 G1 Z-4.37
T7 M6 (GET TOOL 7)
G53 G1 Z-4.6 (MOVE TO CLEARANCE PLANE)
N9852 (AUTOMATICALLY SET TOOL 7 DIAM)
M52 (SELECT TABLE PROBE)
M19 (ORIENT SPINDLE)

Touch Probing for PMAC-NC 101


PMAC NC for Mill Application

G90 G80 G40


G49 (CANCEL TOOL OFFSET)
G54 X0 Y.2 (SELECT COORD, APPROACH STYLUS CENTER)
G65 P9852 S.5 D7 (SET TOOL RADIUS D7, .5 DIAMETER TOOL)
Vector Measurement
These probing macros are used to measure features that are not normal (90 degrees) to the X, Y or Z axis.
They involve the recording of some angle. In order to use these cycles, 12 additional points of the probe
ball are used. These points are used to compensate for the probe ball not being on the center of the
spindle. Before these cycles can be used the user must orient the spindle and calibrate the probe for use
with vector probing cycles.
DEVIATION OF DISTANCE TO ANGLED SURFACE IN THE X-Y PLANE
This cycle measures the distance to an angled surface. The surface is limited to angles in the X-Y plane.
The angle is determined by the programmer. Deviations of the expected distance to the surface are
reported.
By using two measurements along a know angle, the true angle and deviation can be determined. (See
SPINDLE PROBE BALL RADIUS (VECTOR MEASURING) CALIBRATION).

G65 P9821 A D [Q S T W]
A - Assumed Angle of surface being measured. (+/- 180.0 degrees)
D - Expected distance to surface along angle A from start position.
Q - Maximum search distance beyond target surface before alarming.
S - Work offset to adjust to surface S1=G54 .. S6=G59. The work offset is adjusted by the error from the
programmed value.
T - Tool offset to update when probe trigger occurs
W - Print results to the currently selected output file.
W1 - Increment the feature number.
W2 - Increment component number, set feature number to 1.
Program Example:
N9821 (TEST ANGLED SINGLE SURFACE MEASURE)
G90 G80 G40 G0
M19 (ORIENT SPINDLE)
G54 X-.75 Y-.75 (X-Y APPROACH)
G43 H1 Z.75 (Z APPROACH)
G65 P9810 Z-.2 F50. (PROTECTED Z APPROACH)
G65 P9821 A225. D.3536 W1 (REPORT DISTANCE TO SURFACE)

102 Touch Probing for PMAC-NC


PMAC NC for Mill Application

G65 P9810 Z.75 F50. (PROTECTED DEPART)


Width Deviation of an Angled Web or Pocket
This cycle measures the width of an angled web or pocket. The web/pocket is limited to angles in the X-
Y plane. The angle is determined by the programmer. Deviations of the expected width are reported. By
using two measurements along a know angle, the true angle and deviation can be determined. (See
Spindle Probe Ball Radius (Vector Measuring) Calibration).

-R
R
A
A

D Z
D
D
TROUGH 1 WEB TROUGH 2

G65 P9822 A D [Z F Q R S T W]
A - Assumed Angle of web/pocket being measured. (+/- 180.0 degrees)
D - Expected width of feature.
F - Modal feed rate for the interpolated move. Once set it is not necessary to place in each protected
positioning block.
Q - Maximum search distance beyond feature surface before alarming.
R - Added to D when determining decent position of probe. When R is +, the feature is a WEB. When R
is -, the feature is as TROUGH 2.
S - Work offset to adjust to surface S1=G54 .. S6=G59. The work offset is adjusted by the error from the
programmed value.
T - Tool offset to update when probe trigger occurs
W - Print results to the currently selected output file.
W1 - Increment the feature number.
W2 - Increment component number, set feature number to 1.
Z - Absolute Z location to touch off. If not present TROUGH 1 is assumed
Program Example:
N9822 (ANGLED POCKET MEASURE)
G90 G80 G40 G0
M19 (ORIENT SPINDLE)
G54 X-1.45 Y-1.65 (X-Y APPROACH)
G43 H1 Z.75 (Z APPROACH)
G65 P9810 Z-.2 F50. (PROTECTED APPROACH)
G65 P9822 A-45. D1.0 W1 (MEASURE ANGLED POCKET)

Touch Probing for PMAC-NC 103


PMAC NC for Mill Application

G65 P9810 Z.75 F50. (PROTECTED DEPART)


Three Point Bore/Boss Measurement
This cycle measures the diameter of bore or boss using 3 points specified by the programmer. The three
points are specified using angles reference to the X+ direction. Deviations of the bore/boss can be
reported. (See SPINDLE PROBE BALL RADIUS (VECTOR MEASURING) CALIBRATION).

D
A A
A B B
Z0
B Z0 Z
C C C
Z
R
D -R
D
BORE 1 BOSS BORE 2

G65 P9823 A B C D [Z F Q R S T W]
A - Angle of first touch off point taken from the X+ axis.
B - Angle of second touch off point taken from the X+ axis.
C - Angle of third touch off point taken from the X+ axis.
D - Diameter of bore or boss.
F - Modal feed rate for the interpolated move. Once set it is not necessary to place in each protected
positioning block.
Q - Maximum search distance beyond feature surface before alarming.
R - Added to D when determining decent position of probe. When R is +, the feature is a BOSS. When R
is -, the feature is as BOSS 2.
S - Work offset to adjust to surface S1=G54 .. S6=G59. The work offset is adjusted by the error from the
programmed value.
T - Tool offset to update when probe trigger occurs
W - Print results to the currently selected output file.
W1 - Increment the feature number.
W2 - Increment component number, set feature number to 1.
Z - Absolute Z location to touch off. If not present BORE 1 is assumed
Program Example:
N9823 (3-POINT BORE MEASURE)
M19 (ORIENT SPINDLE)
G90 G80 G40 G0
G54 X-6.75 Y-1.25 (X-Y APPROACH)
G43 H1 Z.75 (Z APPROACH)
G65 P9810 Z-.2 F50. (PROTECTED Z APPROACH)
G65 P9823 A0 B120.0 C240.0 D2.0 W1 (REPORT BORE DIAMETER)

104 Touch Probing for PMAC-NC


PMAC NC for Mill Application

G65 P9810 Z.25 (PROTECTED DEPART)


Miscellaneous Macros
These cycles are various probing cycles that are useful yet don't fit into the above categories because they
are unusual in some respect. Either they are more complicated or they consist of a combination of the
above cycles to achieve some measurement. More probing functionality will be added to the Delta Tau
control as the product matures.
Bolt Pattern Bore/Boss Measurement

K
A

Z
B=5 -R R
D
C
Z

G65 P9819 C D Z [A B Q R W] BOSS


G65 P9819 C D K [A B Q R W] BORE
A - Angle at which first hole lies from X+ direction.
B - Total number of holes, default = 1.
C - Pitch diameter, diameter that holes lie on.
D - Bolt hole/boss diameter.
K - Absolute K location to touch off for a bore.
Q - Maximum search distance beyond feature surface before alarming.
R - Added to D when determining decent position of probe. When R is +, the feature is a BOSS. When -,
the feature is a BORE.
W - Print results to the currently selected output file.
W1 - Increment the feature number.
W2 - Increment component number, set feature number to 1.
Z - Absolute Z location to touch off for a boss.
Program Example:
N9814 (BOLT-HOLE MEASURE)
M19 (ORIENT SPINDLE)
G90 G80 G40 G0
G54 X-4.0 Y-2.0 (X-Y APPROACH)
G43 H1 Z.75 (Z APPROACH)
G65 P9810 Z.75 F30. (PROTECTED Z APPROACH)
G65 P9819 C2.0 D1.0 K-.4 A18.0 B5. W1 (MEASURE 5 BORES AT

Touch Probing for PMAC-NC 105


PMAC NC for Mill Application

18 DEG)
G65 P9810 Z.75 F30. (Z DEPART)
Calculate Feature to Feature Distance
This cycle measures the distance between two independently measured features. No motion takes place
when this cycle is invoked. P1 is designated as the first feature and P2 is the second. Distance is measure
as P2 relative to P1. After P1 is measured with an appropriate cycle, the programmer invokes this cycle
without any arguments. This stores the dimensional data recorded for P1. After the second feature is
measured, using an appropriate cycle, this cycle is invoked again. The second invocation must have
arguments which indicate what is to be calculated by the cycle. Angular tolerances as well as absolute
distances can be measured and report on. Web/Trough measurement (9812) cannot be used with this
cycle.
XY PLANE

D
Y
A

G65 P9834
G65 P9834 X [S T W]
G65 P9834 Y [S T W]
G65 P9834 X Y [B S T W]
G65 P9834 A D [B S T W]
A - Angle between features as taken from the X + axis. (+/- 180.0 degrees).
B - The angular tolerance of A.
D - The Minimum distance from P1 to P2.
S - Work offset to adjust to surface S1=G54 .. S6=G59. The work offset is adjusted by the error from the
programmed value.
T - Tool offset to update when probe trigger occurs. T can be used only when P2 is measured using 9811
or 9821.
W - Print results to the currently selected output file.
W1 - Increment the feature number.
W2 - Increment component number, set feature number to 1.
X - The nominal incremental distance along X.
Y - The nominal incremental distance along Y.

106 Touch Probing for PMAC-NC


PMAC NC for Mill Application

Program Example:
N9834 (FEATURE TO FEATURE MEASURE)
G65 P9810 X-.5 Y2.0 F30. (X-Y APPROACH WALL)
G65 P9810 Z1.0 F30. (PROTECTED Z APPROACH)
G65 P9811 X0 ( MEASURE X WALL P1)
G65 P9834 (RECORD P1)
G65 P9810 X-4.0 (X-Y APPROACH BOSS)
G65 P9814 D.5 Z.5 (MEASURE BOSS P2)
G65 P9834 X-4.0 H.02 W2 (MEASURE AND REPORT TOLERANCE)
Z PLANE

A
P2
Z P2 Z
P1
D P1

G65 P9834 Z [S T W]
G65 P9834 A Z [B W]
G65 P9834 D Z [B W]
A - Angle between features as taken from the X + axis. (+/- 180.0 degrees).
B - The angular tolerance of A.
D - The Minimum distance from P1 to P2 (+/-). Note that D is independent of X and Y.
S - Work offset to adjust to surface S1=G54 .. S6=G59. The work offset is adjusted by the error from the
programmed value.
T - Tool offset to update when probe trigger occurs. T can be used only when P2 is measured using 9811
or 9821.
W - Print results to the currently selected output file.
W1 - Increment the feature number.
W2 - Increment component number, set feature number to 1.

Touch Probing for PMAC-NC 107


PMAC NC for Mill Application

Z - The nominal incremental distance expected in the Z axis.

Program Example:
N9834 (FEATURE TO FEATURE MEASURE)
G65 P9810 X1.5 Y0 F30. (X-Y APPROACH P1)
G65 P9810 Z1.0 F30. (PROTECTED Z APPROACH)
G65 P9811 Z.5 (MEASURE Z AT P1)
G65 P9834 (RECORD P1)
G65 P9810 X3.1 (X-Y APPROACH P2)
G65 P9811 Z.25 (MEASURE Z AT P2)
G65 P9834 D1.6 Z.25 B.5 W2 (MEASURE AND REPORT TOLERANCE)
X-Y Plane Surface Angle Measurement
This canned cycle measures two points along the X axis or along the Y axis to determine the angular
direction of a plane. The points are measured in the same Z plane equidistant on opposite sides of the
start point.

D
A
A
D

G65 P9843 X | Y D [A B Q W]
A - Angle of surface relative to the X + direction. Select A +/-90 from the direction that measuring takes
place.
X direction, default for A is 90 degrees.
Y direction, default for A is 0 degrees.
B - The angular tolerance of A.

108 Touch Probing for PMAC-NC


PMAC NC for Mill Application

D - The Distance between the two measuring points along the X direction if using Y, the Y direction if
using X.
Q - Maximum search distance beyond feature surface before alarming.
W - Print results to the currently selected output file.
W1 - Increment the feature number.
W2 - Increment component number, set feature number to 1.
X - X dimension that plane surface is expected to be. When X is selected, measurements are along the X
axis.
Y - Y dimension that plane surface is expected to be. When Y is selected, measurements are along the Y
axis.

D.8

A60.

X2.0

Program Example:
N9843 (ANGLE MEASUREMENT OF Z PLANE)
G65 P9810 X0 Y2.0 F30. (X-Y APPROACH MIDPOINT)
G65 P9810 Z1.0 F30. (PROTECTED Z APPROACH)
G65 P9843 X2.0 D.8 A60. W2 (MEASURE ANGLE)
G65 P9810 Z5.0 (Z DEPART)

Alarms
The following alarms have been added for probing cycles. The alarms are listed in alphabetical order
according to the text seen on the alarms display. Following the text is the probable cause for the alarm
along with corrective action.
Broken Tool
In tool detection probing cycles, this indicates that the probe signal was not detected within the tolerance
specified. Replace the tool or open the tolerance.
A Input Missing
An A address code is required on a G65 block.
B Input Missing
A B address code is required on a G65 block.
C Input Missing
A C address code is required on a G65 block.
D Input Missing
A D address code is required on a G65 block.

Touch Probing for PMAC-NC 109


PMAC NC for Mill Application

Data #130-#139 Missing


Indicates that the first features in a feature to feature distance calculation was not recorded. P1 must be
recorded prior to P2 with G65 P9834.
Format Error
Indicates that the combination of arguments used is not allowed. Refer to the operators manual for the
proper format.
G65 Address Code Missing
Indicates that a G65 line was program without a P code in the block.
G65 Nesting Level Exceeded
Indicates that too many nested G65 calls were made. Nesting cannot exceed 5 levels.
H Input Not Allowed
H is not allowed in the G65 probing cycle. Refer to the operators manual.
M Input Not Allowed
M is not allowed in the G65 probing cycle. Refer to the operators manual.
No Feed Rate
Indicates that probing variable 117 has no value. No feed rate has been specified on any previous probing
cycle.
No Tool Length Active
Group 8 is in G49 state meaning that no tool length is in effect. Specify a G43 or G44 prior to G65 call.
Path Obstructed
The probe was deflected during a protected positioning move. Change the programmed path, or check the
hardware a spurious signal was detected.
Probe Fail
The SKIP signal indicates that the probe never deflected and it should have. The surface being probed
was not encountered or the probe is not working. See the integration manual for testing of the probe.
Make sure that the probing PLC is running.
Probe Open
The SKIP signal indicates that the probe is deflected and it should not be. Make sure that the probe is
activated with the proper M code. Make sure that the hardware is functioning correctly. Make sure that
your probe plc is running. See the software integration manual for testing of the probe.
Runtime Error
May indicate that the G65 line contains a P address code in which the subroutine indicated by the P code
does not exist as a motion program.
S Input Not Allowed
S is not allowed in the G65 probing cycle. Refer to the operators manual.
SH Input Mixed
S and H cannot be on the same G65 block. Refer to the operators manual.
ST Input Mixed
S and T can not be on the same G65 block. Refer to the operators manual.
T Input Missing
A T address code is required on a G65 block.

110 Touch Probing for PMAC-NC


PMAC NC for Mill Application

T Input Not Allowed


T is not allowed in the G65 probing cycle. Refer to the operators manual.
TM Input Mixed
T and M cannot be on the same G65 block. Refer to the operators manual.
Tool Out of Range
The tool diameter is larger than the diameter specified in variable 121. Use a smaller cutter or increase
the value of variable 121.
X Input Missing
An X address code is required on a G65 block.
XY Input Missing
An X or Y address code is required on a G65 block.
XY Input Mixed
X and Y can not be on the same G65 block. Refer to the operators manual.
XYZ Input Missing
A X, Y or Z address code is required on a G65 block.
XYZ Input Mixed
X, Y, and Z can not be on the same G65 block. Refer to the operators manual.
Y Input Missing
A Y address code is required on a G65 block.
Z Input Missing
A Z address code is required on a G65 block.
ZK Input Mixed
Z and K cannot be on the same G65 block. Refer to the operators manual.

Touch Probing for PMAC-NC 111

You might also like