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
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
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 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
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:
G Code Library
CNC G-Codes
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
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
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
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
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)
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.
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
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
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
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
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
Programmed path
Programmed path
Circular movement
CC2 Tool center path
L Programmed path
L
L
L
L L
L L L L
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
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.
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
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.
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
PROGRAMMING EXAMPLE:
G98G81X-3.Y-2.75Z-0.05R0.1F25.0L2
X-2.75
X-2.5L2
X-2.25
G80
PROGRAMMING EXAMPLES:
G99G8.2X-3Y-2.75Z-0.05R0.1F25.0L2P2
X-2.75
X-2.5L2
X-2.25
G80
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
G-Code Function
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 ;
%
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 ;
%
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.
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
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
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
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
68 Parametric Programming
PMAC NC for Mill Application
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
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
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
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
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.
80 Parametric Programming
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.
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)
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)
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.
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.
ARBOR
K Z
STYLUS
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.
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
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
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.
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.
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.
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)
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)
-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)
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)
K
A
Z
B=5 -R R
D
C
Z
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.
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.
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.
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.