NC Mill SFTWR Manual
NC Mill SFTWR Manual
NC Mill SFTWR Manual
^3 Integrator/Software Manual
^4 3xx-603450-xSxx
Table of Contents
INTRODUCTION .......................................................................................................................................................... 1
Hardware/Software Components.................................................................................................................................. 1
Hardware Components ............................................................................................................................................ 1
Software Components:............................................................................................................................................. 1
NC 32 BIT FOR MILL APPLICATION...................................................................................................................... 3
NC Mill Basics ............................................................................................................................................................. 3
Tool Motion ............................................................................................................................................................. 3
Tool Movement Specification................................................................................................................................... 3
Axis Move Specification........................................................................................................................................... 3
Feed Specification ................................................................................................................................................... 4
Cutting Speed Specification ..................................................................................................................................... 4
Tool Movement Considerations ............................................................................................................................... 4
Coordinate Systems ................................................................................................................................................. 5
Machine Coordinates............................................................................................................................................... 5
Program Coordinates .............................................................................................................................................. 5
Absolute Coordinate Positions ................................................................................................................................ 5
Incremental Coordinate Values ............................................................................................................................... 5
Reference Point........................................................................................................................................................ 6
G Code Library............................................................................................................................................................. 6
CNC G-Codes .......................................................................................................................................................... 6
G Codes........................................................................................................................................................................ 8
G00 Rapid Traverse Positioning ............................................................................................................................. 8
G01 Linear Interpolation......................................................................................................................................... 8
G01.1 Spline Interpolation ...................................................................................................................................... 8
G02 Circular Interpolation CW (Helical CW) ........................................................................................................ 9
G03 Circular Interpolation CCW (Helical Interpolation CCW) ........................................................................... 10
G04 Dwell.............................................................................................................................................................. 11
G09 Exact Stop ...................................................................................................................................................... 11
G10 Programmable Data Input............................................................................................................................. 11
G10.1 PMAC Data Input by Program ................................................................................................................... 11
G17/G18/G19 (XY/ZX/YZ) Plane Selection ........................................................................................................... 12
G25 Spindle Detect Off .......................................................................................................................................... 12
G26 Spindle Detect On .......................................................................................................................................... 12
G27 Reference Point Return Check ....................................................................................................................... 12
G28 Return to Reference Point .............................................................................................................................. 13
G29 Return from Reference Point.......................................................................................................................... 13
G30 Return to Reference Point 2nd - 3rd ............................................................................................................... 13
G31 Move Until Trigger ........................................................................................................................................ 13
G40/G41/G42 Cutter Compensation ..................................................................................................................... 13
Compensation Requirements ................................................................................................................................. 14
How PMAC Introduces Compensation.................................................................................................................. 15
Speed of Compensated Moves................................................................................................................................ 15
Treatment of Inside Corners .................................................................................................................................. 15
Treatment of Outside Corners ............................................................................................................................... 15
G43/G44/G49 Tool Length Compensation + /- and Cancel.................................................................................. 25
G45/G46/G47/G48 Single Block Tool Offsets ....................................................................................................... 26
G50/G51 Coordinate Scaling ................................................................................................................................ 26
G50.1/G51.1 Coordinate Mirroring ...................................................................................................................... 26
G52 Local Coordinate System Set ......................................................................................................................... 27
G53 Machine Coordinate Selection....................................................................................................................... 27
G54-59 Work Coordinate System 1-6 Selection .................................................................................................... 28
G61 Exact Stop Mode ............................................................................................................................................ 28
G64 Cutting Mode ................................................................................................................................................. 28
Table of Contents i
PMAC NC for Mill Application
ii Table of Contents
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 Adv 810 Control Panel, it is equally applicable to
the Adv 800 and Adv 600, with regard to software and operation.
The manual assumes that the Control Panel package is wired to the machine already 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
• Adv 810 Control Panel
• UMAC
Software Components:
• NC UI32
• CNC Auto Pilot
• Executive software to talk
• Turbo Setup program
• PMAC Plot program
Introduction 1
PMAC NC for Mill Application
2 Introduction
PMAC NC for Mill Application
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.
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 aware only 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.
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 either 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.
G Code Library
CNC G-Codes
PMAC NC 32 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
G52 Local Coordinate System Setting
G53 Machine Coordinate System Setting
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. 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
err n =
[Seg n + 1 − Seg n ]
6
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:
Ft = f x2 + f y2 .
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 affected. 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
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)
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.
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_
Programmed path
r: Offset amount
r r
r
CC2 CC2
S L Tool center path
S
C
L L
Tool center path Programmed path
Programmed path
L L
r r
r
r
S = Intersection
L = Linear
C = Circular
Offset Start-up (Sheet 1 of 2)
CC2 CC2
r
r
a a
Programmed path
C r C r
r
Programmed path
CC1
r
less than 1 deg.
S = Intersection
L = Linear
C = Circular
Offset Start-up (Sheet 2 of 2)
Programmed path
r
r
r r
CC2 CC2
S L Tool center path S
C
L L
r
CC2 CC2
S L Tool center path S
C
C
C
Programmed path
r
CC1
C
Programmed path
r
S
Offset Mode (Sheet 1 of 3)
CC2
CC2
a
a L
L
Programmed path
r
r
r r
CC2 CC2
a a
C C
Programmed path
r r
r
r
C C
L Tool center path
Programmed path
C
L L
CC2 CC2
S S
r r
a a
Programmed path
C r C r
C C
CC2
CC2
C C
r r
a L a
Programmed path
C
C r C r
i) Linear Linear
S L
r
Programmed pathCC2 CC1 CC1
r L Offset vector
Tool center path
L S
CC1
Programmed path
CC2
Programmed path
r = CCR r r
S = Intersection
L = Linear
C = Circular C C
P = Parabloic
Change of Offset Direction
r CC2
r
r
CC0 r CC0
Tool center path L S S
C
L L
Programmed path Tool center path
S = Intersection
L = Linear
C = Circular
CC0 CC0
a a
Programmed path
r C r C
r
CC2
Programmed path
(CC0) less than 1 deg.
S = Intersection
L = Linear
C = Circular
Offset Cancel (sheet 2 of 2)
Programmed path
Programmed path
Circular movement
CC2 Tool center path
L Programmed path
L
L
L
L
L L L L L
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
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.
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.
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 (i.e. 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
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 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.
Programming Examples:
G99G8.2X-3Y-2.75Z-0.05R0.1F25.0L2P2
X-2.75
X-2.5L2
X-2.25
G80
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
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
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.
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
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
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
Note:
If a P code or comment on an M98 line is missing and there is an O code at the top
of the 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 code, then Comment, and finally O code. So if there is 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, nest no more
than ten 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 ;
%
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.
X.4 ;
X,2 ;
G90 G80
M99 L5 ;
%
T-Codes
T-Code Format
Tnn Where nn specifies tool number from the Tools page in the 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.
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
section 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 displayed in this section:
• Clearing global variables
• Drilling custom bolt-hole patterns
• Simple pocket milling
Clearing Global Variables
Purpose:
This is an example of how to 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 an invalid variable is passed, the control will automatically alarm. In a subroutine like the one below,
the range of variables may be limited 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);
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);
Parametric Programming 49
PMAC NC for Mill Application
50 Parametric Programming
PMAC NC for Mill Application
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
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
Parametric Programming 51
PMAC NC for Mill Application
52 Parametric Programming
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
the programs. A literal value is a constant that cannot be changed.
Example:
G1 X1.2 Y3.5 (examples of literal constants)
#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. only values defined in this manual can be used).
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.
Example:
#1
#[1]
#[[1+2+3]/6]
#2=1
#[#2]
#[SIN[90.0]]
Parametric Programming 53
PMAC NC for Mill Application
Variables can be used in conditional expressions, assignment expressions, GOTO expressions and address
code expressions.
Example:
IF [#1 EQ 3.0] GOTO#5;
#3=#3+2;
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.
Example: #1=#0; (#1 is undefined);
#3=#1 (#3 is undefined);
#4=#1+#3 (#4 is 0.0);
#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 did not see that address code.
Example: #1=#0;
#2=3.5;
G1 X#1 Y#2 (same as G1 Y3.5);
X[#1+#0] (same as X0.0);
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
[#1 EQ 0] False True
[#1 GE #0] True True
[#1 GT 0] False False
[#1 LT 0] False False
If using a variable as for example, a counter and comparing for 0.0, use 0.0. If comparing to see if a
variable has been assigned to, use #0. It is important to distinguish between the two.
54 Parametric Programming
PMAC NC for Mill Application
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 un-nest local variables and the values are lost. M99 in a M98 subroutine do
not un-nest 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.
Example: #31=#1 * 2 (assign to variable #31 the argument A times 2);
G1 G91 X#24 (Feed X the incremental amount of argument X);
Note that subsequent assignments will destroy the value of the passed argument.
Parametric Programming 55
PMAC NC for Mill Application
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
System Variables
#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.
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
56 Parametric Programming
PMAC NC for Mill Application
Parametric Programming 57
PMAC NC for Mill Application
58 Parametric Programming
PMAC NC for Mill Application
Use these variables 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 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
Use these variables 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, to know what the last commanded S code was, inspect #4119.
IF [#4119 GT 1500] GOTO ??? (excess spindle RPM)
#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 59
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 operator’s precedence.
Operators with higher precedence are executed first. So that in the 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 Exponential 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
FANUC differs from the above table in that FANUC defines the conditional operators to have the same
precedence as binary addition. If concerned about portability of the programs. Include precedence
brackets around the operands of a conditional expression. For example:
[ 0.0 LT [#1+#2] ]
60 Parametric Programming
PMAC NC for Mill Application
Parametric Programming 61
PMAC NC for Mill Application
62 Parametric Programming
PMAC NC for Mill Application
Parametric Programming 63
PMAC NC for Mill Application
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
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 this. Writing to system variable #3006 can generate a program stop. 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. 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
64 Parametric Programming
PMAC NC for Mill Application
Given:
#9 = 30.0
#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. 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.
To see the variables for the current nesting level, make sure that the page being viewed 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.
Parametric Programming 65
PMAC NC for Mill Application
Note:
The display can be modified 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. The
machine tool OEM or integrator should process the setup.
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:
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.)
66 Parametric Programming
PMAC NC for Mill Application
Parametric Programming 67
PMAC NC for Mill Application
68 Parametric Programming
PMAC NC for Mill Application
Optical Interface
Two relays must be available. One relay for the Start Spindle Probe signal sent to the optical interface
and another relay for selecting the table probe. Use discrete input 13 for the Start Spindle Probe signal
and discrete input 14 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.
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)
Miscellaneous
OI(17) – Black - OI(22)
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.
Installation of Software
Execute the following procedure to ensure that all of the software required to run probing is installed.
Install the probing in a working CNC system. The following is a list of software required for probing. If
probe ready software is available then all of the files should be configured to install and work as is.
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 [ ].
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) and 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.
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, Arbor 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 placed 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.
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 through 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.
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.
G65 P9812 X | Y [Z F Q R 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 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.
XY 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.
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.
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.
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
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 second touch off point.
J Incremental distance along Y-axis to move for second 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.
XY Expected work coordinate location of internal corner.
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
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 second touch off point.
J Incremental distance along Y axis to move for second 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.
XY Expected work coordinate location of external corner.
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)
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.
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 four inches overtravel)
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 diameter)
M52 (select table probe)
M19 (orient spindle)
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, twelve 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 spindle must be oriented and the probe calibrated 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 known angle, the true angle and deviation can be determined. See
Spindle Probe Ball Radius (Vector Measuring) Calibration section.
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)
G65 P9810 Z.75 F50. (protected depart)
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)
G65 P9810 Z.75 F50. (protected depart)
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)
G65 P9810 Z.25 (protected depart)
Miscellaneous Macros
These cycles are various probing cycles that are useful yet do not 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.
XY Plane
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.
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
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.
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)
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.
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.
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 the 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.
Data #130-#139 Missing
Indicates that the first feature 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 operator’s 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 five levels.
H Input Not Allowed
H is not allowed in the G65 probing cycle. Refer to the operator’s manual.
M Input Not Allowed
M is not allowed in the G65 probing cycle. Refer to the operator’s 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
the 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 operator’s manual.
SH Input Mixed
S and H cannot be on the same G65 block. Refer to the operator’s manual.
ST Input Mixed
S and T can not be on the same G65 block. Refer to the operator’s manual.
T Input Missing
A T address code is required on a G65 block.
T Input Not Allowed
T is not allowed in the G65 probing cycle. Refer to the operator’s manual.
TM Input Mixed
T and M cannot be on the same G65 block. Refer to the operator’s 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 cannot be on the same G65 block. Refer to the operator’s manual.
XYZ Input Missing
A X, Y or Z address code is required on a G65 block.
XYZ Input Mixed
X, Y, and Z cannot be on the same G65 block. Refer to the operator’s 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.