Sei sulla pagina 1di 352

Part Programming Manual

MACHINEMATE
MACHINEMATE

NOTE
Progress is an ongoing commitment at MACHINEMATE INC. We continually strive to offer the
most advanced products in the industry. Therefore, information in this document is subject to
change without notice. The illustrations and specifications in this document are not binding in
detail. MACHINEMATE INC shall not be liable for any technical or editorial omissions occurring
in this document nor for any consequential or incidental damages resulting from the use of
this document.

DO NOT ATTEMPT to use any MACHINEMATE INC product until the use of such product is completely
understood. It is the responsibility of the user to make certain proper operation practices are
understood. MACHINEMATE INC products should be used only by qualified personnel and for the
express purpose for which said products were designed.

Should information not covered in this document be required, please contact:

MACHINEMATE INC.
Fond du Lac, WI 54937

Phone: 920-907-0001
Fax: 920-907-0181

Email: info@machinemate.com

Document revision: 0712

Part Programming Manual


page 2/352
MACHINEMATE

Table of Contents
TABLE OF FIGURES AND TABLES ............................................................................10
1 BASICS OF NC PROGRAMMING............................................................................15
1.1 Program Layout ................................................................................................15
1.2 Program block...................................................................................................15
1.3 Program Word...................................................................................................16
1.4 Auxiliary functions (BCDs) ................................................................................23
1.5 Programming functional overview .....................................................................24
1.6 Block suppression .............................................................................................25
1.7 Program Repetition ...........................................................................................25
1.8 Subroutines.......................................................................................................26
1.9 Comments in NC programs...............................................................................27
1.10 Program number ...............................................................................................28
1.11 Cycle block layout .............................................................................................28
1.12 Reading from External Data Files .....................................................................28
1.13 Program Safety .................................................................................................31
1.14 Axis designations for machine tool machines ...................................................32
1.15 Gantry Axes ......................................................................................................35
1.16 Resettable Rotational Axis ................................................................................36
2 POSITIONING INSTRUCTIONS ...............................................................................37
2.1 General positioning instructions ........................................................................37
2.1.1 Monitoring the axis travel limits ..............................................................37
2.1.2 G00 linear interpolation in rapid traverse................................................38
2.1.3 G01 linear interpolation in the feed rate .................................................42
2.1.4 G02, G03 circular interpolation with specified center point.....................45
2.1.5 G12, G13 circular interpolation with specified radius..............................49
2.1.6 Helical Interpolation................................................................................51
2.1.7 G74 Programmable homing ...................................................................51
2.1.8 M80 delete remaining path using probe function....................................52
2.2 Positioning instructions .....................................................................................57
2.2.1 G07 Tangential circular interpolation......................................................57
2.2.2 G05, G06 Spline Definition and Spline Interpolation 2D.........................60
2.2.3 G78, G79 Tangential Setting to the 2D Path ..........................................64
3 INFLUENCING THE PROGRAM ..............................................................................73
3.1 M00 program interruption (unconditional stop)..................................................73
3.2 M01 program interruption (conditional stop)......................................................73
3.3 M02, M30 end of program.................................................................................74
3.4 G10, G11 empty/fill dynamic block buffer..........................................................75
3.4.1 G10 Empty dynamic block buffer............................................................75
3.4.2 G11 Fill dynamic block buffer .................................................................75
3.5 G72, G73 interpolation with precision stop OFF or ON .....................................76
3.6 G08, G09 look ahead OFF or ON .....................................................................77
3.7 G186 corner acceleration, contour accuracy.....................................................80
3.7.1 Corner Acceleration................................................................................80
3.7.2 Contour Accuracy:..................................................................................83
3.8 G75, G76 Curvature..........................................................................................84
Part Programming Manual
page 3/352
MACHINEMATE

3.8.1 Curvature Activation .............................................................................. 84


3.8.2 Curvature Acceleration Limit.................................................................. 85
3.9 G04 dwell time.................................................................................................. 85
3.10 Corner Smoothing ............................................................................................ 86
3.10.1 G-codes ................................................................................................. 86
3.10.2 Curvature radius R................................................................................. 86
3.10.3 Corner deviation E ................................................................................. 86
3.10.4 Minimum block length ............................................................................ 87
3.10.5 Acceleration monitoring ......................................................................... 88
3.10.6 Minimum and maximum bend angle ...................................................... 89
3.10.7 The necessity of corner smoothing ........................................................ 89
3.10.8 Programming ......................................................................................... 90
3.10.9 Problem case: angle too acute .............................................................. 94
3.10.10 Problem case: collision monitor with real-time mill radius
correction.......................................................................................................... 94
4 TECHNOLOGICAL INSTRUCTIONS....................................................................... 95
4.1 Influencing the feedrate .................................................................................... 95
4.1.1 G94 Inches (Millimeters) per minute IPM/MMPM ............................... 95
4.1.2 G95 Inches (Millimeters) per revolution IPR/MMPR ........................... 95
4.1.3 F word for feed rate ............................................................................... 96
4.1.4 G63, G66 Feed override ........................................................................ 96
4.1.5 Programmable acceleration................................................................... 98
4.2 Spindle Control................................................................................................. 99
4.2.1 S Word................................................................................................... 99
4.2.2 M03, M04 Spindle ON, Clockwise or Counter-Clockwise ...................... 99
4.2.3 M05 Spindle OFF................................................................................. 100
4.2.4 M19 Spindle Orientation ...................................................................... 100
4.2.5 G63, G66 Spindle Override ................................................................. 100
4.2.6 G92 Spindle speed limitation ............................................................... 101
4.2.7 G96 Constant Surface Speed (Feet/Meter) ......................................... 102
4.2.8 G97 Revolutions per minute ................................................................ 102
4.2.9 Reversal of rotation at M19, spindle orientation................................... 103
4.3 Tool compensation functions.......................................................................... 104
4.3.1 Tool radius compensation.................................................................... 104
4.3.2 Tool length compensation values ........................................................ 106
4.3.3 Tool or turret selection ......................................................................... 108
4.4 Advanced Regulation Technology (ART) ....................................................... 112
4.4.1 Application ........................................................................................... 112
5 GEOMETRIC INSTRUCTIONS .............................................................................. 113
5.1 General geometric instructions....................................................................... 113
5.1.1 G40-G44 Path compensations ............................................................ 114
5.1.2 G53-G59 Part position offsets ............................................................. 145
5.1.3 G70, G71 Programming in metric or inch format ................................. 149
5.1.4 G90, G91 Absolute/incremental dimension programming ................... 150
5.1.5 G92 Set axis value............................................................................... 152
5.1.6 G14-G16 Polar coordinate programming............................................. 154
5.2 Specific geometric instructions ....................................................................... 159
Part Programming Manual
page 4/352
MACHINEMATE

5.2.1 G17-G20 Plane selection .....................................................................160


5.2.2 G24-G27 Programmable work field limitation (Safe Zone
Programming) .................................................................................................162
5.2.3 G38, G39 Programmable axis motion mirror ........................................165
5.2.4 G51, G52 Part rotation .........................................................................170
5.2.5 G50 Scaling..........................................................................................173
5.3 Dresser, wheel or tool tip radius compensation (DWRC) ................................175
5.3.1 Entering compensation values in tables ...............................................175
5.3.2 Dresser Wheel Radius Compensation .................................................178
5.3.3 DWRC application schemes.................................................................180
5.3.4 NC block formats..................................................................................183
5.3.5 Compensation Entry/Exit Move Types .................................................184
5.3.6 Special Cases ......................................................................................191
6 GENERAL CYCLE PROGRAMMING .....................................................................193
6.1 Introduction .....................................................................................................193
6.2 Application of Cycle Blocks .............................................................................193
6.2.1 Cycle programming ..............................................................................193
6.2.2 Integrating Cycle Blocks in an NC Program .........................................194
6.2.3 Comments ............................................................................................194
6.2.4 Cycle block syntax................................................................................195
6.2.5 Basic rules for processing of instructions .............................................196
6.2.6 Numbers and variables ........................................................................197
6.2.7 Calculation operations and functions....................................................198
6.2.8 Use of P-parameters ............................................................................202
6.2.9 Use of CNC parameters .......................................................................206
6.2.10 Conditional instructions and jump instructions .....................................211
6.2.11 Possible errors .....................................................................................213
6.2.12 Instructions ...........................................................................................215
6.3 Work Cycles....................................................................................................218
6.3.1 General notes.......................................................................................218
6.3.2 Example ...............................................................................................218
7 DRILLING CYCLES ................................................................................................219
7.1 Introduction .....................................................................................................219
7.2 Use of the drilling cycles .................................................................................220
7.2.1 Allocation of the parameters/definition of terms....................................220
7.2.2 Selection of the desired drilling cycle ...................................................222
7.2.3 Move to the drilling position in X and Y (once or repeatedly) ...............222
7.2.4 Deselecting of the drilling cycle ............................................................224
7.3 G80 Cancel the drilling cycle...........................................................................225
7.4 G81 Drilling to final depth................................................................................225
7.5 G82 Spot facing with dwell time ......................................................................227
7.6 G83 Deep hole drilling.....................................................................................229
7.7 G84 Thread cutting with balanced chuck ........................................................231
7.8 G85 Reaming..................................................................................................233
7.9 G86 Bore out...................................................................................................235
7.10 G87 Reaming with measuring stop .................................................................237
7.11 G88 Bore out with spindle halt ........................................................................239
Part Programming Manual
page 5/352
MACHINEMATE

7.12 G89 Bore out with intermediate halt ............................................................... 241


7.13 Example: base plate ....................................................................................... 243
8 PROGRAM OPTIMIZATION................................................................................... 246
8.1 Hints for rational program creation ................................................................. 246
8.1.1 Subroutines ......................................................................................... 246
8.1.2 Modally effective instructions............................................................... 246
8.1.3 Value allocation to NC addresses using parameters ........................... 246
8.2 Hints for Processing Programs....................................................................... 247
8.2.1 Look Ahead ......................................................................................... 247
8.2.2 Programmable acceleration at Look Ahead......................................... 247
8.2.3 Activation of special functions using a subroutine ............................... 247
8.3 Hints for Avoiding Errors................................................................................. 248
8.3.1 Protection of subroutines against call up as main program ................. 248
8.3.2 Functions not automatically reset at the program end ......................... 248
8.3.3 Circular interpolation............................................................................ 248
8.3.4 Avoid dummy blocks at subroutine call up........................................... 248
8.3.5 Avoid dummy blocks at subroutine end ............................................... 249
8.3.6 Avoid dummy blocks at path compensation......................................... 249
8.3.7 Collision free movement ...................................................................... 250
8.3.8 Contour accuracy (G186) .................................................................... 250
9 PROGRAMMING VARIOUS CNC FEATURES/CAPABILITIES............................ 251
9.1 Angled Wheel Transformation ........................................................................ 251
9.1.1 Angled wheel transformation syntax .................................................... 251
9.1.2 Axes sequence by two step mode ....................................................... 255
9.1.3 Mirroring .............................................................................................. 256
9.1.4 H and G compensation ........................................................................ 256
9.2 Automatic Spindle Gear Step (Range) Selection............................................ 256
9.2.1 General................................................................................................ 256
9.2.2 M40 is Active ....................................................................................... 257
9.2.3 M41 to M46 is Active ........................................................................... 257
9.2.4 Switchover procedure between gear ranges ....................................... 257
9.2.5 G96 is Active ....................................................................................... 258
9.2.6 G92 is Active ....................................................................................... 258
9.2.7 G33/G34 is Active................................................................................ 258
9.3 Barrel Cam Transformation ............................................................................ 259
9.3.1 General................................................................................................ 259
9.3.2 Barrel cam transformation using Cartesian coordinates G102 ............ 259
9.3.3 Barrel cam transformation with cylinder coordinates G106.................. 261
9.3.4 Illegal G-codes during Barrel Cam....................................................... 262
9.3.5 Real time radius compensation G103, G107 ....................................... 262
9.3.6 Barrel cam transformation with centerline deviation of an
additional axis and real time radius compensation, G104, G108.................... 264
9.3.7 Switching between machine coordinates with barrel cam
transformation. ............................................................................................... 266
9.3.8 End of program and change of the operating mode............................. 266
9.4 Diameter Programming .................................................................................. 267
9.4.1 Programming ....................................................................................... 267
Part Programming Manual
page 6/352
MACHINEMATE

9.4.2 Control reset, end of program...............................................................270


9.4.3 Display functions ..................................................................................270
9.4.4 Programming conditions.......................................................................271
9.4.5 Programming Examples .......................................................................272
9.5 Distance Regulation ........................................................................................273
9.5.1 G265 Axis selection..............................................................................273
9.5.2 M140 / M141 activation/deactivation of distance regulation .................273
9.5.3 Monitoring the axis limits ......................................................................274
9.5.4 G74 is invalid........................................................................................274
9.6 Fast output signals ..........................................................................................275
9.6.1 Output turned on or off by CNC with M-code .......................................275
9.6.2 Position-defined fast M-functions .........................................................276
9.7 Feed Influencing via Probe Signals.................................................................278
9.7.1 General ................................................................................................278
9.7.2 Programming........................................................................................279
9.7.3 Programming measurement probe logic ..............................................280
9.7.4 Masking out input bits via the PLC .......................................................280
9.7.5 G92 and setting the remaining distance to zero ...................................280
9.7.6 Measurement probe logic via the interface signal ................................280
9.7.7 Dwell time.............................................................................................281
9.7.8 Programming with Stop on block pre-processing .................................281
9.8 Feed Interpolation ...........................................................................................282
9.8.1 Function and handling ..........................................................................282
9.9 Handwheels in Automatic mode......................................................................284
9.9.1 General ................................................................................................284
9.9.2 Programming........................................................................................284
9.9.3 End of program and control reset .........................................................285
9.9.4 Cycle-Stop, Cycle-Off...........................................................................285
9.10 Infinitely Rotating Round (or Rotary) Axis .......................................................286
9.10.1 General ................................................................................................286
9.10.2 Programming........................................................................................286
9.10.3 Normal round axis ................................................................................287
9.10.4 Tool magazine round axis ....................................................................289
9.10.5 Modulo round axis ................................................................................290
9.11 Multiple Spindles .............................................................................................293
9.11.1 General ................................................................................................293
9.11.2 Spindle programming ...........................................................................293
9.11.3 Thread cutting, G33 and G34 ...............................................................293
9.11.4 Spindle speed override rotary switch, G63...........................................294
9.11.5 Spindle speed restriction, G92 .............................................................294
9.11.6 Feed rate in mm / rev, or in / rev, G95..................................................295
9.11.7 G93, G96 and G97 ...............................................................................295
9.11.8 Spindle orientation, M19.......................................................................298
9.11.9 Spindle / rotational axis switchover ......................................................298
9.11.10 Gear ranges or gear stages ............................................................298
9.12 Parallel Axes ...................................................................................................299
9.12.1 Syntax ..................................................................................................299
Part Programming Manual
page 7/352
MACHINEMATE

9.12.2 Program examples............................................................................... 300


9.13 Positioning Axis .............................................................................................. 301
9.13.1 Introduction.......................................................................................... 301
9.13.2 Programming ....................................................................................... 302
9.14 Programmable Oscillation .............................................................................. 305
9.14.1 Preparation set .................................................................................... 305
9.14.2 Erasing oscillation data........................................................................ 305
9.14.3 Deviation lengths ................................................................................. 305
9.14.4 Number of deviations........................................................................... 305
9.14.5 Frequency............................................................................................ 306
9.14.6 Dwell times .......................................................................................... 306
9.14.7 Behavior in case of programming errors.............................................. 306
9.14.8 Behavior in case of Emergency Stop................................................... 306
9.14.9 M20 Start M-code ................................................................................ 307
9.14.10 M21 End M-code ............................................................................ 307
9.14.11 M00 Programming .......................................................................... 308
9.14.12 Program end / home position.......................................................... 308
9.14.13 Error messages .............................................................................. 308
9.15 Switchover Spindle-Rotary Axis ..................................................................... 309
9.15.1 General................................................................................................ 309
9.15.2 Programming ....................................................................................... 309
9.15.3 Spindle running.................................................................................... 310
9.16 Thread Cutting or Rigid Tapping .................................................................... 312
9.16.1 General................................................................................................ 312
9.16.2 Spindle Control .................................................................................... 312
9.16.3 Programming thread with uniform pitch, G33 ...................................... 312
9.16.4 Programming thread with dynamic pitch, G34 ..................................... 313
9.16.5 Definition of the thread block ............................................................... 313
9.16.6 Programming cylindrical thread, G33, G34.......................................... 314
9.16.7 Programming conical thread G33, G34 ............................................... 317
9.16.8 Programming lag free thread, G133, G134.......................................... 318
9.17 Turning Cycles or Stock Removal Cycles....................................................... 320
9.17.1 General................................................................................................ 320
9.17.2 G271 Stock removal in turning ............................................................ 321
9.17.3 G272 Stock removal in facing.............................................................. 324
9.17.4 Direction of allowance.......................................................................... 326
9.17.5 G270 Finishing Cycle........................................................................... 327
9.17.6 G274 Peck finishing cycle.................................................................... 328
9.17.7 G275 Outer diameter/internal diameter turning cycle .......................... 329
9.17.8 G276 Multiple pass threading cycle ..................................................... 330
9.17.9 Error messages ................................................................................... 332
9.17.10 Part program display....................................................................... 333
10 PROGRAMMING MACHINEMATE SPECIAL FEATURES ................................... 334
10.1 Lathe T-code Programming............................................................................ 334
10.2 Programming a Rotary-only Motion in G70 .................................................... 335
10.3 G93 for Programming a Mix of Linear and Rotary Motion .............................. 335
10.4 Canned Drilling Cycle Letter Programming .................................................... 337
Part Programming Manual
page 8/352
MACHINEMATE

10.4.1 Canned Cycle Programming with Letters not Parameters....................337


10.4.2 Canned Cycle Programming: Cross Reference to Section 7................339
10.4.3 Canned Cycle Programming Examples................................................339
10.5 Two-axes Collinear Tracking Programming ....................................................340
10.6 Extended Part Offsets Programming...............................................................342
10.6.1 Programming the additional Part Offsets..............................................342
10.6.2 Managing the additional part offsets.....................................................343
INDEX..........................................................................................................................345

Part Programming Manual


page 9/352
MACHINEMATE

Table of Figures and Tables

Figure 1-1: Elements of an NC program ......................................................................... 15


Table 1-1: G-Codes........................................................................................................ 21
Table 1-2: M-Codes ....................................................................................................... 22
Figure 1-2: Nesting depth................................................................................................ 26
Table 1-3: ASCII Character Set ..................................................................................... 30
Figure 1-3: Orientation of the three basic feed axes using the right-hand rule ............... 32
Figure 1-4: Work piece rigid, tool rotates ....................................................................... 33
Figure 1-5: Work piece rotates, tool rigid ....................................................................... 34
Figure 1-6: Position and direction of feed rate and rotary axes. ..................................... 35
Figure 2-1: G00 when turning ......................................................................................... 38
Figure 2-2: G00 when milling ......................................................................................... 38
Figure 2-3: Two successive rapid traverse positioning instructions ............................... 39
Figure 2-4: Absolute dimension coordinates (G90) ........................................................ 40
Figure 2-5: Incremental dimension coordinates (G91) ................................................... 41
Figure 2-6: G01 when turning ......................................................................................... 42
Figure 2-7: G01 when milling ......................................................................................... 43
Figure 2-8: G01 Linear interpolation in the feed rate ..................................................... 44
Figure 2-9: Direction of rotation with G02 and G03 (turning) ....................................... 45
Figure 2-10: Direction of rotation with G02 and G03 (milling) ....................................... 46
Table 2-1: Interpolation parameters at G02 and G03 (at G17, G18 and G19) .............. 47
Figure 2-11: Example for G02 .......................................................................................... 48
Figure 2-12: G12, G13 Circular interpolation in the counter-clockwise direction with
specified radius with K > 0 and K < 0 ............................................................................ 49
Figure 2-13: G12, G13 circular interpolation with specified radius ................................. 50
Figure 2-14: Delete remaining path using probe function (ignoring the probe's radius) .. 53
Figure 2-15: Delete remaining path using probe function and measuring probe radius ... 54
Figure 2-16: CNC reaction to the probe contact ............................................................... 56
Figure 2-17: Straight line/circular arc ............................................................................... 58
Figure 2-18: Straight line/circular arc ............................................................................... 58
Figure 2-19: Circular arc/circular arc................................................................................ 59
Figure 2-20: M70: Start of spline and end of spline with the curve 0 (natural spline) ..... 61
Figure 2-21: M71: Start of spline with tangential transition and end with curve 0 .......... 61
Figure 2-22: M72: Start of spline with curve 0 and end of spline with tangential transition
61
Figure 2-23: M73: Start of spline and end of spline with tangential transitions ............... 62
Figure 2-24: Path velocity with linear interpolation and spline interpolation................... 64
Figure 2-25: Tangential setting to the 2D path.................................................................. 65
Figure 2-26: Tangential setting to the 2D path when turning ........................................... 65
Figure 2-27: Tangential setting to the 2D path when punching/nibbling.......................... 66
Figure 2-28: Programming the leading-in at a specific angle ........................................... 67
Figure 2-29: Programming a changing angle offset using G78 ........................................ 68
Figure 2-30: Behavior of the lead-in during a reversal of the motion direction ............... 69
Figure 2-31: Influence of the lead-in at reversal of motion reversal................................. 70

Part Programming Manual


page 10/352
MACHINEMATE

Figure 3-1: Contour with contouring error...................................................................... 76


Figure 3-2: Contour processed with precision stop......................................................... 77
Figure 3-3: Processing of NC blocks with and without "Look Ahead" .......................... 78
Table 3-1: Effect of different E word values ................................................................. 80
Figure 3-4: Sharp decrease in speed between motion blocks dependent on the corner
acceleration ..................................................................................................................... 81
Figure 3-5: Sharp decrease in speed dependent on the angle between successive motion
blocks. 82
Figure 3-6: Circle reduction error when pulling out of a circle from standstill .............. 83
Figure 3-7: Corner deviation E........................................................................................ 87
Figure 3-8: Curvature radius R........................................................................................ 87
Figure 3-9: Curvature radius R with a minimum path shortened.................................... 88
Figure 3-10: Curvature bend angle in a corner.................................................................. 89
Figure 3-11: Corner smoothing and corner jumps ............................................................ 90
Figure 3-12: Corner smoothing in G203 ........................................................................... 91
Figure 3-13: Real-time radius correction with corner smoothing ..................................... 93
Figure 3-14: Corner smoothing with corners rounded outside not inside........................ 94
Figure 4-1: Tool tip radius compensation for rotating tools ......................................... 104
Figure 4-2: Tool length compensation for rotating tools .............................................. 106
Figure 4-3: Tool length compensation for fixed tools................................................... 106
Figure 5-1: Effect of different tool radii on the work piece contour. ............................ 114
Figure 5-2: Equidistant left and right of the work piece contour .................................. 115
Figure 5-3: Path compensation at the block transition Straight line/Straight line......... 116
Figure 5-4: Path compensation at the block transition Straight line/Circular arc ......... 117
Figure 5-5: Path compensation at the block transition circular arc/circular arc............ 118
Figure 5-6: Move to intersection on a linear path ......................................................... 120
Figure 5-7: Move to intersection on a spiral path ......................................................... 121
Figure 5-8: Comparison of path compensations G41 and G43. .................................... 122
Figure 5-9: Retreat on a linear path............................................................................... 123
Figure 5-10: Retreat on a spiral path ............................................................................... 124
Figure 5-11: Generation of intermediate blocks, example 1 ........................................... 125
Figure 5-12: Generation of intermediate blocks, example 2 ........................................... 126
Figure 5-13: Generation of intermediate blocks, example 3 ........................................... 127
Figure 5-14: Angle cut off............................................................................................... 128
Figure 5-15: End point radius compensation .................................................................. 129
Figure 5-16: Real-time radius compensation .................................................................. 130
Figure 5-17: Insufficient cutting of internal contours with real-time radius compensation
130
Figure 5-18: Motion with blocks without positioning information in the active plane .. 133
Figure 5-19: Motion with a change between G41 and G42 ............................................ 134
Figure 5-20: Motion with a sign change of the compensation value .............................. 135
Figure 5-21: Motion with change of compensation value but no sign change, example 1
136
Figure 5-22: Motion with change of compensation value but no sign change, example 2
137
Figure 5-23: Motion with a tool radius that is too large for an inside corner ................. 138
Figure 5-24: Radius smaller than compensation value (R < D) ...................................... 139
Part Programming Manual
page 11/352
MACHINEMATE

Figure 5-25: Motion with a full circle as external contour (with G42) ........................... 140
Figure 5-26: Motion with a full circle as external contour (with G44) ........................... 141
Figure 5-27: Motion with a full circle as internal contour (with radius compensation) . 142
Figure 5-28: Full circle as external contour (with radius compensation)........................ 143
Figure 5-29: Processing with external path compensation at corners, internal contour
processing 144
Figure 5-30: Setting work piece zero points ................................................................... 146
Figure 5-31: Programming in metric or imperial format ................................................ 149
Figure 5-32: Dimension input in absolute dimension programming .............................. 150
Figure 5-33: Dimension input in incremental dimension programming ......................... 151
Figure 5-34: Set axis value with G92.............................................................................. 152
Figure 5-35: Definition of a reference point for work piece zero points ........................ 153
Figure 5-36: Polar coordinates ........................................................................................ 155
Table 5-1: Major axis and minor axis .......................................................................... 155
Table 5-2: Angle and radius values in the three predefined planes ............................. 156
Figure 5-37: Polar coordinate programming without pole point information................. 156
Figure 5-38: Polar coordinate programming with pole point information ...................... 158
Figure 5-39: Circular interpolation plane selection......................................................... 161
Table 5-3: Circular interpolation planes (G20)............................................................ 162
Figure 5-40: Work area of a machine tool with the axes X and Y.................................. 163
Figure 5-41: Programmable mirror, effect of the programs P1 to P4 ............................. 166
Figure 5-42: Mirror with prior setting of an axis value using G92 ................................. 167
Figure 5-43: Part rotation in the case of active G90........................................................ 171
Figure 5-44: Part rotation in combination with incremental programming (G91).......... 172
Figure 5-45: Scaling with absolute and relative dimension input ................................... 174
Figure 5-46: Grinding wheel offset definitions............................................................... 175
Figure 5-47: Grinding wheel radius orientation definitions............................................ 176
Figure 5-48: Dresser or tool tip radius orientation definitions........................................ 177
Figure 5-49: Grinding wheel control point and gauge point definitions......................... 178
Figure 5-50: Inside corner definition............................................................................... 179
Table 5-4: Differences between DWRC entry/exit move types A, B, C ..................... 179
Table 5-5: G-codes for DWRC path compensation ..................................................... 180
Table 5-6: Application schemes for DWRC path compensation ................................. 181
Figure 5-51: Dress/wheel radius compensation example................................................ 181
Figure 5-52: Wheel corner radius compensation example .............................................. 182
Table 5-7: Activations of DWRC path compensation ................................................. 183
Figure 5-53: Linear and circular intermediate blocks ..................................................... 184
Figure 5-54: The three compensation entry move types (overview)............................... 185
Figure 5-55: Compensation entry moves type A, linear to linear ................................... 186
Figure 5-56: Compensation entry moves type A, linear to circular ................................ 187
Figure 5-57: Compensation entry moves type A, circular to linear ................................ 187
Figure 5-58: Compensation entry moves type A, circular to circular ............................. 188
Figure 5-59: Compensation entry moves type B, linear to linear ................................... 189
Figure 5-60: Compensation entry moves type B, circular intermediate blocks .............. 190
Figure 5-61: Compensation entry moves type C, linear to linear ................................... 191
Table 6-1: Cycle programming: parameters and instructions...................................... 196
Figure 6-1: Transfer of the NC blocks to the interpolator process................................ 196
Part Programming Manual
page 12/352
MACHINEMATE

Table 6-2: Calculation operations and functions ......................................................... 199


Table 6-3: Reserved cycle parameters ......................................................................... 205
Table 6-4: Summary of CNC data as cycle parameters ............................................... 206
Table 6-5: IF comparison operators ............................................................................. 215
Table 6-6: Summary of cycle block SEL functions ..................................................... 217
Figure 7-1: Reference plane, retract plane and final hole depth ................................... 221
Figure 7-2: Drilling cycle G81 ...................................................................................... 226
Figure 7-3: Drilling cycle G82 ...................................................................................... 228
Figure 7-4: Drilling cycle G83 ...................................................................................... 230
Figure 7-5: Drilling cycle G84 ...................................................................................... 232
Figure 7-6: Drilling cycle G85 ...................................................................................... 234
Figure 7-7: Drilling cycle G86 ...................................................................................... 236
Figure 7-8: Drilling cycle G87 ...................................................................................... 238
Figure 7-9: Drilling cycle G88 ...................................................................................... 240
Figure 7-10: Drilling cycle G89 ...................................................................................... 242
Figure 7-11: Example: Base plate ................................................................................... 243
Figure 9-1: Relationship between two linear axes with Angled Wheel Transformation
252
Figure 9-2: Example for G222, two step move for Angled Wheel Transformation ..... 254
Table 9-1: Angled Wheel Transformation two-step motion description ..................... 255
Figure 9-3: Interpretation of the X and Y values when G102 is active......................... 260
Figure 9-4: Barrel cam transformation .......................................................................... 260
Figure 9-5: Meaning of the C and V values when G106 is active ................................ 262
Figure 9-6: Osculation plane axis allocations for the cylinder................................... 263
Figure 9-7: Real-time radius compensation .................................................................. 264
Figure 9-8: Barrel cam transformation with centerline deviation ................................. 265
Figure 9-9: Diameter Programming .............................................................................. 267
Table 9-2: Diameter programming G-codes ................................................................ 268
Figure 9-10: Diameter Programming with negative orientation ..................................... 269
Figure 9-11: Diameter Programming Point of Contact ................................................... 271
Table 9-3: Diameter programming conditions............................................................. 271
Figure 9-12: Position-defined fast M-functions .............................................................. 277
Figure 9-13: Rotations of a normal round axis................................................................ 287
Table 9-4: Programmable values for a round axis ....................................................... 287
Figure 9-14: Rotations of A axis (normal round)............................................................ 289
Table 9-5: Programmable values for a tool magazine axis.......................................... 289
Figure 9-15: Tool magazine round axis .......................................................................... 290
Figure 9-16: Modulo round axis...................................................................................... 291
Table 9-6: Programmable values for a modulo axis .................................................... 291
Table 9-7: Definition of a G33/G34 thread block........................................................ 313
Figure 9-17: Work piece before G33 processing ............................................................ 314
Figure 9-18: Work piece after processing with G33 ....................................................... 315
Figure 9-19: Work piece with controller running out (G33)........................................... 315
Figure 9-20: Work piece with increasing pitch (G34) .................................................... 316
Figure 9-21: Work piece with decreasing pitch (G34).................................................... 316
Figure 9-22: Work piece before processing with G33 .................................................... 317
Figure 9-23: Work piece after processing with G33 ....................................................... 317
Part Programming Manual
page 13/352
MACHINEMATE

Figure 9-24: Work piece with controlled running out (G33) .......................................... 318
Figure 9-25: Stock removal............................................................................................. 322
Figure 9-26: Stock removal: direction of allowance ....................................................... 323
Figure 9-27: Stock removal in facing.............................................................................. 325
Figure 9-28: Stock removal in facing: direction of removal ........................................... 326
Figure 9-29: G274 peck finishing cycle .......................................................................... 329
Figure 9-30: G275 inner/outer diameter turning cycle.................................................... 330
Figure 9-31: G276 multiple pass thread turning cycle .................................................... 332
Figure 9-32: G276 threading cycle and tool tip parameters ............................................ 332

Part Programming Manual


page 14/352
MACHINEMATE

1 Basics of NC Programming
1.1 Program Layout
An NC program (part program) is a sequence of processing steps and is divided
into program blocks. Each program block contains the information that the machine
requires to perform the desired process.

N10 G90
Additional conditions

N20 G1 X50 Y20 F120 M3 S100


Instruction
N30 X15
Sequence of digits Program blocks

N40 Y-20 X25


Address letter
N50 G4 F1000
Program words

Block number

Figure 1-1: Elements of an NC program

1.2 Program block


Individual lines of an NC program are called program blocks or NC blocks. A
program block is the smallest work step that can be taken when processing a work
piece. A program block begins with a block number and ends with a block end
character. A block number is made up of the address character N with a maximum
of four digits. Leading zeros can be omitted. Blocks without block numbers can
neither be read nor entered during programming. The block end character used by
the CNC is the linefeed character (0AH). Placing a slash / (block slash code) before
a block allows the block to be ignored or masked out. (See 1.5 Block Suppression.)

The maximum length of a program block is 128 characters (including block end
character and optional checksum). To allow editing of an NC program the program
blocks are numbered sequentially in blocks of ten with rising block numbers. This
provides easy location of program blocks and insertion of additional blocks.

Example:
N10 G90
N20 G1 X50 Y20 F3000 M3 S1000
N30 X15

Part Programming Manual


page 15/352
MACHINEMATE

N40 Y-20 X25


N50 G4 F1000
N60 M30
The NC blocks being manually input into the CNC are automatically sorted according
to block numbers. The NC block with the lowest block number appears at the
beginning of the program and the one with the highest number at the end.

The program blocks are processed in the sequence in which they were stored. NC
programs entered directly into the CNC are also processed by increasing block
numbers. NC programs that have been externally created and then read into the
CNC may not be processed by increasing block numbers because the program is not
checked for increasing block numbers when loaded. The externally created program
will be processed sequentially as ordered in the file, not by increasing block number.

1.3 Program Word


The individual information in a program block is called a program word. A program
word contains technical, geometrical or technological information related to the
program. The sequence of the program words in a block is arbitrary. A program word
is made up of an address letter and a sequence of digits with or without a sign.

The address letter designates the type of program word. Each address letter must
only be programmed once per NC block. If the same address letter is programmed
several times in a block during program input, the program block is rejected (error
message 5 appears). If the same address letter appears repeatedly in a block from
an externally created program that is read into the CNC, the last address letter read
becomes effective.

The sequence of digits of a word is an integer or a number, consisting of an integer


value and a decimal fraction that can be zero. The decimal is separated from the
integer by a period. A comma is not admissible. Signs are programmed between
address letter and sequence of digits. Positive signs, leading zeros and non-
significant zeros after the decimal point do not need to be programmed. If the decimal
point is not followed by any significant digits, it is automatically set in the display.

Example:
G1 instead of: G01

M1 instead of: M01

X1234.5 instead of: X+1234.500

Y12 instead of: Y+12.00

Z-25.4 instead of: Z-0025.4

There are common uses for many of the letters. These conventions are listed below.
Note that these are not all permanent letter assignments. It is possible for axes to get
Part Programming Manual
page 16/352
MACHINEMATE

any of the letters A, B, C, O, U, V, W, X, Y, Z and for any of these letters to be either


a rotary or linear axis. The following axis assignments are typical and are described
in more detail later (see 1.15).

A A-axis command (usually a rotary)


B B-axis command (usually a rotary)
C C-axis command (usually a rotary)
D Tool diameter/radius compensation number
F Feedrate value
G CNC function or code
H Tool length compensation number
I Circle center distance for X
J Circle center distance for Y
K Circle center distance for Z or circle radius (G12/G13)
L Loop count for subroutine/macro
M Machine function or code
N Block sequence number
P Macro programming variable
Q Subroutine program number to call
R Rotation or scaling factor
S Spindle speed (RPM)
T Tool number or turret position
X X-axis command (usually a linear)
Y Y-axis command (usually a linear)
Z Z-axis command (usually a linear)

The D, F, G, H, I, J, K, M, N, P, Q, R, S letter assignments are permanent, per this


list, except where the syntax defined in this manual identifies an alternate meaning
(e.g., P and Q are also used in turning cycles, in 9.17) or a feature is not used (e.g.,
R could be an axis only if G50 to G52 were never used).

Note that typically the letters D, G, H, L, M, N, P, Q, S, T never have a decimal point.

Program words are considered instructions or additional conditions. An


instruction (e.g., G- or M-codes) prepares or triggers a process in the machine tool
or the control. An additional condition describes the instructions more exactly (e.g.,
specifying the destination coordinates for a positioning instruction).

Program words can be distinguished as either modal (retentive) or non-modal.


Modal program words are active in all following program blocks until they are
overridden or overwritten by an instruction or additional condition that cancels them.
Non-modal program words are only active in the block in which they are
programmed. Modal instructions must therefore only be programmed when they are
changing or when additions are necessary. Non-modal instructions have to be
programmed in each block in which they are included.

Instructions are organized into instruction groups. In any one instruction group all
the instructions are summed up but only one instruction can be in effect at a time.

Table 1-1 on the following pages contains G-Codes available in the CNC. The tables
include notes on group division, effectiveness, whether the respective instruction is
Part Programming Manual
page 17/352
MACHINEMATE

active at CONTROL RESET and whether positioning instructions are programmable


in the same block. G-Codes used to program travel movements within the same
block are marked in Table 1-1 by an asterisk (*). Table 1-2 on the following pages
contains M-codes, some of which are available only in application specific versions of
the CNC.

G-Function Meaning Group Effectivity Active after


reset?
G00 * Linear interpolation with maximum speed 1 Modal
G01 * Linear interpolation with programmed speed 1 Modal Yes
G02 * Circle or helical interpolation with defined circle 1 Modal
center (clockwise)
G03 * Circle of helical interpolation (counter clockwise) 1 Modal
G04 * Dwell time Blockwise
G05 * Definition of spline Blockwise
G06 * Activation of spline 1 Modal
G07 * Tangential arc interpolation 1 Modal
G08 * Look Ahead OFF 7 Modal Yes
G09 * Look Ahead ON 7 Modal
G10 * Clean dynamic buffer Blockwise
G11 * Fill up dynamic buffer Blockwise
G12 * Arc interpolation with defined radius (clockwise) 1 Modal
G13 * Arc interpolation with radius (counter clockwise) 1 Modal
G14 * Polar coordinate programming absolute 3 Modal
G15 * Polar coordinate programming incremental 3 Modal
G16 * Definition of coordinate system Blockwise
G17 * Plane select X/Y 12 Modal Yes
G18 * Plane select Z/X 12 Modal
G19 * Plane select Y/Z 12 Modal
G20 * Plane select programmable 12 Modal
G21 * Parallel axis ON 14 Modal
G22 * Parallel axis OFF 14 Modal Yes
G24 * Work area limit lower boundary Blockwise
G25 * Work area limit upper boundary Blockwise
G26 * Work area limit OFF 9 Modal
G27 Work area limit ON 9 Modal
G33 * Thread cutting, constant pitch 1 Modal
G34 * Thread cutting, variable pitch 1 Modal
G35 * Oscillation Blockwise
G38 Programmable mirroring ON 10 Modal
G39 * Programmable mirroring OFF 10 Modal Yes
G40 * Tool radius correction OFF 4 Modal Yes
G41 * Tool radius correction to the left 4 Modal
G42 * Tool radius correction to the right 4 Modal
G43 * Tool radius correction to the left 4 Modal
with modified activation
G44 * Tool radius correction to the right 4 Modal
with modified activation
G45 * Linear intermediate blocks Modal
G46 * Circular intermediate blocks Modal
G50 * Scaling Modal
G51 * Part rotation degrees Modal
G52 * Part rotation radians Modal

Part Programming Manual


page 18/352
MACHINEMATE

G53 * Zero point shifting OFF 11 Modal Yes


G54 * Zero point shifting 1 ON 11 Modal
G55 * Zero point shifting 2 ON 11 Modal
G56 * Zero point shifting 3 ON 11 Modal
G57 * Zero point shifting 4 ON 11 Modal
G58 * Zero point shifting 5 ON 11 Modal
G59 * Zero point shifting 6 ON 11 Modal
G63 * Feed/spindle override ON 8 Modal
G66 * Feed/spindle override OFF 8 Modal Yes
G70 * Programming in inches 2 Modal
G71 * Programming in metric (mm) 2 Modal Yes
G72 * Interpolation with exact position OFF 6 Modal Yes
G73 * Interpolation with exact position ON 6 Modal
G74 Programmable homing Blockwise
G75 Curvature activation 7 Modal
G76 Curvature acceleration 7 Modal
G78 * Tangential direction 2D control ON Modal
G79 * Tangential direction 2D control OFF Modal
Canned Drilling Cycles (work cycles)
G80 * Canned cycle off Modal
G81 ^ Drilling to final depth Modal
G82 ^ Spot facing with dwell time Modal
G83 ^ Deep hole drilling Modal
G84 ^ Tapping or thread cutting with balanced chuck Modal
G85 ^ Reaming Modal
G86 ^ Boring Modal
G87 ^ Reaming with measuring stop Modal
G88 ^ Boring with spindle stop Modal
G89 ^ Boring with intermediate stop Modal
G90 * Absolute programming 3 Modal Yes
G91 * incremental programming 3 Modal
G92 Zero point setting, maximum spindle speed Modal
G94 * Feed in millimeters/minute 5 Modal Yes
G95 * Feed in millimeters/revolution 5 Modal
G96 * Constant cutting speed ON 15 Modal
G97 * Constant cutting speed OFF 15 Modal Yes
G98 ^ Positioning axis dwell time Blockwise
G99 * Axis offset Modal
G100 Polar/cylindrical transformation OFF Modal
G101 ^ Polar/cylindrical transformation ON Modal
G102 ^ Cylindrical transformation ON Modal
G103 ^ Barrel CAM transformation, real time radius comp Modal
G104 ^ Barrel CAM transformation with centerline deviation Modal
G105 ^ G101 with alternative axis addresses Modal
G106 ^ G102 with alternative axes addresses Modal
G107 ^ G103 with alternative axes addresses Modal
G108 ^ G104 with alternative axes addresses Modal
G109 * Axis transformation programming of tool depth Modal
G110 ^ Axes selection laser power control Blockwise
G111 * Definition of voltage 1 (V1), speed (F1), time (T1) Blockwise
G112 * Definition of voltage 2 (V2), speed (F2), time (T2) Blockwise
G113 * Definition of voltage 3 (V3), speed (F3), time (T3) Blockwise
G114 * Definition of time 4 (T4) Blockwise
G115 * Definition of time 5 (T5) Blockwise
G116 * Definition of time 6 (T6) Blockwise
G117 * Definition of time 7 (T7) Blockwise
G120 Axis transformation; orientation change of rotary axis Modal
G121 Axis transformation; orientation change in a plane Modal
G125 Electronic gear box; plain teeth Modal
G126 Electronic gear box; helical gearing, axial Modal
G127 Electronic gear box; helical gearing, tangential Modal

Part Programming Manual


page 19/352
MACHINEMATE

G128 Electronic gear box; helical gearing, diagonal Modal


G130 Axis transformation; program orientation change Modal
G131 Axis transformation; orientation change Modal
G132 Axis transformation; orientation change Modal
G133 Lag free threading learning ON Modal
G134 Lag free threading learning OFF Modal
G140 Axis transformation; orientation designation of work Modal
piece fixed coordinates
G141 Axis transformation; orientation designation of active Modal
coordinates
G150 Real-time cutter radius compensation OFF Modal
G151 Real-time cutter radius comp ON to the left of path Modal
G152 Real-time cutter radius comp ON to right of path Modal
G160 ART (Adaptive Regulation Technology) activation Modal
G161 ^ ART learning function for velocity factors Modal
G162 ^ ART learning function deactivation Modal
G163 ^ ART learning function for acceleration factors Modal
G164 ^ ART learning function for acceleration changing Modal
G165 Command filter OFF Modal
G166 Command filter ON Modal
G170 Digital measuring signals; block transfer, hard stop Modal
G171 Digital measuring signals; block transfer, without hard Modal
stop
G172 Digital measuring signals; block transfer, soft stop Modal
G180 ^ 5-axes transformation OFF Modal
G181 ^ 5-axes transformation ON, no rotated coord. sys. Modal
G182 ^ 5-axes transformation ON with rotated coord. sys. Modal
G183 * 5-axes transformation; define coordinate system Modal
G184 * 5-axes transformation; program tool dimensions Modal
G186 Acceleration on corners, accuracy of arc interpolation Blockwise
G188 * Enable positioning axis motion Blockwise
G190 Diameter programming OFF Modal
G191 Diameter programming and display ON Modal
G192 Diameter display ON Modal
G193 Diameter display in actual dimension Modal
G200 Corner smoothing OFF Modal
G201 Corner smoothing ON with defined radius Modal
G202 Corner smoothing ON with defined corner radius Modal
G203 Corner smoothing ON with defined radius up to Modal
tolerance
G210 to Laser power control for 2nd output channel (like Modal
G217 G110-G117)
G220 ^ Angled wheel transformation OFF Modal
G221 ^ Angled wheel transformation ON - normal Modal
G222 ^ Angled wheel transformation ON two-step with Modal
angled wheel axis moving first then other axes
G223 ^ Angled wheel transformation ON two-step with Modal
angled wheel axis moving last after other axes
G224 ^ Same as G222 but axes move in machine coord. Modal
G225 ^ Same as G223 but axes move in machine coord. Modal
G265 Distance regulation axis selection Modal
Turning Cycles
G270 Turning finishing cycle Modal
G271 Stock removal in turning Modal
G272 Stock removal in facing Modal
G274 Peck finishing cycle Modal
G275 Outer diameter / inner diameter turning cycle Modal
G276 Multiple pass threading cycle Modal
G310 to Laser power control for 3rd output channel (like Modal
G317 G110-G117)

Part Programming Manual


page 20/352
MACHINEMATE

* Axis information is programmable in the same block


^ No axis information is allowed in the same block
Table 1-1: G-Codes
The currently active G-codes are displayed in the G-codes window of the Information page by
entering ALT I: INFO.
The above list contains optional G-codes that are only available in application specific
versions of the CNC.
With typical default settings, then at CONTROL RESET the correspondingly marked G-codes
in Table 1-1 are active. For another possible default setting see the G-codes window by
entering ALT I: INFO after selection of CONTROL RESET or reference the documentation
with control (with any changes to the control defaults).

M-Command Meaning
M00 * Unconditional Stop
M01 (*) Conditional Stop
M02 (*) End of Program
M03 * Spindle clockwise
M04 * Spindle counterclockwise
M05 * Spindle Stop
M19 * Spindle orientation
M20 * Oscillation ON, Punching/Nibbling ON
M21 * Oscillation OFF
M22 * Nibbling ON
M25 * Punching with/without dwell time ON
M30 (*) End of program
M40 * Automatic gear selection
M41 * Spindle gear transmission step 1
M42 * Spindle gear transmission step 2
M43 * Spindle gear transmission step 3
M44 * Spindle gear transmission step 4
M45 * Spindle gear transmission step 5
M46 * Spindle gear transmission step 6
M70 * Spline, beginning and end curve 0
M71 * Spline, beginning tangential, end curve 0
M72 * Spline, beginning curve 0, end tangential
M73 * Spline, beginning and end tangential
M80 * Delete rest of distance using probe function
M81 * Drive on application block (resynchronize axis
positions via PLC signal during the block)
M101 Reset Bit 1
... ...
M108 Reset Bit 8
M109 Reset all (8) bits
M111 Set Bit 1
... ...
M118 Set Bit 8
M121 Pulsate Bit 1
... ...
M128 Pulsate Bit 8
M140 * Distance regulation ON (configured by G265)
M141 * Distance regulation OFF
M150 * Delete rest of distance using probe function, for a
probe input (one of 16, M151-M168)
M151 * to Digital input byte 1 bit 1 (to bit 8) is active probe
M158 * input (for M150)
Part Programming Manual
page 21/352
MACHINEMATE

M159 * PLC cannot define the bit mask for probe


M160 * PLC can define the bit mask for probe
M161 * to Digital input byte 2 bit 1 (to bit 8) is active probe
M168 * input (for M150)
M170 * Continue look ahead (cancel M171)
M171 * Stop look ahead in probe program
M200 * Handwheel in automatic mode ON (activated)
M201 * to Axis select for handwheel in auto (axis 1 to 8)
M208 *
M209 * Handwheel parameters
M210 * Suspend handwheel input (offsets still active)
M211 * Handwheel in automatic mode OFF
M213 * Spindle 2 on, clockwise
M214 * Spindle 2 on, counter clockwise
M215 * Spindle 2 off or stop
M280 * Switchable spindle/rotary axis rotary axis on (not
spindle), first combination
M281 * Switchable spindle/rotary axis rotary axis on (not
spindle), second combination
M290 * Switchable spindle/rotary axis spindle on (not
rotary axis), first combination
M291 * Switchable spindle/rotary axis spindle on (not
rotary axis), second combination

* M-Code will be transmitted as BCD to PLC


(*) M-Code will only be transmitted to PLC if the function is actually executed
M-Code will not be transmitted as BCD to PLC; these are the fast output signals for the laser
power control option, handled internally by the CNC.
Note: The above list contains some optional M-Codes that are available only in application
specific versions of MACHINEMATE. Many of the M-codes in the table above can be
assigned a different value with a machine parameter associated with that feature.

Table 1-2: M-Codes

Part Programming Manual


page 22/352
MACHINEMATE

1.4 Auxiliary functions (BCDs)


Auxiliary functions are program words that are used to transfer information from the
NC program to the PLC program.

Up to four of these auxiliary functions can be preset in the CNC. The address letters
M, S, U and T are used for auxiliary functions. The corresponding program words are
ignored in the NC program and transferred as BCDs to the PLC Program.

The meaning of the BCDs is determined by the machine manufacturer and should be
explained in the machine documentation. The M-codes that are listed in Table 1-2
however are predefined but can only be used if the relevant function is also available.

Only those M-codes listed in Table 1-2 that are marked by an asterisk (*) are
transferred to the PLC. Some M-Codes (e.g., M02, M30) are only transferred to the
PLC when the corresponding function is actually executed. For example M02 is only
transferred to the PLC when it is at the end of a main program and CONTROL
RESET is initiated. M02 is not transferred to the PLC when it is positioned at the end
of a subroutine because this would cause a jump back to the main program.

Part Programming Manual


page 23/352
MACHINEMATE

1.5 Programming functional overview


This is a summary of the programming functions.

Positioning instructions

G00 Linear interpolation in rapid traverse


G01 Linear interpolation in the feed rate
G02/G03 Circular interpolation with specified center point
G12/G13 Circular interpolation with specified radius
G74 Programmable homing
M80 Delete remaining paths using probe function
G07 Tangential circular interpolation
G05/G06 Spline interpolation 2D
G78/G79 Tangential setting to the 2D path
G08/G09 Look Ahead over more than two blocks
G101/G105 Polar transformation
G102/G106 Cylinder pattern development transformation

Program execution instructions

M00 Program stop (unconditional)


M01 Program stop (conditional)
M02/M30 End of program
G10/G11 Empty/Fill block buffer
G72/G73 Interpolation with precision stop OFF/ON
G08/G09 Look Ahead over more than two blocks
G186 Corner acceleration, contour accuracy
G75/G76 Curvature
G04 Programmable dwell

Technical instructions:

G94/G95 Inches/minute or Inches/revolution


F word, S word Feed rate, spindle speed
G63/G66 Feed rate or spindle override ON/OFF
B word Programmable acceleration
M03/M04/M05 Spindle ON/OFF (clockwise or counter-clockwise)
M19 Spindle Orientation
G92 Spindle speed limitation
G96/G97 S as constant surface speed or rpm

Geometric instructions:

G40-G44 Path compensations


G53-G59 Part position offsets
G70/G71 Programming in imperial/ metric format (inch/mm)
G90/G91 Absolute or incremental programming
G92 Axis value settings
G14-G16 Polar coordinate programming

Part Programming Manual


page 24/352
MACHINEMATE

G17-G20 Plane selection


G24-G27 Programmable work field limits
G38/G39 Programmable axis motion mirror
G51/G52 Part rotation in degrees/radians
G50 Scaling

1.6 Block suppression


Placing a slash (block slash code) before a block marks the block as suppressed.
The block is ignored if Alt A: AUTOmatic F3: Execute program 2 F1: (/)
Block Read over is selected. When F1:(/) Block Read over is not selected, the
blocks are processed like ordinary NC blocks. Cycle blocks cannot be suppressed in
this manner.

Example:
N10 G0 X0 Y0
/N20 G1 X2000 Y300 Is not executed when ignore block read over is selected.
N30 G1 X4000

Application:
The processing of a family of parts is described in an NC program. All machining
operations that are required for part version A, but are not to be executed for part
version B, can be preceded by a slash (/). After selection of: Alt A: AUTOmatic
F3: Program process 2 F1: (/) Block Read over the blocks marked by a slash
are not considered.

Note: If Alt A: AUTOmatic F3: Program process 2 F1: (/) Block read over is
selected after a suppressed block has already been preprocessed and is
waiting in the dynamic block buffer, the suppressed block is not ignored, even
if this block has not yet been reached in the actual program execution.

1.7 Program Repetition


Program repetitions are programmed with an L-code in the last block along with the
instructions M30 or M02:

Example:
N... L5 M30 The program is repeated 5 times. It is executed 6 times in total.

The special case of L0 causes the program to be executed infinitely.

Repetition calls in the last block of a subroutine are ignored (see 1.8 Subroutines). At
the end of a subroutine, the instructions M02 and M30 cause a jump back to the main
program from which the subroutine was called. At the end of a main program, the
instructions M02 and M30 initiate CONTROL RESET.

Part Programming Manual


page 25/352
MACHINEMATE

1.8 Subroutines
Subroutine calls are programmed by entering Q followed by the program number of
an NC program already available in the CNC. The subroutine call causes the first
block of the selected subroutine to be processed as next NC block. A subroutine is
also called a subprogram because the syntax in a subroutine is identical to that of a
main program (except its very first block cannot be a cycle block). When the main
program calls a subroutine, it is really just calling another program to run.

Program repetition calls in the last block of a subroutine are ignored and have to be
programmed, together with L, in the calling program. They are programmed in the
same line in which Q was entered, followed by the number of subroutine runs.

Example:
N... Q100 L5 The program with the number 100 is called as a subroutine and
executed 6 times in total.
Further subroutines can be called within subroutines. The nesting depth is limited to 4
times. One main program level and four subroutine levels can be programmed
altogether.

P100 P200 P300 P400

Figure 1-2: Nesting depth


Note: A M30 or M02 code cannot be positioned in a block with a subroutine call, since in
such blocks subroutine calls are ignored. Also, subroutines must not start with a cycle
block!

The example above uses a main program and its subroutines that are in CNC
memory. The subroutines must be in the same location as the main program. If the
main is in CNC memory then subroutines must be there also. The CNC will search
for the subroutine program number first in the CNC memory. This is useful for
subroutines common to multiple main programs. If the subroutine is not found there
and if the main program is in a disk folder then the subroutine file will be checked in
that same folder. When the main program is in CNC memory and the subroutine
program number is not found (in CNC memory) then error 152 results. When the
main program is in a disk folder and the subroutine program number is not found (in
either CNC or the disk folder) then error 761 results.

Part Programming Manual


page 26/352
MACHINEMATE

When the main program is in a disk folder then the file naming for the subprograms is
important. The default format for the letter Q is six digits. Therefore the CNC will look
for a file having exactly the correct name to match the subprogram call. For example,
a program running from the disk having a block N40Q100 will result in the running of
a file named P000100. from the same disk folder as the main program.

Other commands in the block with the subroutine call will be executed before the
subroutine is called. For example with a block like N300 X10 Q500 the X-axis will
move as directed and after its move is done then the subroutine 500 will be called.

A subroutine call cannot be made from the X and/or Y block that will run a canned
drilling cycle (when one of G81 to G89 is modal). The drilling cycle defines an implied
subroutine that runs automatically for the axis move with a modal drilling cycle so
another subroutine cannot be run as well from the same block.

1.9 Comments in NC programs


NC blocks for the CNC can contain comments. These can be included at any position
in the NC block. They have no effect on the processing of the NC block. The
comment is enclosed in parentheses.

Example:
...
N20 G1 X0 Y0 Z0 (move to zero point)
...
This comment is included in the NC block and the block display during processing but
is otherwise completely ignored by the CNC. There are two forms of comment that
can be used to output notes in the state line:

... (MSG, text)...


... (*MSG, text)...
In the first case, the text between the comma and the closing parenthesis together
with the icon (symbol) for notes is displayed in the status line of the CNC during the
processing of the NC block. The text is then cleared again when the next block is
processed. In the second case the text remains displayed in the status line until it is
either explicitly confirmed or the end of the main program is reached. Note that the
MSG often accompanies an M0, an operator stop, so the operator sees the message
that is the reason for the stop. If there is no M0, sometimes there will be a short dwell
in the block with the MSG (like G4F.5) so that the CNC displays the message and
does not skip it as it maintains a high block throughput.

In cycle blocks, comments of the form

... /Text...
can also be used. Here all characters between the slash (/) and the block end are
treated as a comment. There are no parentheses in cycle blocks (before a comment).

Part Programming Manual


page 27/352
MACHINEMATE

1.10 Program number


The first line in a part program is an empty line with just the line feed character (the
ASCII character value of 10-decimal), that may or may not be followed by the
carriage return character (the ASCII character value of 13-decimal).

The second line in a part program is a % character (followed by the line feed
character, then the optional carriage return character).

The third line in a part program (after the line with the %) is the program number. The
syntax for this line is the letter P followed by the number, as in P0010 for program
number 10.

The program number standard is usually limited to a maximum of 6 digits. However,


the software configuration can be changed to increase the limit to 16 digits.

Note: Any text that is in the part program file before the line with the % will be ignored
by the control. This header can be used for any information that should be in the file
but that will be ignored by the CNC. An error 816 (missing header in file) will occur if
a line with just the % is not found in the file.

1.11 Cycle block layout


Cycle blocks always begin with an asterisk (*) followed by the block number (with no
space between them).

A cycle block is used for calculations with the cycle parameters, for conditional
processing (e.g., IF or GO) or for other cycle programming. Further information
about cycle programming can be found in section 6 for general cycle programming.

1.12 Reading from External Data Files


NC programs from external files must meet the following format requirements:

The first program line must contain the ASCII-code for a line feed (<lf>). Special
characters and spaces (blanks) are not admissible in the first line of the program.

The second program line must begin with the percent character followed by the
ASCII-code for a line feed. Special characters or spaces are not admissible.

The third program line must begin with the program number, consisting of the
address letter P and a number of digits (maximum of 6), and end with the ASCII-code
for a line feed. In this line, a station identifier enclosed in brackets can also be
contained (e.g., PST 01 as shown in the Note following these requirements).

Part Programming Manual


page 28/352
MACHINEMATE

Program lines after the third program line must begin with a block number consisting
of the address letter N and a number of digits (maximum 4 digits) and end with the
respective ASCII-code for a line feed. Spaces (blanks) are admissible in NC blocks;
however, they are deleted upon loading when they are not contained in comments or
cycle blocks.

The last program block must start with a block number, must contain the instruction
M02 or M30 and must end with the ASCII-code for a line feed.

In all program lines, the combination of line feed and carriage return (<lf><cr>) can
also be used instead of line feed (<lf>). Furthermore, the combination (<lf> <cr>) can
also be preset as an admissible block end character.

Any carriage return characters (<cr>) are ignored during loading from files. Only the
line feed character (<lf>) is used internally in the CNC as the block end character.
However, during output to files (depending on default setting), either <lf>, <cr> <lf> or
<lf> <cr> are generated as block end characters.

The maximum block length is 128 characters including the checksum (3 characters)
and the internally exclusively used block end character <lf>. Thus generally only 124
characters in each block are available.

NC blocks may begin as follows:

N... normal NC block


/N... ignored block (see block suppression)
*N... Cycle block (see Chapter 6 General Cycle Programming)

An NC block must not begin with /*N The loading format to be followed can be
shown schematically as follows:

<lf> (<cr>)
% <lf> (<cr>)
P <lf> (<cr>)
N....<lf> (<cr>)
N....<lf> (<cr>)
...
N....M02 (or M30) <lf> (<cr>)

Symbols used:

<lf> ASCII-code for line feed (Linefeed)


<cr> ASCII-code for carriage return
P...... Program number, 6 digits maximum
N.... Block number, usually 4 digits maximum

Part Programming Manual


page 29/352
MACHINEMATE

Dec Hex Code Dec Hex Char Dec Hex Char Dec Hex Char

00 0x00 NUL 32 0x20 SP 64 0x40 @ 96 0x60 `


01 0x01 SOH 33 0x21 ! 65 0x41 A 97 0x61 a
02 0x02 STX 34 0x22 " 66 0x42 B 98 0x62 b
03 0x03 ETX 35 0x23 # 67 0x43 C 99 0x63 c
04 0x04 EOT 36 0x24 $ 68 0x44 D 100 0x64 d
05 0x05 ENQ 37 0x25 % 69 0x45 E 101 0x65 e
06 0x06 ACK 38 0x26 & 70 0x46 F 102 0x66 f
07 0x07 BEL 39 0x27 ' 71 0x47 G 103 0x67 g
08 0x08 BS 40 0x28 ( 72 0x48 H 104 0x68 h
09 0x09 HT 41 0x29 ) 73 0x49 I 105 0x69 i
10 0x0A LF 42 0x2A * 74 0x4A J 106 0x6A j
11 0x0B VT 43 0x2B + 75 0x4B K 107 0x6B k
12 0x0C FF 44 0x2C , 76 0x4C L 108 0x6C l
13 0x0D CR 45 0x2D - 77 0x4D M 109 0x6D m
14 0x0E SO 46 0x2E . 78 0x4E N 110 0x6E n
15 0x0F SI 47 0x2F / 79 0x4F O 111 0x6F o
16 0x10 DLE 48 0x30 0 80 0x50 P 112 0x70 p
17 0x11 DC1 49 0x31 1 81 0x51 Q 113 0x71 q
18 0x12 DC2 50 0x32 2 82 0x52 R 114 0x72 r
19 0x13 DC3 51 0x33 3 83 0x53 S 115 0x73 s
20 0x14 DC4 52 0x34 4 84 0x54 T 116 0x74 t
21 0x15 NAK 53 0x35 5 85 0x55 U 117 0x75 u
22 0x16 SYN 54 0x36 6 86 0x56 V 118 0x76 v
23 0x17 ETB 55 0x37 7 87 0x57 W 119 0x77 w
24 0x18 CAN 56 0x38 8 88 0x58 X 120 0x78 x
25 0x19 EM 57 0x39 9 89 0x59 Y 121 0x79 y
26 0x1A SUB 58 0x3A : 90 0x5A Z 122 0x7A z
27 0x1B ESC 59 0x3B ; 91 0x5B [ 123 0x7B {
28 0x1C FS 60 0x3C < 92 0x5C \ 124 0x7C |
29 0x1D GS 61 0x3D = 93 0x5D ] 125 0x7D }
30 0x1E RS 62 0x3E > 94 0x5E ^ 126 0x7E ~
31 0x1F US 63 0x3F ? 95 0x5F _ 127 0x7F DEL

Table 1-3: ASCII Character Set

Part Programming Manual


page 30/352
MACHINEMATE

1.13 Program Safety


NC programs are protected during transfer, storage and execution from unintentional
change or loss of data.

Safety during transfer


During transfer of NC programs from and to floppy/hard disk, a syntax check is made.
The syntax check covers the following points:

valid program start (<lf>% <lf>)

valid program end (M02/M30)

valid start of each block (N, *N, /N)

valid block length (<128 characters including checksum)

Safety during storage


After selecting and editing an NC program in the operating mode "DATA" and after
copying of an NC program, block and program checksums are verified. Furthermore,
during the editing of an NC program, a syntax check on the edited NC blocks is
performed. This includes a check on allowable NC addresses, number of digits,
signs, block length, block number, and whether NC addresses appear twice. If
necessary, the corresponding error messages are immediately output during editing.

Safety during execution


During execution of NC programs a syntax check is performed, which corresponds to
the test performed during the editing of NC programs. The block checksum of each
block is also checked before processing and error message 30 is output if an error
occurs.

Part Programming Manual


page 31/352
MACHINEMATE

1.14 Axis designations for machine tool machines


There are two types of axes, feed axes (linear axes) and rotary axes for a machine
tool machine.

The feed axes are designated as X,Y, and Z. The X-axis runs parallel to the work
piece table, preferably horizontal. The Z-axis runs parallel to the axis of the work
spindle.

The position of the three feed axes relative to each other can be determined with the
help of the right-hand rule:

Figure 1-3: Orientation of the three basic feed axes using the right-hand rule

Part Programming Manual


page 32/352
MACHINEMATE

For machines with rotating tool:


With a horizontal Z-axis (see Figure 1-4), the positive X-axis runs towards the right
(viewed from the main spindle towards the work piece).

With a vertical Z-axis (see Figure 1-5), on single column machines, the positive X-
axis runs towards the right (viewed from the main spindle towards the column).

With a vertical Z-axis, on twin column machines, the positive X-axis runs towards the
right (viewed from the main spindle towards the left column).

Figure 1-4: Work piece rigid, tool rotates

Part Programming Manual


page 33/352
MACHINEMATE

Figure 1-5: Work piece rotates, tool rigid

For machines with rotating work piece:


The X-axis lies radially towards the work piece and runs from the work piece axis
towards the main tool carrier (see Figure 1-4).

For machines without a work spindle:


The X-axis runs parallel to the main processing direction.

The position of the Y-axis results from the position of the Z and X-axis in the three-
axes coordinate system.

Feed axes, which are available in addition to the basic feed axes X, Y and Z, are
usually designated with the letters U, V and W. Their position and direction is to be
taken from Figure 1-6.

The rotary axes are designated by the letters A, B and C. The A-axis is the rotary
axis around the feed axis X, the B-axis is the rotary axis around the feed axis Y and
the C-axis is the rotary axis around feed axis Z.

Part Programming Manual


page 34/352
MACHINEMATE

Figure 1-6: Position and direction of feed rate and rotary axes.

Memory Aid:
All planes are to be considered in the negative direction of the axis positioned
perpendicular on the plane (e.g., when determining the rotation direction in
connection with the instructions G02 and G03). The rotation direction of the rotary
axes is counter clockwise (mathematically positive) when viewed in the negative
direction of the axis.

1.15 Gantry Axes


A gantry axis is always moved synchronous to another axis (leading axis). An
example is a machine where the gantry must be positioned by means of two linear
axes without tilt. A gantry axis cannot be programmed independently; both servos
move together. Although a gantry axis could be displayed on the user interface of the
CNC, its travel movements result from the travel movements of the leading axis.

Part Programming Manual


page 35/352
MACHINEMATE

1.16 Resettable Rotational Axis


The feature resettable rotational axis is optional and is not available in all systems. It
must be activated from the machine manufacturer.

In principle, a rotational axis can be positioned "into infinity", since its position is
repeated after every revolution of 360. However, since the numerical range for the
representation of the position is limited, the axis also has a finite travel range of axis
limits. A resettable rotational axis also avoids rounding errors that occur with long
travel paths. It also avoids lower resolution of the position representation at the
edges of the travel range.

For many applications, only the relative position of the axis between 0 and 360 is
required. Positions, which vary by complete revolutions, can be considered as having
the same value. A resetting of the position into the range from 0 to 360 can be
undertaken for a rotational axis that is configured as a "resettable rotational axis".
This is done by programming G92 (zero position offset).

Programming:
360 increments are preset for each revolution of the rotational axis. According to the
programming of A730, the rotational axis is moved to the position 730, or 2 complete
revolutions plus 10. After programming G92 A0, the position is set to 0 and the
actual angular position is internally saved.

If G92 does not include any axis information, the position is set to the actual angular
position (10). The information for the two complete revolutions is then lost and the
position of the rotational axis is reduced to the actual angular position (between 0
and 360). At Delete remaining path, no automatic reduction of a position to the
range 0 - 360 is made. A violation of axis limit can be avoided if the position is
reduced in time.

Part Programming Manual


page 36/352
MACHINEMATE

2 Positioning Instructions
2.1 General positioning instructions
These instructions are in this section:

G00 interpolating axis motion at rapid traverse

G01 interpolating axis motion in a line at a programmed feed rate

G02 interpolating axis motion in a clockwise arc at a programmed feed rate


with the center of the arc defined by an incremental distance from the start point

G03 interpolating axis motion in a counter clockwise arc at a feed rate

G12 interpolating axis motion in a clockwise arc with a defined radius

G13 interpolating axis motion in a counter clockwise arc with a defined radius

G74 programmed axis homing

M80 delete the remaining path after a probe contact

2.1.1 Monitoring the axis travel limits


The limit values for the axis travel movements can be preset. During processing of
the NC blocks, the system is monitored to assure that preset axis travel limits are not
exceeded. This monitoring applies only to the programmed end positions and is true
for all interpolation types with real-time processes and active transformations.

If the look ahead monitoring function recognizes that the axis travel limits are
exceeded then:

error message 211 or 860 is output

the NC block which caused the violation is displayed

program execution is stopped before the system processes the block that
caused the violation

The error can be corrected by editing the NC block that caused the violation.

An error message is displayed in all cases where a violation of the axis travel limits is
recognized in real-time. However, the further reaction of the system is different and is
described in the following text in relation to operating functions.

Note: The axis travel limits can be reduced using the function Programmable work field
limitation, thus further restricting the work field.
Part Programming Manual
page 37/352
MACHINEMATE

2.1.2 G00 linear interpolation in rapid traverse


Syntax: G0 X... Y... ...
The rapid traverse instruction is selected using the modal program word G00. The
rapid traverse instruction causes the tool to be moved at maximum velocity to its
destination. The destination point is input as an additional condition.

Application:
The rapid traverse instruction is mainly used for positioning tools. During
positioning, the tool should not be in operation.

Figure 2-1: G00 when turning

Figure 2-2: G00 when milling


The motion path taken by the tool under the rapid traverse instruction G00 is a direct
connecting line between the starting position at which the rapid traverse instruction is
selected and the destination whose coordinates are input as additional conditions.
Therefore, not all of the axes are necessarily positioned with maximum velocity.

Example:
Starting position: X = 250, Y = 200, Z = 250 (see Figure 2-3)

Part Programming Manual


page 38/352
MACHINEMATE

N10 G90
N20 G0 X50 Y80 Z100 "Move to the point X50 Y80 Z100
N30 Z20 in rapid traverse and then move
to Z20 in rapid traverse."

Starting point

Figure 2-3: Two successive rapid traverse positioning instructions

Either absolute or incremental dimension inputs are possible:

Part Programming Manual


page 39/352
MACHINEMATE

Destination

Starting point Absolute


dimenstion

Absolute dimension

Figure 2-4: Absolute dimension coordinates (G90)

Part Programming Manual


page 40/352
MACHINEMATE

Destination

Absolute
dimension

Start
point

Abolute dimension

Absolute Dimension

Figure 2-5: Incremental dimension coordinates (G91)

Part Programming Manual


page 41/352
MACHINEMATE

2.1.3 G01 linear interpolation in the feed rate


Syntax: G1 X... Y... F... ...
The instruction linear interpolation (straight line interpolation) in the feed rate is
selected using the program word G01. The following are additional conditions:

the destination coordinates

the feed rate

the speed of rotation or cutting speed

The instruction G01 causes the tool to be positioned in a straight line to the indicated
destination point with the feed rate that was specified as an additional condition or
was already programmed. Feed rate, speed of rotation and cutting speed are all
modally effective. All axes programmed in the block are positioned simultaneously.
The tool motion path can be either an axis parallel or a non-axis parallel straight line.
The coordinates of the destination points can be entered as either absolute or
incremental dimensions. Straight line interpolation for the feed rate is illustrated in
Figure 2-6, 2-7 and 2-8.

Figure 2-6: G01 when turning

Part Programming Manual


page 42/352
MACHINEMATE

Figure 2-7: G01 when milling

Example:
(Starting position: X = 50, Y = 60, Z = 40)

N10 G90
N20 G1 X80 Y80 Z20 F40 S100

Destination point Feed rate Speed of rotation
40mm/min 100 Revs/min

Part Programming Manual


page 43/352
MACHINEMATE

Start point

N20

Figure 2-8: G01 Linear interpolation in the feed rate

Part Programming Manual


page 44/352
MACHINEMATE

2.1.4 G02, G03 circular interpolation with specified center point


Syntax:
G2/G3 X... Y... I... J... (G17 active)
G2/G3 Z... X... K... I... (G18 active)
G2/G3 Y... Z... J... K... (G19 active)
The positioning instruction circular interpolation with specified center point in
clockwise direction is selected with the program word G02. The positioning
instruction circular interpolation with specified center point in the counter-clockwise
direction is selected with the program word G03.

These instructions are used for the programming of curved work piece contours. The
curve must lie in the plane defined by the instructions G17 to G20.

MACHINEMATE operates with a clockwise coordinate system. The statement in the


clockwise or the counter-clockwise direction relates to the relative movement of
the tool with respect to the work piece when looking towards the path plane in the
negative direction from the coordinate systems axis that is vertically positioned on
the path plane.

Figure 2-9: Direction of rotation with G02 and G03 (turning)

Part Programming Manual


page 45/352
MACHINEMATE

Figure 2-10: Direction of rotation with G02 and G03 (milling)

The additional conditions for the instructions G02 and G03 are as follows:

The destination point coordinates (except during full circle programming)

The coordinates of the center of the circular arc

The feed rate

The speed of rotation or the cutting speed

If it is not geometrically possible to produce a circle from the additional conditions


programmed in a G02/G03-block, the error message 243 or 203 is output.

If a feed rate, a speed of rotation or a cutting speed was already programmed in an


NC block before the call of G02 or G03, and the values programmed there are to
remain effective, then the values do not need to be input again as modal additional
conditions for the instructions G02 or G03.

An arc of a circle of up to 360 can be programmed in each block. An arc must lie in
the plane defined by the instructions G17 to G20.

The coordinates of the circle center are indicated in incremental dimensions relative
to the starting position. The axis addresses I, J and K are to be used with G17, G18
and G19 for the specification of the circle center coordinates. The I, J or K values for
G2 or G3 are not modal, though G2 or G3 will be modal. If one of the circle center
letters (I, J, K) is missing from the block then a value of 0 will be assumed for that
letter.

Part Programming Manual


page 46/352
MACHINEMATE

Axis address:
Distance of the starting position to the circle center:

I in direction of the X-axis

J in direction of the Y-axis

K in direction of the Z-axis


Table 2-1: Interpolation parameters at G02 and G03 (at G17, G18 and G19)

For a plane selected with G20, the axis addresses with which the plane itself was
selected are to be used for the input of the circle center:

I Major axis

J Minor axis

The coordinates of the circle center are to be indicated as positive or negative. A


positive sign does not need to be programmed.

Example:
(Starting position: X = 0, Y = 50)
...
N30 G2 X60 Y30 I30 J-10 F200

Clockwise Destination Circle center, Feed rate
Incremental dimension relative 200mm/min
to starting position

Part Programming Manual


page 47/352
MACHINEMATE

Center point
of circle

Start
point

Destination

Figure 2-11: Example for G02

The contour accuracy of the circle and the circle processing velocity are dependent
on the circular interpolation of the K word value programmed in a G186-block (see
3.7 G186 Corner acceleration, contour accuracy). If no K word was programmed, the
value preset by the machine manufacturer is effective.

Part Programming Manual


page 48/352
MACHINEMATE

2.1.5 G12, G13 circular interpolation with specified radius


Syntax: G12/G13 X... Y... K...
Like G02 and G03 the instructions G12 and G13 enable the programming of the
circular arc. However, the following differences exist between the instructions G12
and G13 and the instructions G02 and G03:

For G02 and G03, the center coordinates are given using the interpolation
parameters I, J and K. Apart from the end position, only the radius as
interpolation parameter K has to be given for G12 and G13.

In contrast to G02 and G03, no full circle can be programmed with the
instructions G12 and G13.

A clockwise circular arc is programmed with G12; a counter-clockwise circular


arc is programmed with G13. The statement in the clockwise or the counter-
clockwise direction relates to the relative movement of the tool facing the work
piece when looking from the vertically positioned coordinates axis on the path plane
in the negative direction at the path plane (see 5.2.1 Plane selection).

A circle section that is smaller than 180 is programmed with positive interpolation
parameter K, a circle section that is larger than 180 is programmed with negative
interpolation parameter K.

Figure 2-12: G12, G13 Circular interpolation in the counter-clockwise


direction with specified radius with K > 0 and K < 0

Part Programming Manual


page 49/352
MACHINEMATE

Example:
...
N40 G1 X15 Y5
N50 X10 Y15
N60 Y45
N70 G2 X30 Y65 I20
N80 G1 X85
N90 G12 X90 Y60 K5 circular arc < 180(K positive)
N100 G1 X95
N110 Y15
N120 G13 X75 Y5 K-14 circular arc > 180(K negative)
N130 G1 X15
...

Figure 2-13: G12, G13 circular interpolation with specified radius

The following inputs are rejected with the error message 114:

Starting point = end position

No input of K

Radius too small, i.e., the distance between the starting point and the end
position is larger than twice the radius

A spiral cannot and should not be produced with G12/G13.

Part Programming Manual


page 50/352
MACHINEMATE

The contour accuracy and the circle processing velocity are dependent on the
circular interpolation of the K word value programmed in a G186-block (see 3.7
G186 Corner Acceleration, contour accuracy). If no K word was programmed,
the contour accuracy and circle processing velocity are dependent on the
existing value programmed by the machine manufacturer.

2.1.6 Helical Interpolation


Helical Interpolation is activated and performed in combination with G02, G03, G12,
and G13. All the axes out of the active plane are treated as helical axes. The
maximum number of helical axes is 6. An example for the x-/y-plane (G17) is:

N10 G02 I10.73 Z20.1

In the x-/y-plane, a complete circle is interpolated. The Z-axis is treated as the helical
axis.

Note: The maximum number of helical axes is 6. The combination with tangential
circle interpolation (G7) and cutter compensation is possible (G41, G42).

2.1.7 G74 Programmable homing


Syntax: G74 X... Y... ...
The instruction G74 causes one or several axes to move to their home position. A
value is entered for each programmed axis address character. This value must be >=
1 but has no effect on the homing.

The axes programmed in connection with G74 all move simultaneously in the
direction of their home position. When the axes have reached their home position,
the machine zero point is set based on the home position.

Example:
...
N50 G74 X1 Y1
...
Never program two consecutive G74-blocks.

When G74 is called up, no path compensations may be active.

When G74 is called up, set axis values are set to 0 with G92.

Part position offsets programmed with G54-G59 are not influenced by G74.

Part Programming Manual


page 51/352
MACHINEMATE

2.1.8 M80 delete remaining path using probe function


Syntax: M80 X... Y...
The function delete remaining path using probe function is activated as default by
the block effective instruction M80.

Note If the instruction M80 has already been allocated to another function in the
control, then the function "delete remaining paths using probe function" may
be assigned to another M-code.

Application:
After the homing process, the machine's coordinate system is clearly laid out. The
exact location of a work piece to be processed in the machine's coordinate system
can be determined by using measuring probes and the function delete remaining
path using probe.

Example 1: Delete remaining path using Probe function work as


follows (without consideration of the measuring probe's radius):
...
N10 X0 Y0 F1000 M80
N20 X-1
N30 Y-5
N40 X5
N50 Y0 M80
...

Part Programming Manual


page 52/352
MACHINEMATE

X, Y is original coordinate system. X'', Y'' is coordinate system after part position offset.
Figure 2-14: Delete remaining path using probe function (ignoring the
probe's radius)
The exact location of the work piece in the coordinate system is unknown. The
following program blocks enable a clear location of the work piece in the coordinate
system:

Description:

N10 X0 Y0 F1000 M80 The point at which the measuring probe or tool reaches the work piece
is assigned the coordinates X=0, Y=0.
N20 X-1 Move the measuring probe or tool away from the work piece edge.
N30 Y-5 Position the measuring probe or tool under the work piece
N40 X5
N50 Y0 M80 The point at which the measuring probe or tool reaches the work piece
is assigned the coordinates X05, Y00. The new coordinate origin is
now positioned at the left lower corner of the work piece.
N60... Beginning of the actual NC program for the processing of the work
piece.
...

Explanation of Example 1:
The first program block N10 causes the measuring probe to be moved in a straight
line in the axes X and Y to the machine's zero point. However, as soon as the
measuring probe reaches a tool edge (point P1 in the example), the axis movement
is stopped and the point P1 is assigned the destination point coordinates X`= 0, Y`=
0, which have not actually been reached yet. Thus the offsetting of the X-axis for the
work piece in relation to the machine's coordinates system is performed.

The offset is determined for the Y-axis as follows:

The measuring probe is moved away from the work piece edge by the program block
N20 and then brought to a position underneath the work piece by the program blocks
N30 and N40.

The offsetting of the Y-axis of the work piece is determined in relation to the Y-axis of
the machine's coordinate system by a travel movement in the Y-axis. This happens in
the program block N50.

The measuring probe is driven linearly in the Y-axis in the direction Y'= 0. When the
work piece edge is reached the travel movement is stopped.

The destination point coordinate Y``= 0 is assigned to the point reached P2. The
point P3 X``= 0, Y''= 0 is therefore the origin of the coordinate system in which the
work piece can be clearly positioned. It lies at the lower left-hand corner the work
piece.

Part Programming Manual


page 53/352
MACHINEMATE

Example 2:
The exact location of the work piece in the coordinate system is unknown and is
determined using a measuring probe with the radius 10 mm (see Figure 2-15).

...
N10 X-10 Y0 M80
N20 X-15
N30 Y-50
N40 X50
N50 Y-10 M80
...

T = tool with radius 10 mm

X, Y is original coordinate system. X ", Y" is coordinate system after the part position
offset.

Figure 2-15: Delete remaining path using probe function and measuring probe radius

Description:

N10 X-10 Y0 M80 The measuring probe T is positioned in the direction of the point X-10,

Part Programming Manual


page 54/352
MACHINEMATE

Y0. Coordinates X-10, Y0 are assigned to the point, which the


measuring probe center reaches when the measuring probe touches the
work piece.
N20 X-11 The measuring probe is moved away from the work piece edge.
N30 Y-50 The measuring probe is positioned under the work piece.
N50 Y-10 M80 The tool is positioned in the direction of the point X50, Y-10.
Coordinates X = 50, Y = -10 are assigned to the point which the
measuring probe center reaches when the measuring probe touches the
work piece. The new coordinate origin lies at the lower left-hand
corner of the work piece.

The instruction delete remaining paths using probe function may only be
programmed with the codes G01, G02, G03, G07, G12 or G13.

The function delete remaining paths using probe function works similarly to the
instruction G92 axis value settings. In the case of G92, the coordinates values
programmed in connection together with G92 are assigned to the position where the
tool is located when G92 is called up. In the case of M80, the destination point
coordinates programmed in the M80-block are assigned to the point where the
measuring probe or the tool reaches a work piece edge. Thus in both cases a part
position offset occurs. In the further course of the program, the processes are based
on the offset zero point.

With the delete remaining paths using probe function, part position offsets
reached correspond to axis values set with G92. These can be cancelled with N..
G92. These values are retained during CONTROL RESET (see 5.1.5 G92 Set axis
value).

2.1.8.1 Probe contact processing

This feature has built-in processing. Upon the detection of the probe contact, the
CNC will react as illustrated below.

Part Programming Manual


page 55/352
MACHINEMATE

Figure 2-16: CNC reaction to the probe contact


The drawing above, especially the time axis (in milliseconds), is not shown to scale.

n0 mechanical contact of the probe to a surface occurs

n1 probe input detected at the drive (Sercos) or at NC hardware (analog). At that


time, the current axis position P1 will be latched (or saved) internally (with analog
axes, all 4 axes of one input group will be latched). The distance traveled between
the probe contact and the contacts detection will be proportional to the axis velocity
(so probing is usually performed at a slow feed rate).

n2 probe input detected by NC software. NC sets the current position to the latched
position (with analog axes all 4 axes of one input group will be updated to the latched
position) and the axis remaining path is moved into the G92 offset. In other words,
the difference between the end position and the actual position (also called the axis
remaining path) is added to the G92 part coordinate system offset for this axis; this
difference is the probe offset obtained by this probe contact.

n3 the NC sets the latched position as new end position to the drive.

n4 drive receives the new end position and stops its previously programmed motion,
so the axis has reached its farthest position P2

n5 drive moves immediately to the new position (which is the position at the moment
of probe contact) and stops.

Part Programming Manual


page 56/352
MACHINEMATE

2.2 Positioning instructions


These instructions are in this section:

G07 interpolating axis motion in an arc that is joined tangentially with the
previous block

G05 definition of a spline (with M70, M71, M72 or M73)

G06 interpolating axis motion in a spline (smooth curves between moves)

G78 enable tangential setting for rotary axis to the 2D path

G79 disable the tangential setting

2.2.1 G07 Tangential circular interpolation


Syntax: G7 X... Y...
The tangential circular interpolation is activated with the program word G07. The
following may be possible or necessary as additional conditions:

The destination point coordinates

The feed rate

The speed of rotation or the cutting speed

The tangential circular interpolation causes a circular arc to be blended in between


the destination of the preceding motion block and the destination programmed in
connection with G07. The arc is joined tangentially to the preceding motion block.
The following three examples illustrate the function of the tangential circular
interpolation.

Example 1:
N10 G0 X10 Y10 F1000
N20 G1 X20 Y40
N30 G7 X50
N40 G1 X60 Y10
N50 M30

Part Programming Manual


page 57/352
MACHINEMATE

Figure 2-17: Straight line/circular arc

Example 2:
N10 G0 X10 Y10 F1000
N20 G1 X20 Y40
N30 G7 X50
N40 G1 X90 Y20
N50 M30

Figure 2-18: Straight line/circular arc

Part Programming Manual


page 58/352
MACHINEMATE

Note: In this example the circular arc only joins tangentially to the straight line of the
preceding motion block but not to that of the following block. The two
tangential joints in the example from the figure above only emerge by chance
due to the location of the straight line of the block N40.

Example 3:
N10 G2 X30 Y30 I30
N20 G7 X50 Y50
N30 G1 X70 Y60
N40 M30

Figure 2-19: Circular arc/circular arc


If a circular arc was programmed in the block before the call of the tangential circular
interpolation, a circular arc is fitted through the destination of the previously
programmed circular arc and the destination point coordinates of G07. The circular
arc is fitted so that the circular arc programmed in the preceding block and the
circular arc produced by the tangential circular interpolation have the same tangent at
the point of contact (see the figure above).

If a tangent is geometrically not possible at the starting point of the circular arc to be
produced by the tangential circular interpolation, or, if the radius is larger than
10,000,000 increments, then a straight line is produced by the instruction G07
instead of a circular arc.

Note: In tangential circular interpolation the contour accuracy and the circle
processing speed are dependent on the K word value programmed in a G186-
block (see 3.7 Corner acceleration, contour accuracy). If no K word was

Part Programming Manual


page 59/352
MACHINEMATE

programmed, the circular interpolation and the contour accuracy depend on


the default value set in the control.

2.2.2 G05, G06 Spline Definition and Spline Interpolation 2D


Syntax:
G5 X... Y... M70/71/72/73 (Spline definition)
G6 X... Y... F... (Spline interpolation)
Spline interpolation is used for the connection of specified points with smooth curves
whose curve radii continually change. It is especially useful when combined with the
function Teach In for the processing of contours, which are not defined as measured
values but exist as models. The programming of a spline interpolation is made in two
steps:

2.2.2.1 Step 1: Spline Definition

The axes addresses involved in the spline interpolation of the axes are programmed
together with the program word G05. For each programmed axis, a dummy value
must be specified which consists of at least one digit but which has no meaning (see
following example).

The spline type is determined using an M-code, with these definitions:

M70 Start and end of spline with curve 0 (natural spline), M70 is the default
instruction.

M71 Start of spline with tangential transition and end of spline with curve 0.

M72 Start of spline with curve 0 and end of spline with tangential transition.

M73 Start of spline and end of spline with tangential transitions.

Splines with tangential transitions


Splines with tangential transitions are joined without any kink to the last block before
the spline interpolation and to the first block after the spline interpolation. These
blocks may be linear or circular. If they do not contain any positioning information and
therefore no direction is defined, then the spline starts and ends with the direction of
the first and the last spline blocks respectively.

Examples:
N10 G5 X1 Y1 M70/M71/M72/M73 (Spline definition)
N20 G1 X10 Y0
N30 X0 Y15
N40 G6 X5 Y30
N50 X20 Y15
N60 X45 Y30
Part Programming Manual
page 60/352
MACHINEMATE

N70 X60 Y15


N80 G1 X65 Y30
N90 M30

Figure 2-20: M70: Start of spline and end of spline with the curve 0 (natural spline)

Figure 2-21: M71: Start of spline with tangential transition and end with curve 0

Figure 2-22: M72: Start of spline with curve 0 and end of spline with tangential transition

Part Programming Manual


page 61/352
MACHINEMATE

Figure 2-23: M73: Start of spline and end of spline with tangential transitions

2.2.2.2 Step 2: Spline Interpolation

Spline interpolation is activated using G06. Using any other G-code of the same
group (e.g., G00, G02, and G13) can deactivate the spline interpolation. The block
preceding a G06 block must always contain positioning information if a tangential
transition is to be achieved.

Example:
...
N30 G5 X1 Z1 M71
N40 G1 X2 Z5
N50 G6 X3 Z10
...
These program blocks have the following effect on a control with the three axes X, Y
and Z.

Spline interpolation is effective for the axes X and Z. The axis Y is interpolated
linearly. The values programmed in the G05 block with the axis addresses X and Z
do not result in axis movements and do not influence future motion of the axes. The
spline starts tangentially from the destination of the last motion block before the call
of the G06-code. M71 makes the curve at the end of the spline is 0.

The spline definition G05 can be programmed in a single block together with the
dummy coordinates of the axes involved in the spline and an M-code for the spline
type (M70-M73) as shown in the example above. If no coordinates are programmed
together with G05, then no axis is involved in the spline. Activation of the spline
interpolation with G06 at a later point in time has the same effect as G01.

If a spline interpolation is deactivated and called up again later by programming


another G-code of the same code group in a program, both the original spline

Part Programming Manual


page 62/352
MACHINEMATE

definition with G05 as well as the original definition of the spline type (M70-M73) will
remain valid.

If, for a new call-up of the spline interpolation, other axes are to be involved in the
processing of the spline, their axis addresses (each together with a dummy value)
must be programmed in a new G05 block prior to the activation of the spline
interpolation. If a change of the spline type is desired, the M-code for the desired
spline type must be programmed in a block prior to the reactivation of the spline
interpolation or in the block from which the spline type change is to apply.

Additional Notes:
If only axis addresses and no new spline type have been programmed along with
G05, spline type remains the same.

If G05 is programmed while G06 is active, then the error message 108 appears.

If the spline interpolation is active, only blocks with positioning instructions in the
plane in which the spline is processed may be programmed. Blocks without
positioning instructions (e.g., G04, G92) result in error message 257.

A spline that extends over only one block is executed without an error message
as a normal linear interpolation (e.g., G01).

For test purposes, programs that use spline interpolation can be converted to
linear interpolation by replacing G06 with G01 in the corresponding program. The
instructions for the spline definition or the selection of the spline type do not
influence the linear interpolation.

A contour accuracy programmed with a K word together with active Look Ahead
and G186 has no effect on spline interpolation.

Path velocity
Extreme deviations of a spline from the programmed linear motion distance may
result in a higher actual path velocity than that programmed. This is due to the fact
that the programmed path velocity is always related to the linear motion distance.
During processing of a spline, the tool is positioned with the necessary path velocity
so that it reaches the destination at the same point in time as it would have done had
it traveled along the linear path with the programmed path velocity.

Example:

...
N10 G5 X1 Y1 M70
N20 G1 X10 Y10
N30 G6 X30 Y15 or N30 X30 Y15 respectively.
N40 X30 Y25
N50 X10 Y20
...
Part Programming Manual
page 63/352
MACHINEMATE

Figure 2-24: Path velocity with linear interpolation and spline interpolation

Additional Notes:
Note the method of operation of the path compensations for spline interpolation
(see 5.1.1 Path Compensations).

To achieve optimum results with spline interpolation, a programming of G11 fill


dynamic block buffers before the activation of the spline interpolation can be
useful (see 3.4 Empty/fill dynamic block buffer).

The function G05, G06 spline is optional and not available in all MACHINEMATE
CNCs.

2.2.3 G78, G79 Tangential Setting to the 2D Path


Syntax:
G78 (C...) ... Tangential setting to the 2D path ON
G79 Tangential setting to the 2D path OFF
The function Tangential setting at path 2D enables a rotational axis to be orientated
during a travel movement in a plane so that a set angle with the tangent is always
obtained at the point reached each time.

Application examples:
1. Sawing

Part Programming Manual


page 64/352
MACHINEMATE

Figure 2-25: Tangential setting to the 2D path


To achieve the contour displayed in the figure above when sawing, the saw must be
turned during the travel movement so that the saw blade is positioned tangential to
the contour each time.

2. Laser welding
During laser welding, the material feed must be made at a certain angle to the laser
beam. The material must always be conveyed in the direction of processing in front of
the laser ray.

3. Turning

Figure 2-26: Tangential setting to the 2D path when turning


If during turning, the material is always to be removed with the tip (A) of the cutting
tool, then the tip must always be guided tangentially along the work piece contour. If
the removal of material from the work piece is to be made by position B on the cutting
tool, then the cutting tool must always be led at a certain inclined angle along the
work piece contour.

4. Punching/nibbling

Part Programming Manual


page 65/352
MACHINEMATE

Figure 2-27: Tangential setting to the 2D path when punching/nibbling


If the contour described in the figure above is to be achieved by punching or nibbling
then the tool or the die must always be orientated according to the desired work
piece contour.

Key Terms:
Tangent Vector:
The tangent vector is a unit vector that points in the instantaneous direction of motion
in the active plane at each point on the motion path.

Tangent Vector Angle:


The tangent vector angle is the angle that is formed between the tangent vector and
the main axis of the coordinate system. The angle of alignment is calculated from the
sum of the tangent vector angle and any angle offset that may have been
programmed.

Programming the lead-in


The function tangential setting to the 2D path is activated by the modally effective
command G78. This function is effective starting from the block that contains G78. If
the axis address of the rotational axis is not programmed while in the G78 then a
tangential lead-in is made and the angle offset totals 0. To program a lead-in with an
angle relative to the tangent to the motion path (angle offset), the axis address of the
rotational axis must be specified with the desired angle offset value and command
G78 (see the figure below).

The function tangential setting to the 2D path is deactivated using the command
G79 or by CONTROL RESET. Intermediate blocks (for synchronization) are
generated when this function is switched off.

In servo processor systems, switching off the tangential setting to the 2D path
function also stops the processing or preprocessing in the base processor until the
switch off instruction has been processed.

Part Programming Manual


page 66/352
MACHINEMATE

When the function tangential setting to the 2D path is activated, the rotational axis
takes the shortest route (turn < 180) to the alignment angle at the beginning of the
processing. The function tangential setting to the 2D path is already active when
the G78 block is processed.

The values of the angle offset programmed together with the axis address of the
rotational axis are limited from -360 to +360. If the programmed value lies outside
this range, the error message 54 is displayed.

Figure 2-28: Programming the leading-in at a specific angle


Note that if the part program has corners rather than a smooth profile (e.g., there are
right-angle corners) then the use of the Corner Smoothing feature (see 3.10) will
address the jerks in the rotary axis at those corners if they are undesirable.

2.2.3.1 Changing the angle offset with modally effective G78

If the function tangential setting to the 2D path is already active, programming


another G78 block can change the angle offset. If G78 is programmed without
specification of an angle offset, the angle offset is set to the value 0 starting at this
block. In all other cases offset the angle offset is set to the programmed value.

In G78 blocks no programming of the rotational axis itself is possible. Only the angle
offset for the rotational axis can be specified. With modally effective G78, however,
the rotational axis (together with other axes) can be programmed as usual. The
Leading-in is then deactivated in the block where the rotational axis is programmed
with modally effective G78. If the rotational axis is positioned incrementally with
modally effective G78 (with G91 active), the programmed values correspond to the
adjusted position of the rotational axis.

Part Programming Manual


page 67/352
MACHINEMATE

Example:
See the following table and Figure 2-29.

N10 G1 X0 Y0 C0 F3000
N20 G78 X30 Y30 Angle of alignment 45
N30 G1 X60 Y40 Angle of alignment approx. 16.5
N40 G3 Y80 J-20 Tangential lead-in to circular arc
N50 G1 X0 Angle of alignment 180
N60 G78 X-40 C45 Angle of alignment 225
N70 G3 Y40 J-20 Angle of alignment: 45 + tangent
vector angle
N80 G1 X-20 Angle of alignment 45
N90 G78 Y0 Angle of alignment 270
N100 G1 X-30 Y-30 M30 Angle of alignment: approx. 217

Figure 2-29: Programming a changing angle offset using G78


At block transition N90/N100, the rotational axis turns from 270 to approx. 217
using the shortest route to rotate approximately 53 in the clockwise direction. At
contour corners the rotational axis always moves with maximum velocity to the
alignment angle necessary for the following path. The interpolation of the remaining
axes is not interrupted during this jump. Their positioning is continued during the
"jump" of the rotational axis.

Part Programming Manual


page 68/352
MACHINEMATE

2.2.3.2 Behavior of the lead-in during reversal of motion direction

Example:
(See the following table and Figure 2-30.)

N10 G78 C45


N20 G1 X0 Y0
N30 X10 Y10
N40 X30
N50 G0 X10 M30

Figure 2-30: Behavior of the lead-in during a reversal of the motion direction
If two contradictory motion blocks are programmed, the tool jumps through 180 on
the same path moving backwards. Specifying a limit angle can prevent this. This limit
angle determines the maximum angle through which the rotational axis may jump at
block transitions.

A second method used to prevent rotational axis jumping is to change the angle
offset corresponding to the desired jump in the program.

Example:
...
N10 G78 C45
N20 G1 X0 Y0
N30 X10 Y10
N40 X30
N50 G78 C-45
N60 G1 X10
Part Programming Manual
page 69/352
MACHINEMATE

...

Figure 2-31: Influence of the lead-in at reversal of motion reversal

2.2.3.3 Programming G92 and G54-G59 with G78 active

Programming of G92 set axis value together with a value for the rotational axis is not
permitted when G78 is active. Values for the remaining axes can be programmed
together with G92 as usual even when G78 is active.

In addition no axis value for the rotational axis may be set when G78 is called up
together with G92. If necessary, an axis value set for the rotational axis must be reset
to the original position.

When G78 is active, the part position offsets for the rotational axis selected with G54
to G59 is ineffective.

Axis limits of the rotational axis for full rotations:


The current position of the rotational axis is displayed each time the function the
tangential setting to the 2D path is switched on. At the same time the displayed
angle values are reduced to the range of 0 to 360. For a rotational axis position of
365, only 5 is displayed.

The reaction of the control upon switching the function off can be preset and one of
the two following possibilities can be selected (see the machine tool manufacturer's
documentation to determine operation for your machine):

Part Programming Manual


page 70/352
MACHINEMATE

1) The control internally counts the full rotations that the rotational axis makes when
repeatedly moving along a closed contour in the same direction. The reduction to
within the range of 0 to 360 is disabled after the function tangential setting to the
2D path is switched off. The absolute position of the rotational axis is restored.
However, continued turns in one direction may result in a violation of the axis limits of
the rotational axis, which is recognized in real-time. The error message 211 is
displayed and EMERGENCY STOP is set. In this case the axis limits of the rotational
axis therefore limit the number of full rotations that the rotational axis is able to make
in the same direction. The axis limits can be preset. See the machine tool
manufacturer's documentation for details.

2) The control does not internally count the full rotations of the rotational axis.
Consequently, the absolute position of the rotational axis cannot be restored after the
function tangential setting to the 2D path is switched off. However, this also
prevents the rotational axis limits from being violated.

Note: Continued rotation of the rotational axis in the same direction can cause
problems such as distortion of cables.

Programmable limit angle


Using this function, it is possible to switch off the tangential leading-in until the
directional change in the leading axis has exceeded the programmed limit angle. This
function is only effective with linear interpolation since with all other types of
interpolation the direction is constantly changed within a block.

To avoid the following axis jumping, the leadingin can be suppressed at small, non-
programmed changes in direction of the leading axis.

The limit angle is programmed using a NC address that can be set (in the following
examples the letter Z is used). The limit angle can be programmed either when the
leading-in is activated or deactivated. In the following text it has been assumed that
the leading axes are designated X and Y and the following axis C.

Example program:

Position of the C axis


(in degrees)
N 5 G0 F1000
N 10 G78 X0 Y0 F3000
N 15 X10 Y0 0
N 20 X20 Y-1 354.289
N 30 X40 Y+1 5.711
N 40 X59 Y0.5 358.493
N 50 X71 Y-1.5 350.538
N 60 X80 Y0 9.462
N 70 X102 Y-1.8 355.323
N 80 X120 Y0.5 7.282
N 90 X140 Y0 358.568
N100 G02 X160 Y-20 J20 I0 358.568
-270
Part Programming Manual
page 71/352
MACHINEMATE

N110 G1 Y-100 270


N120 X0 180
N130 Y0 90
N140 M30

The example program basically describes a rectangle with a rounded corner on the
upper right. In the blocks N10 to N90 a move is made parallel to the X-axis towards
the right, whereby the Y value varies about 0. This means that the tangential
following axis jumps by a value between 2 and 10 at each block transition.

If in the example program the block N15 is changed to:

N15 X10 Y0 Z10

then from block N15 onwards all jumps which are less than 10 are suppressed. This
means that the tangential following axis remains at its start position up to and
including the block N90. Its position only changes at the start of the circle block.

The programmed Z value is always relative to the last rotational axis position
reached. If the value Z - 10 is not programmed until block N30, then a jump is made
through 15.173 degrees upon the transition to the N50 block.

A Z value can be programmed at any position in a program and remains active until a
new value is programmed. At CONTROL RESET and end of the program the Z value
is deleted.

Part Programming Manual


page 72/352
MACHINEMATE

3 Influencing the Program


These instructions are in this section:

M00 program stop for the operator

M01 optional program stop for the operator

M02 or M30 end of the part program

G10 empty the dynamic block buffer (look ahead)

G11 fill dynamic block buffer

G72 interpolation with end point precision is disabled

G73 interpolation with end point precision is enabled

G08 path velocity look ahead is disabled (at block transitions)

G09 path velocity look ahead is enabled (smooth block transitions)

G186 corner acceleration and corner accuracy adjustments

G75 curvature is active (tangential block transitions)

G76 curvature acceleration limit

G4 dwell time, specified with F

G200 G203 corner smoothing feature

3.1 M00 program interruption (unconditional stop)


Syntax: M00
Unless other arrangements have been made in the PLC program, the instruction M00
enables an NC program to be interrupted in order to carry out a measurement. After
processing an NC block in which the instruction M00 was programmed, the CNC
interrupts the program execution. All modal values are preserved. Press the start-
button afterwards to allow the processing to continue.

3.2 M01 program interruption (conditional stop)


Syntax: M01
The instruction M01 has the same function as M00 if Alt A: AUTOmatic F3:
Program process 2 F2: Optional halt (M01) was previously selected.

Part Programming Manual


page 73/352
MACHINEMATE

If Alt A: AUTOMATIC F3: Program process 2 F2: Optional halt (M01) is


selected after an NC block with the instruction M01 has been processed and is
already located in the dynamic block buffer, then the program is not interrupted even
if the actual execution of the M01block has not yet begun.

3.3 M02, M30 end of program


Syntax: M02/M30
The end of the program is programmed with the instructions M02 or M30. These two
instructions have exactly the same effect. Therefore, it is not important which one is
used.

In contrast to M00 the instructions M02 and M30 have the effect that all modal values
are cancelled and the control is again reset in the home position.

M02 or M30 is entered in the last block of an NC program. The axes remain at the
position reached at the end of the program.

The start key re-starts the program flow.

If a program repetition was programmed with L in an M02 or M30 block, then M02 or
M30 respectively first becomes active after the last repetition.

In subroutines M02 or M30 only marks the end of the subroutine; not the end of the
main program. M02 or M30 in this case cause only a return to the main program; the
control is not reset to the home position.

Each program must contain M02 or M30 as an end label. If this is not the case, the
error message 32 appears.

Additional Notes:
An offset of the coordinate zero point programmed with G92 is not reset by
M02/M30.

Subroutine calls in a block with M02/M30 are not allowed. No error message
appears; however, the subroutine call is not executed.

M02/M30 can be positioned anywhere in the last block; the instructions which
follow after it in the same block are still processed before M02/M30 becomes
active.

Part Programming Manual


page 74/352
MACHINEMATE

3.4 G10, G11 empty/fill dynamic block buffer


3.4.1 G10 Empty dynamic block buffer
Syntax: G10

The CNC is equipped with a block buffer for a certain number of NC blocks. The
interpreter process fills this block buffer. From this block buffer, the interpolator
process takes the NC blocks. For certain applications, it is necessary to prevent the
interpolator process from taking blocks from the block buffer. The withdrawal of
blocks from the block buffer can be enabled or disabled using the instruction G10
Empty dynamic block buffer or G11 Fill dynamic block buffer.

Application:
The instruction G10 is necessary, for example, when a program must be stopped at a
certain position using M00. This allows output of messages to the operator with the
help of the interactive cycles.

After processing a G10-block, the interpolators block buffer is only refilled by the
interpreter process after all preceding blocks have left the block buffer.

Example:
Tool change at unload position X=0, Y=0.

...
N100 Y0
N110 X0
N120 M0
N130 G10
N140 X200 Y200
...
The instruction G10 in N130 has the effect that the block N140 is processed only
after the cycle start button is pressed (to resume the program after the M00).

3.4.2 G11 Fill dynamic block buffer


Syntax: G11

Application:
The instruction G11 is useful when a fairly large number of very short blocks has to
be processed without pauses at the block transitions. Programming of G11 is
recommended before the activation of a spline interpolation or the function Look
Ahead, where an optimum result can only be achieved when a sufficient number of
NC blocks are present in the dynamic block buffer at the time of activation.

If G11 is programmed in a block, then this instruction as well as the following blocks
are only processed in the interpolator process when the block buffer is completely full
or the complete program is contained in the block buffer.
Part Programming Manual
page 75/352
MACHINEMATE

3.5 G72, G73 interpolation with precision stop OFF or ON


Syntax: G72/G73 ...
With the program word G73, the instruction interpolation with precision stop is
activated. It is deactivated with the program word G72. Contouring errors are
removed right up to the block end using the interpolation with precision stop.

Contouring errors result from inevitable control deviations. The size of the contouring
error depends on the feed rate and the control loop amplification (KV Factor).
Contouring errors can lead to slight rounding of the corners of the work piece, as
shown in Figure 3-1. Depending on the type of processing, contouring errors can also
lead to twisting and deformed corners.

Figure 3-1: Contour with contouring error


A rounded contour corner due to contouring errors is not usually a negative thing,
since sharp edges are mainly undesirable. However, if contouring errors must be
avoided (e.g., when turning special edges for seals), instruction G73 is used. For all
types of interpolation, the following NC-block is only activated once the axes have
traveled to the destination of the block that is currently processing. A preset number
of contouring errors can remain to the block end.

If G73 is programmed, the tool may lose contact with the work piece when stopping.
Marks will occur in the workplace contour because the cutting pressure is suddenly
reduced when the feed is halted.

Part Programming Manual


page 76/352
MACHINEMATE

Figure 3-2: Contour processed with precision stop

3.6 G08, G09 look ahead OFF or ON


Syntax: G08/G09 ...
The function Look Ahead is switched on using the instruction G09 and switched off
using the instruction G08.

The function Look Ahead is deactivated during processing of an NC program


by blocks and by the following G-Codes:

G73 interpolation with precision stop ON

G74 programmable homing

G95 feed rate as distance/rev

Method of operation of the function "Look Ahead"


With G08 active, the NC motion block acceleration takes place from 0 up to the feed
rate. The NC block braking takes place at the end, so the feed rate is zero when the
destination point of the motion block is reached. Travel stops at exactly that point.

When Look Ahead is active the CNC recognizes several NC blocks in advance, at
which positions the axes have to be accelerated or braked. The feed rate is
automatically adjusted by acceleration or braking. The adjustment is made in
consideration of the following factors:

The feed rate programmed in the individual NC blocks (see Figure 3-3)

The path curve and the corners, taking the maximum admissible axis
acceleration values into consideration (see Figure 3-5)

The maximum admissible axis speeds

Part Programming Manual


page 77/352
MACHINEMATE

G08 must be active when G95 (in/min or mm/min) is active. With the G95 function the
CNC is performing a different type of look ahead than being described here with G09.
G09 is not allowed with G95 active.

Figure 3-3: Processing of NC blocks with and without "Look Ahead"


A uniform feed is guaranteed for two or more NC blocks in advance (see Figure 3-3).
This leads to a more uniform, and in some cases, faster processing which results in
higher surface quality and increased productivity. To guarantee uniform feed, control
must not only consider the current NC blocks, but also must look ahead" and take
the course of the following NC blocks into consideration.

To enable a constant feed rate over several blocks in advance, when Look Ahead is
active, the motion does not stop at the programmed block destinations, but continues
with the feed rate reached at the block end (see Figure 3-3).

If the feed rate must be reduced to 0 at the block end, (e.g., because G09 was
deactivated) motion stops exactly at the last block destination before deactivation of
the function Look Ahead.

Part Programming Manual


page 78/352
MACHINEMATE

The CNC allows a large number of NC blocks to be "looked" at in advance with active
G09 function. The number of NC blocks that can be looked at in advance depends on
the available memory space in the dynamic block buffer (at least 4 blocks).

When processing several NC blocks with the Look Ahead function active, the feed
rate is limited so that a reduction of the feed rate to 0 is possible up to the last block
to be processed. Each block has at least one point of interpolation.

If a block without positioning instructions appears within a sequence of NC blocks


that are to be processed with active G09, the feed rate is reduced to 0 at the end of
the preceding motion block.

If G09 is active and the minimum block execution times are not too short or the
maximum block preparation times not too long, a new block in the geometry
preparation is finished in time and the interpolator process is available for the
processing in time. Programming G11 Fill dynamic block buffer or G04 Dwell time
(e.g., before a critical program section) can ensure this. It is also possible to
accelerate or brake from over several blocks away.

Additional Notes:
Switching from next block mode to the single mode causes all unprocessed G09
blocks to be processed as G08 blocks. If G09 blocks were already interpreted as
G08 blocks, switching from single block mode to next block mode will cause the
blocks to still be processed as G08-blocks. When processing NC blocks in the
single mode the instruction G09 always works like G08.

When Look Ahead is active, the spline interpolation with tangential transitions
should always be used. The other spline interpolation types are also applicable
(in which case one G08 block at the spline start and one at the spline end must
be tolerated).

To achieve optimal method of operation with servo processor systems after the
Look Ahead function is activated, the dynamic block buffer should be filled before
the first motion block is executed. The filling of the dynamic block buffer can be
achieved by using the instruction G11 fill dynamic block buffer or with a dwell
time programmed with G04.

Example:
...
N30 G9 (G09 must already be active before
G04/G11 is programmed)
N40 G4 F500 or N40 G11
N50 G1 X20 Y30
...
N200 M30

Note: The function Look Ahead is optional and not available in all controls. When
Look Ahead is available and active, it may be beneficial to limit the acceleration
Part Programming Manual
page 79/352
MACHINEMATE

using the instruction programmable acceleration. This causes a level setting of


the acceleration.

3.7 G186 corner acceleration, contour accuracy


3.7.1 Corner Acceleration
Syntax: G186E ...

Example:
...
N20 G186 E0.9 K0.05
...
The axes of a machine tool have a maximum admissible acceleration. A corner
acceleration can be programmed by the instruction G186 together with an E word.
Depending on the value of the E word, the corner acceleration either causes a short-
term infringement of, or a reduction of, the maximum acceleration of the axes when
G09 Look Ahead is active. The effect of different E word values is to be taken from
the following table:

Value of the E Word Effect


1 Doubles the max. acceleration
0.5 (Preset Value) Retains the max. acceleration
0.25 Halves the max. acceleration
0.05 Reduces the max. acceleration by 10%
Table 3-1: Effect of different E word values

The E word programmed with G186 controls the sharp decrease in axis speed
between motion blocks as shown in Figure 3-4.

Part Programming Manual


page 80/352
MACHINEMATE

Figure 3-4: Sharp decrease in speed between motion blocks dependent on the
corner acceleration

Part Programming Manual


page 81/352
MACHINEMATE

Figure 3-5: Sharp decrease in speed dependent on the angle between


successive motion blocks.

Part Programming Manual


page 82/352
MACHINEMATE

The size of this sharp decrease in speed depends on the size of the E word value
and the angle between the paths described in successive blocks (see Figure 3-5).
The higher the E word value and the less the deviation of the angle from 180, the
less the decrease in speed. On the basis of the contouring error, the required contour
accuracy at the corner is therefore finally programmed via the E word.

Additional Notes:
If no E word was programmed, the value preset by the machine tool
manufacturer applies. (The default value comes from the Machine Parameter
CornerAccelerationG09.)

The function Look Ahead can be switched off with a very low E-value (e.g.,
0.001), so that the processing is made in the same way as when G08 is active.

3.7.2 Contour Accuracy:


Syntax: G186K ...
The desired contour accuracy during circular interpolation can be programmed with
the instruction G186 together with a K word.

During circular interpolations a circle radius reduction, therefore a contour


inaccuracy, appears depending on circle amplification (KV) and path velocity.

Figure 3-6: Circle reduction error when pulling out of a circle from standstill

Part Programming Manual


page 83/352
MACHINEMATE

During circular interpolation with programmed contour accuracy, the path velocity is
lowered so greatly that the programmed maximum circle radius reduction is not
exceeded. If no value is input for the circle accuracy, a high K value can be
programmed. The K value is programmed in the same units as the axis positions.

Additional Notes:
A programmed contour accuracy only influences the circular interpolation (with
G02/G03, G12/G13 and G07), and not the linear and spline interpolation.

If no K-value was programmed, the value preset by the machine tool


manufacturer is valid.

Regardless of the programmed contour accuracy the feed rate of circular


interpolation is always limited by the machine protection element set by the
machine tool manufacturer, so that the permissible axis accelerations are not
exceeded during circle processing. Therefore, the machine protection element
may not allow high axis acceleration during the program execution despite an
increase of the K word value.

The programming of circular accuracy may be deactivated by a very high K value


(e.g., 100). In this case the machine protection element comes into effect.

3.8 G75, G76 Curvature


3.8.1 Curvature Activation
Syntax: G75

Example:
...
N20 G75
...
After a block with G75 the curvature function is active. The function is deactivated
with G8 and/or G9. The curvature function includes Look Ahead so when G75 is
active the Look Ahead function is also active.

The purpose of the function is to adjust continuously the velocity to the path
curvature when running so that the axes do not exceed a given limit of their
acceleration. The function approximates the G1 blocks with polynomials with a given
accuracy.

The polynomials are defined so that the transitions between two blocks will be
tangential. Depending on the curvature, a profile for the velocity is calculated to
ensure the given maximum radial acceleration is not exceeded. The maximum
allowed acceleration limit can be programmed with G76.

Part Programming Manual


page 84/352
MACHINEMATE

Additional Notes:
When the curvature function is active programming the contour accuracy with
G186 has no effect. Curvature cannot be activated during G95.

3.8.2 Curvature Acceleration Limit


Syntax: G76 Kxx

Example:
...
N20 G76 K70
...
The G76 K value specifies the percentage of the maximum acceleration that is
allowed for the radial acceleration. In the example, the K70 indicates that the
allowed radial acceleration is 70 percent of the maximum axis acceleration.

When G76 is not programmed the default value for the curvature acceleration is
used. (The default value comes from the Machine Parameter
CurvatureAcceleration.)

When the given accuracy limit for the polynomial interpolation is met then the
polynomial is modified so that it is just inside the accuracy limit. This leads to a
corner at the block transition and probably to a velocity at the block transition that is
below the velocity profile from the curvature. (The accuracy limit value comes from
the Machine Parameter CurvatureAccuracy.)

3.9 G04 dwell time


Syntax: G4 F...
The instruction Dwell time is programmed with the program word G04 together with
an F word. The dwell time in seconds is to be entered as sequence of digits in the F
word.

However, another unit of time can also be used, such as milliseconds. If the letter F is
expected to have a number of decimal places, usually 3, then the programmed dwell
time is usually configured to be in seconds (but with the time resolution to
milliseconds with those digits to the right of the decimal point). If the letter F syntax is
expected to have no decimal places then the programmed time is often configured to
be in milliseconds.

The maximum value is 99999. If dwell times longer than this are necessary, G04
blocks must be programmed the required number of times in sequence.

A dwell time has the effect that the next NC block is not executed before expiration of
the dwell time. Note that a feed hold (cycle stop) condition does not suspend a dwell,
only axis motion.

Part Programming Manual


page 85/352
MACHINEMATE

Example:
...
N50 X10
N60 G4 F500
N70 Y20
...
The programmed dwell time in block N60 has the effect that after processing of block
N50 a waiting time is inserted (in this case either 500 seconds or 0.5 seconds,
depending on the definition for the letter F syntax) before the next block (N70) is
processed.

3.10 Corner Smoothing


3.10.1 G-codes
Corner smoothing is achieved by using G-codes

G200 corner smoothing off


G201 R corner smoothing with a defined radius curve
G202 E corner smoothing with a defined corner deviation
G203 E...R corner smoothing with a defined radius up to a maximum deviation.

The first G-code is configurable with a machine parameter. Its default value is 200. The
three following G-codes (here G201 to G203) are assigned the numbers following the
first G-code.

Note that this feature works only with corners. In other words when the consecutive
blocks are G1 (linear interpolation) the corner smoothing G-codes (G201- G203) will
check the path. If either block (active block or next block) involves circular
interpolation (G2, G3, G12, G13) then the transition between the two blocks is not
affected by this feature (i.e., the corner is not smoothed or rounded). This feature
will round transitions only between G1 and/or G0 blocks since both of these modal G-
codes move the axes in an interpolated line.

3.10.2 Curvature radius R


The curvature radius is programmed using the letter R. If another letter must be used
because R is being used for another function its ASCII code can be changed in a
machine parameter. The value specified in a machine parameter is active after a control
reset until a curvature radius has been programmed.

3.10.3 Corner deviation E


The corner deviation E states the distance between the programmed corner and
the interpolated circular edge.

Part Programming Manual


page 86/352
MACHINEMATE

Figure 3-7: Corner deviation E

If the corner deviation should be programmed using a different letter, then its
ASCII code has to be entered in a machine parameter. The value specified in a
machine parameter is active after a control reset until a corner deviation has been
programmed.

3.10.4 Minimum block length


If blocks are programmed with a short path in relation to the programmed
curvature radius or the permitted corner deviation, cases can occur when the
insertion of a circular curve causes the neighboring NC blocks to become too
short or that even the insertion of the arcs becomes impossible as is shown in
the following example:

Figure 3-8: Curvature radius R


R programmed curvature radius
Block end points

A machine parameter defines the minimum path length that can be shortened.

An example case yields the following path:

Part Programming Manual


page 87/352
MACHINEMATE

Figure 3-9: Curvature radius R with a minimum path shortened


L minimal set length
R programmed curvature radius
end points for the block
__ programmed path
__ rounded path

The blocks that are shorter than the machine parameter value were halved.

3.10.5 Acceleration monitoring


A special acceleration monitoring is active during the active real-time radius
correction and corner smoothing.

This monitors the accelerations that occur on the corrected path as a result of
feed direction changes. The maximum permitted acceleration is the circular
acceleration defined by two machine parameters.

The path feed-rate is limited for blocks in which the permitted acceleration is
exceeded in such a way that it will just be maintained.

A simple example:

The D correction value is 100 mm.

The traverse block causes a movement of 1 mm in the X-direction on the X-


axis. The tool is located at the beginning of the block in the direction of the X-
axis. At the end of the block, the tool is positioned exactly 180 degrees
rotated in the reverse direction to the Y-axis. Within the block, the D
correction value turns therefore from the positive Z-direction into the opposite
negative Z-direction. This means that the working point moves approximate
around a semicircle of Z = -100 mm, Y = 0 to Z = +100 mm, Y = 0. The
acceleration monitoring limits the path feed in such a way that the permitted
circular acceleration on this circuit is not exceeded.

Part Programming Manual


page 88/352
MACHINEMATE

3.10.6 Minimum and maximum bend angle


The following drawing below shows the definition of the bend angle.

Figure 3-10: Curvature bend angle in a corner


Phi can take on values between 0 and 180 degree. The cosine of the maximum
half bend angle is specified by a machine parameter. In case of this parameter
being 0 then phi/2 is just 90 degrees or phi = 180 degrees. Corners whose
internal angle is greater than that being applied will not be rounded.

The sine of the minimum internal angle phi/2 is specified by a machine


parameter to define which corners will still be rounded. If the appropriate bit is
also set in this parameter then the corner will be moved around from the
outside using this angle.

3.10.7 The necessity of corner smoothing


With the corner smoothing function it should be possible to avoid corners that
occur in a sequence of linear blocks. In this way, a more convenient handling of
the 5-axis mill radius correction should also be made possible.

When processing a programmed path, a 3D mill radius correction takes place in


real-time for 5-axis machines. The correction occurs perpendicular to the current
tool orientation. During the definition of the correction required, only the parts of
the path of the linear axes are considered. This does not limit tool center point
(TCP) programming (G181 and G182) since, in this instance, the round axis does
not contribute to the path. Without an active transformation, the part of the path of
the round axis is not included.

At block transitions that are not tangential, the real-time mill radius correction
causes nominal value jumps. This is shown in the following diagram.

Part Programming Manual


page 89/352
MACHINEMATE

Figure 3-11: Corner smoothing and corner jumps


___ Uncorrected path
__ Corrected path

The corner smoothing function is necessary for avoiding these jumps.

3.10.8 Programming
The function has three different activation mechanisms.

These are specified by G200-G203 where G201, G202, G203 are for the
activation and G200 is for the deactivation. If only the activation code is
programmed then the corners being programmed in the currently work plane
level are rounded. In this case, corners created by movements out of the
current plane will not be rounded. If one wants to round corners oriented
freely in the used area, the three axes forming the spatial co-ordinate system
must be programmed with an arbitrary value in the activation block. The
individual G-codes are explained in the following text.

3.10.8.1 G201: Corner smoothing with a defined radius curve

The "corner smoothing with a defined radius curve" function is activated with
G201. A radius curve can be programmed using R.

This can be changed in the NC program as desired with the first programming
of G201. If no radius is programmed, the value that is specified in a machine
parameter will be used.

A block with activated corner smoothing could appear as follows:

N4711 G201 R10


activates corner smoothing with a defined curvature radius of 10 mm

Part Programming Manual


page 90/352
MACHINEMATE

3.10.8.2 G202: Corner smoothing with a defined corner deviation

A programmable corner deviation is used instead of the radius curve. This can also
be re-programmed in every block. The value specified in a machine parameter is
used as default value. An activation block would appear as follows:

N4711 G202 E47.11 X1 Y1 Z1


activates corner smoothing with a defined corner error in the coordinate system
formed by the X, Y and Z axes.

3.10.8.3 G203: Corner smoothing with defined curvature radius


and a maximum deviation

This is very similar to G201. G203 can program a corner error in addition to the
radius. This corner error is then interpreted as a maximum permissible corner
deviation. If smoothing is possible as defined by the programmed (or default)
radius curve without exceeding the programmed (or default) corner tolerance then
smoothing will take place using this radius curve. In the other case smoothing will
take place in such a way that the maximum tolerance is observed. Programming
should take place as follows:

N4711 G203 R10 E47.11


activates corner smoothing with a defined radius and a maximum corner error

The following diagram details the contexts just described:

Figure 3-12: Corner smoothing in G203


Block end points
___ Original path
__ Rounded path

Part Programming Manual


page 91/352
MACHINEMATE

3.10.8.4 Corner smoothing with 5-axis mill radius correction

Correction in all three linear axes is generally needed for mill radius correction
of an arbitrary path when moving in three dimensions. It is possible to make the
correction to the right and to the left of the path in the direction of milling.

The tool vector and the path tangents do not have be vertically oriented to each
other in order to obtain an unambiguous correction. The correction always
occurs vertically to the plane which is created by the path tangent and the tool
vector. This unambiguity is then missing if the tool vector and the path tangent
are parallel to each other or if the path tangent is zero.

The first case occurs only if one proceeds in the direction of the tool. In this
case, the old correction value is retained. The second case can arise through
sole movement of the round axes. In this instance, the old path tangent is used
but the new tool orientation is used to calculate the correction.

Programming of the real-time mill radius correction occurs with these


(configurable) G-codes.

G150 turns off the real-time mill radius correction


G151 correction takes place to the left of the path
G152 correction takes place to the right of the path

The mill radius is determined by a value stored in a D correction.

A simple programming example without the additional corner smoothing functionality:

N10 D7 invoke the 7th correction for D


N20 G151 X10 activate the real-time mill radius correction, approach the
corrected path
N30 X40
N40 G150 X60 deactivate the correction function
N50 M30

The activation of the correction function is also permitted without path information:
N10 D7
N20 G152
N30 G90
N40 G181
N50 X22
Entry into the corrected path occurs with a linear accumulation of the correction
value. Leaving the corrected path occurs with a linear removal of the correction
value.

Part Programming Manual


page 92/352
MACHINEMATE

A real-time mill radius correction without the function Corner Smoothing is generally
not usable since corners cannot be machined and speed jumps occur at all
changeover points between blocks causing the path curvature (spline - straight, circle
- straight, circle - circle) to change suddenly.

The primary purpose of the corner smoothing function is to generate bend-free paths
for the real-time radius correction and to ensure that the programmed feed-rate is
maintained on the corrected path. Therefore, the corner smoothing function with
active 5-axis mill radius correction deviates from the standard range of functions in
two ways:

A circle is inserted in internal corners in the plane formed by the corner that
ensures that the corner can be rounded without contour violation. A circle having
exactly a radius of the correction value is inserted resulting in a corner as for the
standard 2D radius correction if the tool is positioned vertically on the corner.
A circle with a negligible radius is inserted at the outer corners. Thus a circle with
the correction value is traversed using the real-time radius correction.
The programming of the real-time radius correction with Corner Smoothing appears, for
example, as follows:

N10 D7 invoke the 7th correction for D


N20 G203 X1 Y1 Z1 activate Corner smoothing
N30 G151 X10 Y0 activate the real-time mill radius correction,
approach the corrected path
N40 X40 Y0
N50 X40 Y40
N60 G150 X60 deactivate the correction function
N70 G200 deactivate corner smoothing
N50 M30

Figure 3-13: Real-time radius correction with corner smoothing

Part Programming Manual


page 93/352
MACHINEMATE

3.10.9 Problem case: angle too acute


Several problems arise if the angle is too acute:

the permitted corner deviation allows only a minimal radius curve.

the neighboring blocks are shortened due to the smoothing function causing
large errors in the corner.

smoothing takes place with a radius that is too small and together with real-time
radius correction an error results at the workpiece.

To solve this problem, the corner smoothing function can be preset so that starting
at a certain marginal angle the corners are rounded outside rather than inside. This
is demonstrated in the following diagram.

Figure 3-14: Corner smoothing with corners rounded outside not inside

3.10.10 Problem case: collision monitor with real-time mill


radius correction.
In contrast to the mill radius correction using G40 to G44, there is no collision
monitoring with the real-time mill radius correction. In this way various errors can
occur on the workpiece such as semi-enclosed inner chambers. Therefore, it must be
ensured that the programmed correction value can always be used without problems.

Furthermore, the path speed differs strongly from the programmed speed in places
where collisions occur.

Together with corner smoothing, this problem cannot occur as long as no splines or
circles are programmed since corner smoothing always inserts circles that do not
cause collisions.

Part Programming Manual


page 94/352
MACHINEMATE

4 Technological instructions
4.1 Influencing the feedrate
These instructions are in this section:

G94 feed rate is given as distance per minute

G95 feed rate is given as distance per spindle revolution

G63 override the feed rate override input with a defined percentage

G66 disable the temporary override and use the operator override input

B programmable acceleration factor

4.1.1 G94 Inches (Millimeters) per minute IPM/MMPM


Syntax: G94

When G94 is active, the F code is interpreted as inches (millimeters) per minute
feedrate.
G94 is cancelled by G95.

It is recommended that a G94 be programmed on the same line as the F code to


avoid confusion as to the active feedrate mode.

When changing feedrate modes, a new feedrate is required with either the G94 or
G95. The old F value cannot be used in the new feedrate mode.

4.1.2 G95 Inches (Millimeters) per revolution IPR/MMPR


Syntax: G95

When G95 is active, the F code is interpreted as inches (millimeters) per revolution
feedrate.
It is recommended that a G95 be programmed on the same line as the F code to
avoid confusion as to the active feedrate mode.

When changing feedrate modes, a new feedrate is required with either the G94 or
G95. The old F value cannot be used in the new feedrate mode. Before an axis will
move at the feedrate specified with the G95 the spindle must be turning (i.e., M3/M4)
because with the spindle stopped (i.e., M05) the effective feed rate in G95 is 0.0.

G08 must be active before G95 becomes active because G95 requires its own type
of look ahead processing as the feed rate follows the spindle rotation.

Part Programming Manual


page 95/352
MACHINEMATE

4.1.3 F word for feed rate


The feed rate (the path velocity) is programmed with an F word as distance/min
(when G94 is active) or as distance/rev (when G95 is active). The unit of distance is
millimeters (when G71 is active) or inches (when G70 is active).

Example:
F2000 means: Feed rate 2000 mm/min (when G94 and G71 are active)

A feed rate not equal to 0 must be programmed for all types of interpolation
unless positioning in rapid traverse (G00), programmable homing (G74) or thread
cutting (G33, G34). At G00, the pre-defined rapid traverse velocity becomes
active.

A programmed feed rate is modal. It is valid until a new feed rate is programmed
or until the feedrate mode is changed (G94/G95).

A programmed feed rate and the rapid traverse velocity can be changed by the
feed override (see 4.1.1.2 Feed override).

Additional Notes:
During control reset, F is set to 0. An F word must be programmed in the first motion
block of a program (or in a preceding block). This is not valid however for programs
which are to be processed as subroutines only. In subroutines, the fact that the F
word is missing offers a certain protection against the subroutine being started as a
main program. If the F word is missing, the error message 199 appears and the
program is not executed.

A dwell time is programmed through F in connection with the instruction G04 (see 3.8
G04 Dwell time).

4.1.4 G63, G66 Feed override


Syntax
G63 F... Feed override ON
G66 Feed override OFF
A feed override is a percentage change of the programmed feed rate. The
MACHINEMATE can distinguish between two different feed overrides:

A manually adjusted feed override (on the machine tool, usually a rotary switch)

A programmed feed override

In the operating modes MANUAL and AUTOMATIC, the programmed feed rate (SET
value), the override in %, the momentarily actual effective feed rate and the
interpolation velocity of the CNC (ACTUAL value) are displayed in the FEED window.

Part Programming Manual


page 96/352
MACHINEMATE

A feed rate influenced by an override can therefore be read directly from the monitor
for program optimization.

Important: Feed override and spindle override cannot be adjusted with the user interface,
but only with this part program technique or an external override switch.

Programming a feed override


A feed override is programmed with an F word in a G63-block. The value of the F
word (in %) must be an integer between 1 and 120. A feed override programmed with
G63 has precedence over the feed override adjusted at the machine tool. However, if
the feed override rotary switch on the machine tool is turned to 0%, then this setting
always has precedence over a programmed feed override. Thus it is always possible
to stop the movement of the axes by reducing the feed override to 0%.

A feed override programmed with G63 can be deactivated by the instruction G66.
G66 simultaneously activates the feed override, which is set at the feed rate override
switch on the machine tool.

If no feed override was programmed with G63, the feed override adjusted on the
machine tool is active.

If no F word is programmed in a G63 block, the axes are positioned with the feed rate
programmed in the NC program. If a feed override has already been programmed in
a preceding G63 block using an F word and this has since been deactivated, this
previously programmed feed override becomes effective again.

Example:
N10 G66 The feed override adjusted at the machine tool is activated.
...
N50 G63 The feed override adjusted at the machine tool is deactivated. The axes
are positioned with the feed rate programmed in the NC Program.
...
N100 G63 F55 The feed override is set to 55%; i.e., the axes are positioned at 55% of
the programmed feed rate.
...
N200 G66 The programmed feed override is rendered ineffective; the feed override
adjusted at the machine tool is activated.

...
N300 G63 Same effect as N100.

Additional Notes:
Feed overrides are effective both on the programmed feed rate as well as on the
rapid traverse velocity. During execution of G00 rapid traverse, the feed override
is limited to 100% max.

Part Programming Manual


page 97/352
MACHINEMATE

Feed rate override values not equal to 0 have no effect on G74-blocks


programmable homing or G33 or G34 blocks thread cutting.

4.1.5 Programmable acceleration


Syntax: B... ...
The function programmable acceleration enables the reduction of the axis
acceleration with respect to the preset maximum value. The term acceleration means
any increase or decrease in velocity.

Application:
A reduction of the preset maximum acceleration is sometimes necessary (e.g., if the
load on certain components such as laser optics has to be limited).

Programming:
The acceleration is programmed with the axis address B and a value (as a %)
between 1 and 100 without decimal places.

The programmed percentage value relates to the maximum admissible


acceleration.

A programmed acceleration is modal. It can be changed through the


programming of a new B word with another value. A programmed acceleration is
overridden by control reset.

Example:
The preset maximum admissible acceleration is reduced to 25% of its value and the
acceleration time or braking time is quadrupled.

...
N20 B25
N30 G1 X10 Y15
...
The programmed value affects all axes.

Additional Notes:
When inputting values larger than 100 or values that would result in an
acceleration time of more than 32 seconds, the error messages 212 or 110,
respectively, appear.

If Look ahead is active, the acceleration can be limited using the instruction
programmable acceleration. This instruction causes a leveling of the
accelerations when Look Ahead is active.

The function Programmable Acceleration is optional and not available in all


controls.

Part Programming Manual


page 98/352
MACHINEMATE

4.2 Spindle Control


These instructions are in this section:

S programmed spindle speed

M03 spindle is on, turning clockwise at programmed spindle speed

M04 spindle is on, turning counter clockwise at programmed spindle speed

M05 spindle is off (or stopped)

M19 spindle is oriented to a programmed position (S, in degrees)

G63 override the spindle speed rate override input with a defined percentage

G66 disable the temporary override and use the operator override input

G92 limit the spindle speed

G96 constant surface speed (as surface feet/min or surface meter/min)

G97 spindle turns at programmed speed (S), disables G96

4.2.1 S Word
The spindle speed in revs/min is programmed with an S word.

A spindle override can be programmed with an S word together with the instruction
G63 (see 4.2.4 G63, G66 Spindle override). A limitation of the spindle speed can be
programmed with G92 (see 4.2.5 G92 Spindle speed limitation). The direction of
rotation of the spindle is determined by M-codes (see 4.2.2 M03, M04 Spindle ON,
clockwise or counter-clockwise).

The S is also used for the orientation with M19 (as the number of degrees). This S in
an M19 block does not change the modal spindle speed, so an M03 S before an M19
followed by just an M03 in a later block will return to the previously modal spindle
speed.

4.2.2 M03, M04 Spindle ON, Clockwise or Counter-Clockwise


Syntax:
M03... Spindle ON (clockwise)
M04... Spindle ON (counter-clockwise)
The direction of spindle rotation is programmed and the spindle switched on with the
instructions M03 and M04. The instruction M03 causes a clockwise spindle rotation;
the instruction M04 causes a counter-clockwise spindle rotation. The directions

Part Programming Manual


page 99/352
MACHINEMATE

clockwise and counter-clockwise are as viewed looking away from the spindle
towards the working area.

4.2.3 M05 Spindle OFF


Syntax: M5...
A spindle halt is programmed with the instruction M05. Spindle speed is set to 0.

4.2.4 M19 Spindle Orientation


Syntax: M19 S...
A spindle orientation is programmed with the instruction M19. The orientation for the
spindle is set with the S-code, which ranges from 0 to 360 (i.e., in degrees).

The S is required as it defines the target orientation.

4.2.5 G63, G66 Spindle Override


Syntax:
G63 S... Spindle override ON
G66 Spindle override OFF
The term spindle override is a proportional change of the programmed spindle speed.
The MACHINEMATE can distinguish between two different spindle overrides:

the manually adjusted spindle override (on the machine tool, usually a rotary
switch)

A programmed spindle override

In the operating modes MANUAL and AUTOMATIC, the programmed spindle speed
(SET value), the override in % and the momentarily actual effective speed rate
(ACTUAL value) are displayed in the window SPINDLE. A spindle speed influenced
by an override can therefore be read directly from the monitor for program
optimization.

Important: Feed rate override and spindle override cannot be adjusted with the user
interface, but only with this part program technique or an external override
switch.

Programming a Spindle Override


A spindle override is programmed in a G63 block with an S word. The value of
the S word (in %) must be an integer in the range of 50 to 120. A spindle override
programmed with G63 has precedence over the spindle override adjusted on the
machine tool.

Part Programming Manual


page 100/352
MACHINEMATE

A spindle override programmed with G63 can be deactivated by the instruction


G66. G66 simultaneously activates the spindle override switch on the machine
tool.

If no spindle override was programmed with G63, the spindle override adjusted
on the machine tool is active.

If no S word is programmed in a G63 block, the spindle is rotated with the speed
programmed in the NC program. However, if a spindle override has already been
programmed in a preceding G63 block using an S word and this has since been
deactivated, then the previously programmed spindle override becomes effective
again.

Example:
N10 G66 The spindle override adjusted at the machine tool is activated.
...
N50 G63 The spindle override adjusted at the machine tool is deactivated. The
spindle rotates with the speed programmed in the NC program.
...
N100 G63 S60 The spindle override is set to 60%. The spindle rotates at 60% of the
programmed spindle speed.
...
N200 G66 The programmed spindle override becomes ineffective, the spindle
override which was set at the machine tool is activated
...
N300 G63 Same effect as N100.

Note: Spindle overrides have no effect on G74 blocks (programmable homing) and
G33 or G34 blocks (thread cutting).

4.2.6 G92 Spindle speed limitation


Syntax: G92 S...
A spindle speed limitation can be programmed with the instruction G92 together with
an S word. The value of the S word indicates the maximum speed in rev/min. If a
speed change occurs during program execution while speed limitation is active, the
change is only executed as long as the programmed maximum speed is not
exceeded.

Application:
A speed limitation can sometimes be necessary:

When using tools with a prescribed maximum speed.

With certain work pieces, to avoid overloading the drives.

Part Programming Manual


page 101/352
MACHINEMATE

When using a chuck without compensation for the centrifugal force. The speed
should then be limited for safety reasons to a value at which a sufficient tension
is still guaranteed.

4.2.7 G96 Constant Surface Speed (Feet/Meter)


Syntax: G96 S...
G96 provides constant SFM/SMM operation allowing direct programming of the
desired SFM/SMM with the S letter address. The constant surface speed feature is
sometimes called CSS.

When G96 is used, a maximum RPM constant should be entered in the program prior
to the first G96; (G92 Sxxxx) if not, the maximum RPM for the machine is used.

When moving X in toward the center of the spindle, the RPM will only be updated
until either the machines maximum RPM is reached, or the maximum RPM
constraint (G92 Sxxxx) is reached. For correct CSS operation, X0.0 must be the
center of the spindle.

When either limit is reached, the spindle operation will be straight RPM.

SFM/SMM operation will again function once the tool position causes the control to
calculate an RPM less than either of the limits.

Do not position the X-axis at high feedrates in the G01 mode during G96 operation.
The spindle drive may not be able to react fast enough and may cause a fault.

Note that a spindle gear change cannot be performed during the G96 mode. The
correct spindle gear range must be defined before the G96 block. If the axis motion
requires the spindle speed to exceed a limit of the current range then the speed (and
so the feedrate) is clamped there, at that limit in the range (minimum or maximum). If
the machine has more than one spindle gear range and if the G96 is programmed
without an explicit gear range declaration (i.e., M41 to M46) then error 871 results.
The gear range must be explicitly declared prior to the G96, if a gear selection is
possible, because the G96 will not change spindle gear ranges based on the varying
spindle speed as it maintains the CSS. If there are no spindle gear ranges then this
M-code requirement does not apply.

4.2.8 G97 Revolutions per minute


Syntax: G97 S...
G97 provides direct RPM operation allowing the desired RPM to be programmed as
an S value. This cancels the G96 mode.

Part Programming Manual


page 102/352
MACHINEMATE

4.2.9 Reversal of rotation at M19, spindle orientation


An internal setting can be made for spindles with feedback if the rotation direction for
reaching the programmed position can be reversed. The spindle position control loop
will be closed after the deceleration of the spindle and the reaching of the "spindle
stop rpm". The programmed position will be reached using shortest distance.

Depending on the position when reaching "spindle stop rpm", a reversal of the
rotation can result. It is possible for spindles with only one direction to be set-up so
that a reversal of the rotation is not allowed. In this case, the spindle rotates after
reaching the "stop rpm" in the present direction to the position so the programmed
position might not be reached using the shortest distance.

Part Programming Manual


page 103/352
MACHINEMATE

4.3 Tool compensation functions


Even with flawless preparation of the part programs, devices, tools etc., it is
necessary to make corrections in the processing to compensate for a worn tool. Two
types of tool compensations are stored and processed:

Tool radius compensation (associated axis address D),

Tool length compensation (associated axis address H).

The two types of compensation values are assigned their own compensation value
memories in the control. The size of this memory and therefore the number of
compensation values that can be stored are preset. The corresponding values can
be taken from the documentation of the machine tool manufacturer.

4.3.1 Tool radius compensation


With tool radius compensation, the radius of the tool employed can be taken into
account during processing using the function path compensation (see 5.1.1 G40-G44
Path compensation). The radius compensation memory contains the tool tip radius.

Figure 4-1: Tool tip radius compensation for rotating tools

4.3.1.1 Input of tool radius compensation values

There are three ways in which values of the tool tip radius compensation memory can
be set Manually, By Allocation in a Cycle Block, and By Loading a File Which
Contains the Required Values, as follows:

Manually:

Select Alt D: Data F1: Data Selection F4: Path Comp. D

Select Alt D: Data F5: Modify

Part Programming Manual


page 104/352
MACHINEMATE

Select the memory location, whose value is to be changed. (The memory


location now appears in the input window. Here the old value can be deleted with
the BACKSPACE key and a new value entered.)

Click onto the OK field or press the RETURN key.

These inputs are now stored in the compensation value memory of the
MACHINEMATE and are displayed on the monitor in the upper window by 1)
allocation in a cycle block (see Chapter 6, General Cycle Programming), or 2) loading
a file which contains the required values. Here a certain file format must be
observed, which is similar to the file format for part programs:

<lf>
% <lf>
DTABXX <lf> Correction value table number
D001=+00000.000 <lf>
.
.
.
<ETX> File end character
Notes:
<cr> <lf> can also be used instead of <lf>.

The file end character (in the above display <ETX> =03H) can be preset.

xx is a two-digit table number.

4.3.1.2 Calling up tool radius compensation values

Tool radius compensation values are selected with the axis address D and the
number of the desired compensation value memory.

Example:
...
N30 G1 X5 Y0 D4
...
Here, in the block N30, the content of the fourth radius compensation value memory
is selected. This value is used for the function path compensation.

A previously selected radius compensation value is deactivated by:

The selection of another compensation value memory

Programming D0

Notes:

Part Programming Manual


page 105/352
MACHINEMATE

Active tool radius compensations are displayed in the window compensations in


the operating mode INFORMATION.

With spline interpolation a connection exists between the radius compensation


value memory number and the method used for the path compensation (see
5.1.1 Path compensations).

4.3.2 Tool length compensation values


Tool length compensation enables for compensation between the difference of the
pre-defined and the actual tool length. The tool length compensation memory
contains the length of the tool in the direction of approach with respect to a tool
reference point (see Figure 4-2).

Figure 4-2: Tool length compensation for rotating tools


In addition, the length compensation value memory can be preset to contain a
second value for each compensation value. This second value enables a
compensation parallel to, and in the direction of, another axis. Thus the outreach of a
tool can be taken into account.

Figure 4-3: Tool length compensation for fixed tools

Part Programming Manual


page 106/352
MACHINEMATE

4.3.2.1 Input of tool length compensation values

Manually:

Select Alt D: Data F1: Data Selection F2: Length Comp. H

Select Alt D: Data F5: Modify

Select the memory location whose value is to be changed. (The memory location
now appears in the input window. Here the old value can be deleted with the
BACKSPACE key and a new value entered.)

Click onto the OK field or press the RETURN key.

These inputs are now stored in the compensation value memory of the
MACHINEMATE and are displayed on the monitor in the upper window by 1)
allocation in a cycle block (see Chapter 6, General Cycle Programming), or 2) loading
a file which contains the required values. Here a certain file format must be
observed, which is similar to the file format for part programs:

<lf>
% <lf>
HTABXX <lf> Compensation value table number
H001X=+00000.000 Y=+00000.000 <lf>
.
.
.
<ETX> File end character

Notes:
<cr> <lf> can also be used instead of <lf>.

xx is a two-digit table number.

The axis addresses of the axes that are preset for length corrections must also
be entered. If only one axis is preset for length corrections, then only one value
per line can be entered and this must also be accompanied by the axis address.

4.3.2.2 Calling up tool length compensation values

Tool length compensation values are selected with the axis address H and the
number of the desired compensation value memory.

Example:
...
Part Programming Manual
page 107/352
MACHINEMATE

N30 X2 Y1 H2
...
Here, in the block N30, the content of the second length compensation value memory
is called up and is consequently taken into account when positioning the axes
(maximum of 2) which have preset length compensation.

A previously selected length compensation value is deactivated by:

The selection of another compensation value memory

Programming H0

Notes:
Tool length compensations should be deactivated at the end of the program with
H0.

Active tool length compensations are shown on the axis display during the
execution of the program (operating mode "AUTOMATIC" and "MANUAL" and in
the window compensations in the operating mode "INFORMATION").

4.3.3 Tool or turret selection


The part program will typically specify the tool number or the turret position to be
used in the machining process.

The syntax for either (tool number or turret position) is simply a T followed by the
number.

4.3.3.1 Lathe Turret Position Number

For a lathe, the T-code defines the next turret position. The block with the T-code
expects the turret to be rotated to that turret position.

The block identifying the new turret position will often include its accompanying
tool compensation codes, as required, as in:

N150 T5 D5 H5

Alternately, the D and H codes will be in the part program as needed. The D-code
is not required until a G41 to G44. The H-code is required before or with the next
axis motion that requires the tool length compensation (usually both X and Z
axes).

Part Programming Manual


page 108/352
MACHINEMATE

4.3.3.2 Milling Tool Number

For a milling machine, the T-code defines the next tool number. There are many
different approaches to tool management in milling applications. The most
common:

1) Fixed location tooling


2) Variable location tooling
3) Manual tooling

A block after the new tool is in the spindle will include its accompanying tool
compensation codes, as required, as in:

N150 T5 M6
N160 G0 X10 Y10 Z20 D5 H5

Alternately, the D and H codes will be in the part program as needed. The D-code
is not required until a G41 to G44. The H-code is required before or with the next
axis motion that requires the tool length compensation (usually the Z-axis).

4.3.3.2.1 Fixed location tooling

With fixed location tooling, each tool is assigned a particular location (or pocket) in
the tool storage, often called the tool magazine. Each time a new tool is selected,
the previous tool is returned to its original pocket and then the new tool is moved
from its pocket to the spindle.

The M-code M06 will accompany the T-code in the same block to indicate to the
PLC that a tool change is required.

Example:
N10 T1 M6 get tool T1 from pocket 1
...
N120 T5 M6 return T1 to its pocket 1,
get tool T5 from pocket 5
...
N540 T3 M6 return T5 to its pocket 5,
get tool T3 from pocket 3

The tool change sequence will take several steps:


1) move the magazine to the correct pocket for the spindle tool (or just check
that it is still there)
2) move the tool from the spindle to its original pocket
3) move the magazine to the pocket with the next tool, just selected by the part
program
4) move the tool from its pocket to the spindle

The special T-code of T0, with the M6, is sometimes used to indicate to the PLC
that the tool in the spindle should be returned to its location in the tool magazine
but another tool is not selected to replace it in the spindle.

Part Programming Manual


page 109/352
MACHINEMATE

4.3.3.2.2 Variable location tooling

With variable location tooling, each tool is assigned a particular number and it is
loaded into an appropriate location or pocket in the tool magazine. The operator
will update the CNC tool table with the correct tool numbers and pocket numbers.

Each time a new tool is selected, the previous tool is returned to the pocket for
this new tool while this new tool is moving from that pocket to the spindle.
Essentially, at each tool change, the new tool is swapped with the previous tool.
Over time (and after tool changes) the various tools will migrate among positions
within the tool magazine.

With this tool management scheme, the M-code M06 indicate to the PLC that a
tool change is required. A previous block would have identified the T-code for
which tool should go into the spindle. This coding is sometimes called the tool
preselect, because the tool is identified for its eventual movement into the spindle
but it is not moved to the spindle at that time.

The tool preselect is done in the program so that the tool is picked up by the PLC
prior to the actual tool exchange. This approach decreases the time when the part
program is not cutting because the interruption to the part program is just the time
for the tool exchange. With the first variation above (fixed location tooling) each
tool change (M06) requires several mechanical motions, including one or two
moves of the tool magazine. For this approach, the tool change sequence is
different:

1) Swap the tools move the tool that is waiting into the spindle at the same
time that the tool in the spindle is coming out.
2) Move the tool just taken from the spindle into the current pocket of the tool
magazine.

Since the tool is in the spindle after the completion of step 1, the part program can
resume execution with the next block at its conclusion. The program does not
have to wait for the completion of step 2. This approach minimizes the chip to
chip time of the spindle but it also requires a mechanical tool change
configuration that allows this swap of two tools. The mechanical tool change
configuration is typically simpler for fixed location tooling than it is for variable
location tooling.

Example:
N10 T1 move the magazine to the pocket with T1,
move it from the pocket into the tool change
mechanism
...
N120 M6 put T1 into the spindle,
get the tool that was in the spindle
put that tool into the pocket that had T1
...
N140 T3 move the magazine to the pocket with T3,
move it from the pocket into the tool change
mechanism
...
N640 M6 put T3 into the spindle,
get the tool that was in the spindle
put that tool into the pocket that had T3

Part Programming Manual


page 110/352
MACHINEMATE

The special T-code of T0, with the M6, is sometimes used to indicate to the PLC
that the tool in the spindle should be returned to a location in the tool magazine
but another tool is not selected to replace it in the spindle. With this approach, the
pocket to receive this tool is not predictable. The only requirement is that the CNC
find an empty pocket for the tool. If the operator is running with the maximum
number of tools (i.e., one more than the tool magazine capacity, so that every tool
change is a swap and there are no spare locations) then the T0 will not be
possible.

4.3.3.2.3 Manual tooling

With manual tooling (usually in a milling application; unusual for turning), the T-
code, if any, identifies the tool number for any tool change.

Example:
N10 M0 (MSG,T1) operator manually puts T1 into spindle
...
N120 M0 (MSG,T5) operator manually puts T5 into spindle
...
N540 M0 (MSG,T3) operator manually puts T3 into spindle

The M0, the operator stop M-code, stops the part program. An operator message
can be provided with the M0 in the block, using (MSG, . . . ) to identify the
message to be displayed when this M0 becomes active.

With manual tool management, there is usually no need to even use the T-code in
the part program because the operator is managing the tooling, rather than the
CNC picking the desired tool from a tool magazine.

Part Programming Manual


page 111/352
MACHINEMATE

4.4 Advanced Regulation Technology (ART)


4.4.1 Application
The goal of ART is to eliminate the path inaccuracies that result from the lag (or the
position following error) of the axes. As a result of the programming of ART (which is
a process that allows the control to monitor the performance of the axes) the axes will
follow exactly the programmed path and the actual acceleration of the axes will be
set to the commanded acceleration.

The procedure for the programming of ART is described in the MachineMate Start Up
Manual section 15. The ART programming is in that manual, not in this NC
Programming manual, because ART is part of the control start up activities. There
are three optimizations that are run during the process of ART: optimizing the axis
velocities, optimizing the axis accelerations and optimizing the changing in
accelerations. Each optimization consists of running a part program that exercises
the machine, enabling the CNC to monitor the axis performance under defined
circumstances. The respective part programs are also described in the Start Up
Manual. None of these ART programming sequences will be applied within a normal
part program.

The G-codes used for ART programming are G160 to G164.

Part Programming Manual


page 112/352
MACHINEMATE

5 Geometric instructions
5.1 General geometric instructions
These instructions are in this section:

D programmed path compensation value

G40 path compensation is off (no cutter diameter/radius compensation)

G41 path compensation is on, to the left of the programmed path

G42 path compensation is on, to the right of the programmed path

G43 path compensation is on, to the left of the programmed path, with an
altered approach

G44 path compensation is on, to the right of the programmed path, with an
altered approach

G53 cancel part zero offset

G54 to G59 activate that part zero offset (there are six sets)

G70 linear dimensions are all in inch format

G71 linear dimensions are all in millimeter format

G90 dimensions are in absolute coordinates

G91 dimensions are incremental distances from the current positions

G92 set axis part coordinate (or cancel such an offset)

G14 polar coordinate programming as absolute coordinates

G15 polar coordinate programming as incremental distances

G16 definition of the pole point for polar coordinate programming

Part Programming Manual


page 113/352
MACHINEMATE

5.1.1 G40-G44 Path compensations


Syntax:
D... ... Selection of the path compensation value
G40... Path compensation OFF
G41... Path compensation left of the work piece contour
G42... Path compensation right of the work piece contour
G43... Path compensation left of the work piece contour with altered
approach
G44... Path compensation right of the work piece contour with
altered approach
5.1.1.1 Necessity of path compensations

Most NC programs are written for tool travel movements. The travel movements can
be programmed relative to:

The work piece contour

The milling cutter center path for a "standard tool (a tool with specified
dimensions).

If the dimensions of the tools are not considered during program execution, the tool
travel movements can have different effects on the work piece contour depending on
the tool actually used. This is illustrated in the following figure:

Figure 5-1: Effect of different tool radii on the work piece contour.

From this illustration it is clear that:

When using a milling cutter with relatively small radius (A) less material is
removed from the work piece than when using a milling cutter with relatively large
radius (B) when executing the same NC program with identical milling cutter
center path.

Part Programming Manual


page 114/352
MACHINEMATE

Such a dependence of the finished contour of the work piece on the tool
dimensions is undesirable. To avoid this dependence, G-codes are available for
so-called path compensations. If these G-codes are activated during execution,
the tool will move on a path that has a constant distance to the programmed
contour, according to size and dimensions.

Depending on the tool used, the distance is calculated by the MACHINEMATE so


that the work piece is produced exactly to the desired dimensions.

The path on which the tool moves and which always has a constant distance to
the work piece contour is called an equidistant.

To be able to determine the equidistant on which the tool must be positioned, the
control requires, among other things, the data of the used tool and input as to
whether the equidistant must lie in motion direction left or right of the work piece
contour (see Figure 5-2).

Figure 5-2: Equidistant left and right of the work piece contour

The active plane (selected with G17-G20) is always the decisive factor. The path
compensation always takes place in the active plane. To determine whether the path
compensation should be made in motion direction left or right of the work piece
contour, look in the negative direction of the axis that is perpendicular to the active
plane. The control takes the tool data from the tool tip radius compensation memory.
It is either entered into the CNC control during set-up using the set-up sheet or read
in. If the program is written based on the work piece contour, the path compensation
value is the radius of the tool.

If the program is written based on a standard tool, the path compensation value is the
deviation of the radius of the tool actually used from the standard tool radius.
Part Programming Manual
page 115/352
MACHINEMATE

5.1.1.2 Path compensation, intersection point positioning

Assume the work piece contour is programmed and path compensation is active
during block processing. The positioning is then made on an equidistant to the
programmed contour. At block transitions, the intersection point of the extended
equidistant paths of the block currently being processed and the next block is moved
to and stopped at. If no intersection is obtained, linear intermediate blocks are
produced. See Figure 5-3, 5.1-4 and 5.1-5 for examples of the intersection position.

Figure 5-3: Path compensation at the block transition Straight line/Straight line

Part Programming Manual


page 116/352
MACHINEMATE

Figure 5-4: Path compensation at the block transition Straight line/Circular arc

Part Programming Manual


page 117/352
MACHINEMATE

Figure 5-5: Path compensation at the block transition circular arc/circular arc

5.1.1.3 Programming path compensations

Path compensations are activated with the instructions G41 to G44 as follows:

If equidistant is in tool motion direction left of the work piece contour, the path
compensation is programmed with the instructions G41 or G43 (see Figure 5-2).

If the equidistant is in tool motion direction right of the work piece contour the
path compensation is programmed with the instructions G42 or G44 (see Figure
5-2).

The path compensation is deactivated with the instruction G40, by D0 and by


selection of a tool compensation value that contains the value 0.

The control requires the exact dimensions of the current tool for the
determination of the equidistant path. These dimensions are stored in the tool tip
radius compensation memory. These compensation values are activated with the

Part Programming Manual


page 118/352
MACHINEMATE

address character D together with the number of the desired compensation value
memory.

Negative compensation values are also possible. G41 with a negative


compensation value is equivalent to G42 with a positive compensation value of
the same amount. G42 with a negative compensation value is equivalent to G41
with a positive compensation value of the same amount.

The call up of the compensation values and the activation of the path
compensation can be programmed in different NC blocks (example A) or in the
same NC block (example B).

The instructions G41 and G43 and the instructions G42 and G44 each differ when
applied to approach behavior of the axes (see following topic titled Approach and
retreat behavior of the axes).

Example A:
N10 D7 Call up the 7th tool tip radius compensation
value from the compensation value memory
N20 G41 Activation of the path compensation (equidistant
left of the work piece contour)

Example B:
N10 G41 D2 Call up the 2nd tool tip radius compensation
value from the compensation value memory and
activation of the path compensation (equidistant
left of the work piece contour)

5.1.1.4 Approach behavior of the axes

The positioning block after the activation of a path compensation is called the
approach block. If a path compensation is programmed along with a positioning
instruction in the same block, this block is designated as an approach block.

If a path compensation is activated with G41 or G42, a move is first made to the
intersection of the equidistant of the approach block and the next block. If the
approach block is one with linear positioning instructions, the intersection is moved to
in a linear path. If the approach block is one with circular positioning instructions, the
intersection is moved to on a spiral path.

Example of approach using G41 to move to intersection on a linear path


(see Figure 5-6)
N10 G1 X10 Y2 F1000
N20 G41 D2
N30 X14 Y10
N40 X20

Part Programming Manual


page 119/352
MACHINEMATE

Figure 5-6: Move to intersection on a linear path

Example of approach using G41 to move to intersection on a spiral path


(Figure 5-7)

N10 G1 X1 Y1 F1000
...
N40 Y2
N50 G41 D1
N60 G2 X2.5 Y3.5 I1.5
N70 G1 X5
...

Part Programming Manual


page 120/352
MACHINEMATE

Figure 5-7: Move to intersection on a spiral path

An altered approach of the equidistant path is enabled with the instructions G43 or
G44. After programming G43 or G44 the starting position of the equidistant path of
the next block is moved to. This starting position is offset perpendicular to the
programmed tool path.

It is important that the instructions G43 and G44 are programmed in a single
positioning block. If this is not done these instructions have the same effect as G41 or
G42.

Example of path compensations G41 and G43:


...
N10 G1 X1.5 Y0
N20 G41 D1 X4 Y2 and/or N20 G43 D1 X4 Y2
N30 X3 Y5
N40 X7
...

Part Programming Manual


page 121/352
MACHINEMATE

Figure 5-8: Comparison of path compensations G41 and G43.


From the illustration it is clear that when programming with G41 the desired work
piece contour would not be achieved exactly.

Additional Notes:
The instructions G43 and G44 differ only in the approach behavior from G41 and
G42. There is no difference when moving away.

The first NC block with a positioning instruction after the deactivation of a path
compensation with the instruction G40 is called a retreat block. If G40 is
programmed along with a positioning instruction in the same block, this block is
designated as a retreat block.

The equidistant path is quit either linearly or on a spiral path at the intersection of
the equidistant of the last block with path compensation and the equidistant of
the retreat block.

Part Programming Manual


page 122/352
MACHINEMATE

5.1.1.5 Retreat behavior of the axes

Example of retreat on a linear path


...
N20 G41 D1
N30...
N40 G1 X20 Y30
N50 X30 Y10
N60 G40 X40
...

Figure 5-9: Retreat on a linear path

Part Programming Manual


page 123/352
MACHINEMATE

Example of Retreat on a spiral path


...
N40 G41 D1
...
N70 X5 Y2
N80 G3 X9 Y2 I2 J2 DO
...

Figure 5-10: Retreat on a spiral path

After deactivation of the path compensation with the instruction G40 the tool can be
led back again to the previous equidistant path by reprogramming G41 and G43 or
G42 and G44 without changing the compensation value.

A deactivation of the compensation value is possible by programming D0 or by the


selection of a compensation value memory with the contents 0.

Part Programming Manual


page 124/352
MACHINEMATE

5.1.1.6 Intermediate blocks

If the equidistants of two successive positioning blocks do not intersect, the


MACHINEMATE automatically generates up to three linear intermediate blocks.
Positioning is then made to these intermediate blocks at the transition of the two
positioning blocks.

Example 1 of generation of intermediate blocks:


...
N30 G41 D1
N40...
N50 G1 Y4
N60 G3 X6 Y0.5 I3.5
...

Figure 5-11: Generation of intermediate blocks, example 1

Part Programming Manual


page 125/352
MACHINEMATE

Example 2 of generation of intermediate blocks:


...
N30 G41 D1
N40...
N50 G1 X4 Y4
N60 G3 X7 Y1 I3
...

Figure 5-12: Generation of intermediate blocks, example 2

Part Programming Manual


page 126/352
MACHINEMATE

Example 3 of generation of intermediate blocks:


...
N30 G41 D1
...
N50 G3 X5 Y3.5 J3
N60 X8 Y0.5 I3
...

Figure 5-13: Generation of intermediate blocks, example 3

Part Programming Manual


page 127/352
MACHINEMATE

5.1.1.7 Angle cut off

If the intersection of two equidistants lies very far away from the programmed point, a
disproportionately long motion path would have to be traveled to reach this
intersection.

In such cases where the angle included by the two equidistants is less than a preset
value, the tool motion path is shortened. Instead of moving to the intersection of the
equidistants, the positioning is carried out according to a linear intermediate block.

Example of angle cut off:


...
N30 G41 D1
...
N50 X3 Y5
N60 X4 Y1
...

Figure 5-14: Angle cut off

Part Programming Manual


page 128/352
MACHINEMATE

5.1.1.8 Path Compensations at spline interpolation

Two different types of path compensations are possible with spline interpolation, end
point radius compensation and real-time radius compensation. The number of the D-
compensation dictates which of the two possibilities is used.

End point radius compensation is used below a determined D-number. Real-time


radius compensation is used above a determined D-number. This partition of D-
compensations can be preset. For details see the Start Up Manual or the control
manufacturer's documentation.

End Point Radius Compensation


The bisector of the angle between the straight connecting lines drawn between the
programmed end points is calculated. The compensated end point is then the point
on the bisector that is exactly the distance D from the programmed end point. The
only exception to this is the formation of the first and the last spline point.

The compensated points in this case are formed by the intersection point between
the straight connecting lines and the preceding, or following, contour element
(straight line or circle). This means that in these two cases the distance of the
compensated point from the programmed end point is larger than the compensation
value.

The compensated end points form the spline construction points for the calculation of
the compensated path. Therefore, the compensated path between the block end
points does not run exactly equidistant to the original path.

Figure 5-15: End point radius compensation

Real-Time Radius Compensation


Here the path compensation is made in real-time perpendicular to the spline contour
running through the uncompensated block end points (the actual layout of the
determined points is much denser than is implied in Figure 5-16.)

Part Programming Manual


page 129/352
MACHINEMATE

With real-time radius compensation the average distance between the compensated
and the uncompensated path is equal to D. There is no increase at the block ends as
can be the case with end point radius compensation. However, processing of narrow
internal contours with real-time radius compensation can lead to insufficient material
being removed (see Figure 5-17).

Figure 5-16: Real-time radius compensation

Figure 5-17: Insufficient cutting of internal contours with real-time radius


compensation

Part Programming Manual


page 130/352
MACHINEMATE

5.1.1.9 Path velocity deviations

When path compensation is active, deviations of the path velocities resulting from the
program can occur during program execution. Deviations can occur because the
programmed path velocities relate to the programmed path (without path
compensation) or the tool cutting point (with active path compensation). However,
path compensations have the effect of not allowing the center of the milling cutter to
move along this path, but rather along an equidistant. Therefore, the center of the
milling cutter must be positioned depending on the contour on either a longer path
(e.g., during outside circle processing), or on a shorter path (e.g., during inside circle
processing).

The MACHINEMATE offers the possibility to control path velocity deviations


depending on the interpolation type.

The programmed feed rates always relate to the tool center path and there are no
deviations from the programmed velocity for linear interpolation and spline
interpolation with end position radius compensation. The programmed feed
rates relate to the corrected path for circular interpolation as well as for spline
interpolation with real-time radius compensation. The conduct of the control in
reference to the axis velocity deviations resulting out of this can be preset as follows:

Speed increase with external contours, no change with internal contours

Speed reduction with internal contours, no change with external contours

Speed increase with external contours, speed reduction with internal contours.
This is the default preset.

Additional Notes:
Path compensation is not possible for:

Axis value settings with G92 during path compensation. The error message 121
Path correction, No G92 possible appears.

Programmable homing with G74 during path compensation. The error message
209 Path correction, G code is not permitted appears.

Thread cutting (G33, G34). There is no error message; however, no path


compensation is executed.

Any of the G271 to G276 turning cycles. There is no error message; however no
path compensation is executed.

Part Programming Manual


page 131/352
MACHINEMATE

5.1.1.10 Special cases for path compensation

4 special cases for path compensations exist as follows:

Special case 1: NC blocks without positioning information or with


positioning information which does not result in axis movements in
the active plane

Reaction of the control block:


The block that follows a NC block (without positioning information or with positioning
information) that does not result in axis movements in the active plane is treated like
an approach block. During the processing of the block before this "approach block", a
move to the offset point of the programmed destination point is made.

Example of reaction of the control to blocks without positioning information in


the active plane:

...
N20 G41 or G42 D1
N30 G1 X6 Y10
N40 X12
N50 ... (Block without positioning
information in the active plane)
N60 X14 Y5
N70 X18
N80 ...

Part Programming Manual


page 132/352
MACHINEMATE

Figure 5-18: Motion with blocks without positioning information in the active plane

Important: A plane change may only be programmed when path compensation (G40) is
switched off).

Special case 2: Change of the compensation direction (change between


G41 and G42)

Reaction of the control block


The block in which the change between G41 and G42 was programmed is treated
like an approach block. During the processing of the block before this "approach
block", a move to the offset point of the programmed destination point is made.

Example of reaction of the control to a change between G41 and G42:

... G1 ...
N40 G41 X3 Y7 D1

Part Programming Manual


page 133/352
MACHINEMATE

N50 X10
N60 G42 X12 Y3 (Change of the compensation direction)
N70 X16
...

Figure 5-19: Motion with a change between G41 and G42

Part Programming Manual


page 134/352
MACHINEMATE

Special case 3: Sign change of the compensation value

Reaction of the control


The block, in which the compensation value is selected with an opposite sign, is
treated like an approach block. During the processing of the block before this
"approach block", a move to the offset point of the programmed destination point is
made.

Example of sign change of the compensation value:

... G1 ...
N40 G41 X3 Y7 D1 D1 = 2
N50 X10 D2 = -2
N60 X12 Y3 D2 (Sign change of the compensation value)
N70 X16
...

Figure 5-20: Motion with a sign change of the compensation value

Part Programming Manual


page 135/352
MACHINEMATE

Special case 4: Change of the size of the compensation value but with
no sign change

Reaction of the control


A move is made to the intersection of the last equidistant with the previous
compensation value and the first equidistant with the new compensation value.

Example 1 for change of size of compensation value but no sign change:

G1
N30 G41 X7 Y7 D1 D1 = 2.2
N40 X14 D2 = 1.1 D1 > D2
N50 X20 Y2 D2 Change of the size of the
compensation value but with no sign
change
...

Figure 5-21: Motion with change of compensation value but no sign change, example 1

Example 2 for change of size of compensation value but no sign change:


... G1 ...
N30 G41 X7 Y7 D1 D1 = 1,1
N40 X14 D2 = 2,2 D1 < D2
N50 X20 Y2 D2
...

Part Programming Manual


page 136/352
MACHINEMATE

Figure 5-22: Motion with change of compensation value but no sign change, example 2

5.1.1.11 Problem cases

5 possible problem cases are as follows:

Problem case 1: Tool radius too large for an inside corner


...
N40 G42 D1
N50 G1 X2.5 Y4
N60 X4
N70 X5 Y8.5
N80 X6 Y4
N90 X9
...

Part Programming Manual


page 137/352
MACHINEMATE

Figure 5-23: Motion with a tool radius that is too large for an inside corner
The tool radius is too large for the programmed internal contour. This results in a
reversal of the motion direction. In such cases the error message 207 appears.

Problem case 2: Radius of the circle < compensation value (R < D).

Example of Radius of circle < compensation value (R<D):


... G1 ...
N20 G42 X2 Y5 D1
N30 X6 Y9
N40 G2 X12 I3
N50 G1 X16 Y2
...

Part Programming Manual


page 138/352
MACHINEMATE

Figure 5-24: Radius smaller than compensation value (R < D)


If the radius of the circle is smaller than the compensation value, the error message
98 appears.

Problem case 3: Full circle with radius compensation, external contour


processing:

Reaction of the control


Material is left unprocessed in the area of the programmed circle starting position.

Example 1: Material left unprocessed in area of programmed circle starting


position (G42):
...
N10 G1 X7 Y0 F1000
N20 G42 D1
N30 Y10
N40 G3 J3
N50 G1 Y0 D0
...

Part Programming Manual


page 139/352
MACHINEMATE

Figure 5-25: Motion with a full circle as external contour (with G42)
The same contour error also occurs when G41 is programmed in the block N20 and
G02 in block N40. This type of contour error can also occur when using G42 or G44,
however, fewer material is left unprocessed, since a move is made to the vertically
displaced circle starting position (Q) and not to the intersection of the equidistant (P)
(see Figure 5-26).

Example 2: Material left unprocessed in area of programmed circle starting


position (G44):
N10 G1 X7 Y0 F1000
N20 G44 D1
N30 Y10
N40 G3 J3
N50 G1 Y0 D0
...

Part Programming Manual


page 140/352
MACHINEMATE

Figure 5-26: Motion with a full circle as external contour (with G44)

Problem case 4: Full circle with radius compensation G42, internal


contour processing

Reaction of the control:


It is difficult to produce a full circle with radius compensation as an internal contour.
This is because the tool will have already left the internal contour of the circle at the
intersection of the equidistant of circle path and next block. This is illustrated in the
following example.

Example of full circle with radius compensation as internal contour:


... G1 ...
N20 G42 X9 Y4 D1
N30 Y6
N40 G2 J6
N50 G1 Y4
N60 X0 Y0 D0
...

Part Programming Manual


page 141/352
MACHINEMATE

Figure 5-27: Motion with a full circle as internal contour (with radius
compensation)
The control reacts similarly, when G03 is programmed in the above-mentioned
program after G41.

The full circle as internal contour displayed in Figure 5-27 can be achieved by
programming two semicircles instead of a full circle. The above-mentioned program
example would have to be altered as follows:

... G1 ...
N20 G42 X9 Y4 D1
N30 Y6
N40 G2 Y18 J6
N50 Y6 J-6
N60 G1 Y4
...
Contour errors can be avoided through skillful programming and, if necessary, by
inserting NC blocks without positioning information. The following program example
shows a possible method of programming an external contour of a full circle with path
compensation, which results in a full circle without contour errors:

Example for method of programming an external contour of a full circle with


path compensation, which results in a full circle without contour errors:
Part Programming Manual
page 142/352
MACHINEMATE

...
N20 G1 X7 Y0
N30 G44 Y10 D1
N40 G3 J3
N50 G4 (Dummy block)
N60 G1 Y0 D0
...

Figure 5-28: Full circle as external contour (with radius compensation)

The dummy block N50 has the effect that a move is made to the offset point of the
destination point of the preceding block (N40). In block N60 the path compensation is
disabled (retreat block).

Problem case 5: Insufficient cutting


Insufficient material may be removed when processing inside corners (work piece
angle > 180). Therefore, it is practically impossible to produce an inside corner of
radius < R with a tool of radius R.

Examples of External contour processing and Internal contour processing

Part Programming Manual


page 143/352
MACHINEMATE

Figure 5-29: Processing with external path compensation at corners, internal


contour processing

Part Programming Manual


page 144/352
MACHINEMATE

5.1.2 G53-G59 Part position offsets


Syntax:
G53 Cancel part position offsets
G54/55// 59 Activate part position offsets
The instructions G54 to G59 are used for setting part position offsets. Part position
offsets are cancelled with the instruction G53.

5.1.2.1 Application example for part position offset

Clamped in the chuck in Figure 5-30 are two identical work pieces that are to obtain
the same finished contour. To avoid the necessity of programming two program parts
with different coordinates for the two work pieces, part position offsets are carried out
in the NC program.

The zero point G54 is positioned at the lower left corner of work piece 1. Zero point
G55 is positioned at the lower left corner of work piece 2.

The relationship of the coordinates of work piece 1 to the zero point G54 is now
exactly the same as the relationship of the coordinates of work piece 2 to zero point
G55. This way the positioning instructions for the first work piece can then also be
used for the second work piece.

5.1.2.2 Location and selection of the zero points

The programmer enters the location of the work piece zero points, which he used
when writing the NC program, into the set up sheet.

The control is informed of the location of the pallet zero point in relation to the zero
point G53 when arranging the machine. This is done by programming G92. The
location of the zero points specified by the programmer (G54 to G59 maximum) in
relation to the pallet zero point is read in into the control or entered manually.

If the work pieces are processed on a pallet with the same set-up on several machine
tools, the location of the work piece zero points in relation to the pallet zero point
remains the same respectively. Only the location of the pallet zero point in relation to
the respective machine zero point needs to be determined and input to the control.

Part Programming Manual


page 145/352
MACHINEMATE

Figure 5-30: Setting work piece zero points

5.1.2.3 Programming

At CONTROL RESET the zero point G53 is active. Programming of G53 disables
part position offsets (G54-G59).

Six different part position offsets can be programmed in a NC program with the
instructions G54 to G59. If one of the instructions G54 to G59 is programmed, the
corresponding part position offset is only prepared and no axes are positioned. The
offset values entered in the operating mode DATA when arranging the machine tool,
only become active when coordinates are programmed after the programming of a
part position offset with G54 to G59.

When programming circles, and if a part position offset is to control both axes, the
destination point must be programmed by giving both coordinates values.

If a further part position offset (e.g., G55) is programmed in the NC program after a
part position offset (e.g., G54), the offset values entered for this second part position

Part Programming Manual


page 146/352
MACHINEMATE

offset G55 again relate to the zero point specified with G92 or to zero point G53, and
not to the first part position offset G54.

Example:
N10 G1 X0 Y0 Z0 F1000 Move to the starting point, G53 active
N20 G54 Setting the work piece zero point G54
(In the following text, it is assumed
that for G54 the offset values X10,
Y20, Z15 with reference to G53 were
entered in the operating mode "DATA".)
N30 X10 Y10 The offset values for the X and the Y-
axis become active; i.e., a move is
made to the position X20, Y30 in
reference to G53 or G92.
N40 Z10 The offset value for the Z-axis
becomes active; i.e., it will be moved
to the position Z25.
N50 G53 G54 is disabled, G53 is reselected, no
axis travel movement
N60 M30 Program end

5.1.2.4 Input of part position offsets

The part position offsets can be called up with G54 to G59. The offset values can be
assigned manually, by allocation in a cycle block, or by loading a file containing the
required values, as follows:

Manually
1. In the operating mode "DATA", select F1:Data selection F5:Zero offset G.

2. Select Alt D: Data F5: Modify.

3. Click onto the line of the part position offset to which you would like to assign
values. (The line now appears in the input window where you can delete previous
values with the BACKSPACE key and enter new values.)

4. Click onto the OK field. Press the OK key or the RETURN key.

Using this method your values for the part position offset are transferred into the zero
point compensation value memory of the MACHINEMATE and displayed in the upper
window on the monitor.

By allocation in a cycle block


See Chapter 6 General cycle programming.

By loading a file containing the required values


The following file format must be observed:

Part Programming Manual


page 147/352
MACHINEMATE

<lf>
% <lf>
GTABXX <lf> Number of the part position offset table
G54X=+00000.000 Y=+00000.000 ...
...
G59X=+00000.000 Y=+00000.000 ...
<ETX>

< cr > < lf > can also be used instead of < lf >.

The file end character (< ETX > =03H in the above mentioned example) can be
preset.

xx is a two digit table number.

Part Programming Manual


page 148/352
MACHINEMATE

5.1.3 G70, G71 Programming in metric or inch format


Syntax:
G70 ... Programming in the inch format
G71 ... Programming in the metric format
With the instructions G70 (inch) and G71 (metric) a changeover is made between the
input format. If the system integrator made no changes then at CONTROL RESET
the instruction G70 is usually active for the MachineMate control.

A format change within a NC program is possible with these G-codes. After the
format change, programmed length statements, positions and speeds are interpreted
as values in the format that was selected. The values that are active when the format
change is called up are converted into the new format.

Example of programming in the metric or inch format:


...
N50 G71
N60 G1 X2 Y2
N70 G2 I2
N80 G70
N90 G2 I2
...

Figure 5-31: Programming in metric or imperial format

Part Programming Manual


page 149/352
MACHINEMATE

5.1.4 G90, G91 Absolute/incremental dimension programming


Syntax:
G90 ... Absolute dimension programming
G91 ... Incremental dimension programming
The instructions G90 and G91 distinguish between absolute dimension
programming (absolute dimension input, G90) and incremental programming
(incremental dimension input, G91). If G90 is active then all entered coordinate
values of the axes relate to the part coordinate zero point. The values can be entered
with negative sign.

Example of absolute dimension input (G90):


N10 G0 X0 Y0 G90
N20 G1 X20 F500
N30 Y20
N40 X70
N50 Y0
N60 X100
N70 Y40
N80 X70 Y70
N90 X0
N100 Y0 M30

Figure 5-32: Dimension input in absolute dimension programming

Part Programming Manual


page 150/352
MACHINEMATE

The input of the coordinate values as incremental dimensions is programmed with


the instruction G91. With incremental programming each axis statement relates to the
position arrived at before the block. Incremental dimensions are therefore distances
between adjacent points; they indicate the motion paths of the axes. The sign
determines the motion direction.

Example for incremental dimension input (G91)


N10 G0 X0 Y0 G91
N20 G1 X20 F500
N30 Y20
N40 X50
N50 Y-20
N60 X30
N70 Y40
N80 X-30 Y30
N90 X-70
N100 Y-70 M30

Figure 5-33: Dimension input in incremental dimension programming

Part Programming Manual


page 151/352
MACHINEMATE

5.1.5 G92 Set axis value


Syntax:
G92 X ... Y...
The current part coordinate zero point can be shifted to an arbitrary point with the
instruction G92.

This type of coordinate shift is achieved by assigning new coordinates to the


destination point of the motion block preceding the G92-block. These coordinates
that are to be newly assigned are programmed together with G92. Coordinate values
(e.g., the X-coordinate value or the Y-coordinate value) that do not change with
respect to the original values do not have to be programmed.

To cancel this shifting of coordinates, program the instruction G92 without coordinate
values.

Example:
N10 G1 X50 Y50
N20 G92 X0 Y10

Figure 5-34: Set axis value with G92


The destination point of the NC block N10 is the point with the coordinates X50, Y50.
In the NC block N20, this point will be assigned the coordinates X0, Y10. The
coordinate zero point is shifted as shown in the example.

Application of Set Axis Value:

Part Programming Manual


page 152/352
MACHINEMATE

A starting point can be defined for the processing of the work piece using the
instruction G92 (e.g., the pallet zero point for the work piece zero points G54 and
G55 in the example from Figure 5-35).

Figure 5-35: Definition of a reference point for work piece zero points

Like the instructions G54 to G59, the instruction G92 causes no axis travel
movements; it only causes a part coordinate shift. The values programmed with G92
only become active when coordinates are programmed after programming of G92.

Additional Notes:
The instructions M02 and M30 do not reset axis values specified with G92.

The instruction G92 has another meaning when programmed together with an S
word. In this case it is used for programming the maximum rotational speed of
the spindle. Spindle speeds programmed afterwards are limited to this value.
(See 4.1.2.5 Spindle speed limitation.)

Part Programming Manual


page 153/352
MACHINEMATE

5.1.6 G14-G16 Polar coordinate programming


Syntax:
G14 Polar coordinate programming absolute
G15 Polar coordinate programming relative
G16 X Y Definition of the pole point

With the instructions G14 and G15, a changeover can be made to programming the
destination point coordinate values in the form of polar coordinates. After
programming G14, the polar coordinates are interpreted as absolute values
(analogous to G90); after programming of G15 they are interpreted as relative values
(analogous to G91).

Before a changeover to polar coordinate programming, the plane must be


programmed in which the polar coordinate system is to lie. If the system integrator
made no changes, then the X/Y plane (G17) is active at CONTROL RESET;
therefore, G17 does not need to be programmed when desired.

The coordinate values indicated after activation of polar coordinate programming are
interpreted as follows:

The angle is programmed in degrees with the address character of the main axis
of the active plane.

The radius is specified with the address character of the minor axis of the active
plane.

Part Programming Manual


page 154/352
MACHINEMATE

Figure 5-36: Polar coordinates

The polar coordinate programming is deactivated with the instructions G90 or G91
(see 5.1 Absolute/incremental dimension programming).

Major axis Minor axis


G17 X/Y-Plane X Y
G18 Z/X-Plane Z X
G19 Y/Z-Plane Y Z

Table 5-1: Major axis and minor axis


When G20 is active, the axis programmed with the address character I is the major
axis, the axis programmed with the address character J is the minor axis.

The following table outlines which coordinate value on the three planes is interpreted
as angle and which one as radius:

Part Programming Manual


page 155/352
MACHINEMATE

X/Y-Plane (G17) Z/X-Plane (G18) Y/Z-Plane (G19)


X: Angle in degrees Z: Angle in degrees Y: Angle in degrees
Y: Radius in X/Y-Plane X: Radius in Z/X-Plane Z: Radius in Y/Z-Plane
Table 5-2: Angle and radius values in the three predefined planes

Example of polar coordinate programming without pole point


information (G17 "X/Y plane" is active as standard):
N10 G1 X0 Y0 F100
N20 G14 X45 Y40 (P1) Activation of the polar
coordinate programming
(absolute)
N30 X135 Y30 (P2) Angle with respect to X axis
135, radius 30
...

Figure 5-37: Polar coordinate programming without pole point information

Part Programming Manual


page 156/352
MACHINEMATE

5.1.6.1 Programming the pole point

The pole point of the polar coordinate system can be determined at any position
where required by using the instruction G16, if it is not to be identical with the zero
point of the Cartesian coordinate system.

The coordinates of the desired pole point are programmed together with the
instruction G16. If polar coordinate programming with G14 or G15 was activated
before programming G16, then the pole point coordinates programmed together with
G16 are interpreted as polar coordinates in absolute dimensions (according to G14)
or in incremental dimensions (according to G15). If no change was made to polar
coordinate programming before the call of G16, the pole point coordinates
programmed together with G16 are interpreted as Cartesian coordinates.

Important Notes
Simultaneous use of G16 and G92 is not allowed.

With the instruction G16, only a new pole point for polar coordinate programming
is specified but no new coordinate zero point.

In the case of a plane change with G17 to G20 a pole point programmed with
G16 is reset to the zero point.

In the following examples, w.r.t. represents with respect to.

Example of Programming the pole point with G17 active:


N10 G14 Activation of polar coordinate
programming (absolute)
N20 G16 X30 Y20 Definition of the pole point: Angle
with respect to X axis 30, radius 20
N30 X45 Y30 (P1) Point in the "shifted" coordinate
system: Angle with respect to shifted X
axis 45, radius 30

Part Programming Manual


page 157/352
MACHINEMATE

Figure 5-38: Polar coordinate programming with pole point information

Part Programming Manual


page 158/352
MACHINEMATE

5.2 Specific geometric instructions


These instructions are in this section:

G17 selection of the XY working plane

G18 selection of the ZX working plane

G19 selection of the YZ working plane

G20 definition of the working plane, with I as major axis and J as the minor axis

G24 definition of the work field (the safe zone) lower limits

G25 definition of the work field (the safe zone) upper limits

G26 disable the current work field or safe zone

G27 enable the current work field or safe zone

G38 enable mirroring for the axis or axes in the block

G39 disable all axis mirroring

G51 part rotation in degrees (R)

G52 part rotation in radians (R)

G50 part scaling (R has the factor)

Part Programming Manual


page 159/352
MACHINEMATE

5.2.1 G17-G20 Plane selection


Syntax:
G17 Selection of X/Y plane
G18 Selection of Z/X plane
G19 Selection of Y/Z plane
G20 I J Selection of freely definable plane

See Figure 5-39. The planes displayed are selected with the instructions G17, G18
and G19. In addition, the instruction G20 is available for the selection of a freely
definable plane.

The active plane each time is relevant for the following functions:

G02, G03 Circular interpolation with specified center point in the clockwise or
counter-clockwise direction.

G12, G13 Circular interpolation with specified radius in clockwise or counter-


clockwise direction.

G50 Scaling.

G51, G52 Part rotation.

G40-G44 Path compensations.

G14-G16 Polar coordinate programming.

Note that in a lathe, with just axes X and Z, it is not uncommon to have all three
planes and G-codes configured for the Z/X plane (since the machine has only one
plane for two axes).

Part Programming Manual


page 160/352
MACHINEMATE

Figure 5-39: Circular interpolation plane selection

5.2.1.1 Programming a freely definable plane

G20 together with the address characters I and J are programmed to freely define
and select a plane. The number of the major axis must be given as the value of the
I word, the number of the minor axis must be given as the value of the J word.
These are the axes from which the freely defined plane is to be formed.

Major and Minor axis can be determined with the help of the right-hand-rule. If the
thumb points in the positive direction of the major axis and the index finger points in
the positive direction of the minor axis, then the middle finger must point in the
positive direction of the third axis.

Part Programming Manual


page 161/352
MACHINEMATE

Note: The error message 204 will appear if unavailable axes, the value 0, or two equal
numbers are programmed in G20-blocks together with I and J numbers.

Example:
N10 G20 I4 J2 The plane G20 is formed by the axes with the
numbers 4 (major axis) and 2 (minor axis).
N20 G2 I1 J0.5 Full circle in the plane G20, I controls the
4th axis, J controls the 2nd axis
N30 G18 Call of the plane G18 (Z/X plane)
N40 G3 I0.5 K1 Full circle in the plane G18 (Z/X plane)
N50 ...

If the X-axis was assigned the number 1, the Y-axis the number 2 and the Z-axis the
number 3, then the following analogies are produced:

Major axis Minor axis


G17 X/Y plane analogous with G20 I1 J2
G18 Z/X plane analogous with G20 I3 J1
G19 Y/Z plane analogous with G20 I2 J3
Table 5-3: Circular interpolation planes (G20)
Additional Notes:
Circular arcs are programmed in the active plane with the instructions G02 or G03
(see 2.1.4 G02, G03 circular interpolation with specified center point). If G20 is the
active plane, then the parameters I and J relate to the major and minor axes
respectively, which were programmed together with G20. The parameter K has no
meaning.

The destination point coordinates are programmed in G20-blocks using the address
characters of the axes that form the plane G20.

A plane change is always made when the major and/or the minor axis/axes change.

A plane change deactivates G16 Pole of the coordinate system and resets the pole
point to the coordinate zero point.

5.2.2 G24-G27 Programmable work field limitation


(Safe Zone Programming)
Syntax:
G24X Y Definition of the lower limit values
G25X Y Definition of the upper limit values

Part Programming Manual


page 162/352
MACHINEMATE

G27 Turn on
G26 Turn off

The work area of a machine tool is determined by the motion limits of the individual
axes. The motion limits prevent the axes from being positioned outside of their
maximum and minimum position (see 2.1 General positioning instructions).

It is possible to reduce the work area of a machine tool using instructions G24 to G27
in three steps as follows:

Define the lower limit values for the axis travel movements with the instruction G24.

Define the upper limit values for the axis travel movements with the instruction G25.

Turn on the work field limitation using the modally effective instruction G27. A
programmed work field limitation is turned off using the instruction G26 that is also
modally effective.

Upper motion Y
limit Y axis Programmed work
8000
area limit

6000

4000
Upper motion
limit X axis
2000
2000
-8000

-6000

-4000

4000

6000

8000
-2000

-2000

-4000

Lower motion -6000


limit X axis Work area
Lower motion
-8000
limit Y axis
Figure 5-40: Work area of a machine tool with the axes X and Y

Part Programming Manual


page 163/352
MACHINEMATE

Example of reducing the work area of a machine tool using instructions


G24 to G27 (See Figure 5-40):

N10 G24 X-4000 Y3000
N20 G25 X7000 Y5000
N30 G27 ...
...
In block N10, the X-axis may not be positioned outside the position X-4000 in the
negative direction and the Y-axis may not be positioned outside the position Y3000
in the negative direction, as long as the work field limitation is turned on.

In block N20 the X-axis may not be positioned outside the position X7000 in the
positive direction and the Y-axis may not be positioned outside the position Y5000
in the negative direction as long as the work field limitation is turned on. In this way,
the X-axis may only be moved to positions within the area of X4000 to X7000 and the
Y-axis only to positions within the area of Y3000 to Y5000.

Depending on whether G70 or G71 is active, the limit values are interpreted as inch
or metric measurements (see 5.1G70, G71 Programming in the metric format/inch
format).

If the programmed limit values are exceeded when processing a motion block when
the programmable work field limitation is active, this causes the same reaction as if
the preset axis motion limits were exceeded.

Additional Notes:
When the work field limitation is turned off, the axis motion limits (software limit
switch) determined by the machine manufacturer are valid.

If no limit values were programmed together with G24 or G25, or if the


programmed limit values are outside the axis motion limits determined by the
machine tool manufacturer and if the programmable work field limitation is then
turned on with G27, the axis motion limits (software limit switch) determined by
the machine manufacturer are valid.

Axis limit values programmed in G24 or G25-blocks are always interpreted as


absolute values regardless of whether G90 or G91 is active.

Programmed axis limit values are not subject to scaling.

A programmed work field limitation is rendered ineffective by CONTROL RESET.


In this case, the axis motion limits determined by the control configuration are
valid again.

Error messages appearing when work field limitation turned on:


The entire corresponding motion block is not processed when the work field limitation
is turned on and a destination point coordinate lies outside of the programmed limits
then the error message 211 appears.

Part Programming Manual


page 164/352
MACHINEMATE

Example:

N10 G24 X-4000 Y+3000 Program the lower limit values


N20 G25 X+7000 Y+5000 Program the upper limit values
N30 G27 Turn on the work field limitation
N40 ...
...
N80 ...
N90 G26 Turn off work field limitation
N100 ...
...
N190 ...
N200 G27 Turn on the work field limitation
N210
...
N240 ...
N250 G24 Y+4000 Program a new lower limit value
for the Y axis
N260 ...
...

5.2.3 G38, G39 Programmable axis motion mirror


Syntax: G38 ...
The instruction G38 enables motion paths to be mirrored.

Programming:
The function mirror is activated with the modally effective instruction G38 together
with the address characters of the axes whose programmed motion paths are to be
mirrored. In each case an arbitrary value must follow the address characters of the
axes. This value has no effect on the program. Two examples follow:

Example 1 (Mirror activated with instruction G38):


Program 1 (P1) without mirror:
N10 X0 Y0 F1000
N20 X5 Y1
N30 X7
N40 Y2
N50 X5 M30
Program 2 (P2); mirror the motion paths of the X-axis:
N10 X0 Y0 F1000
N20 X5 Y1
N30 G38 X1
N40 X7
N50 Y2
N60 X5 M30
Program 3 (P3); mirror the motion paths of the Y-axis:
N10 X0 Y0 F1000
N20 X5 Y1
N30 G38 Y1
N40 X7
N50 Y2
Part Programming Manual
page 165/352
MACHINEMATE

N60 X5 M30
Program 4 (P4); mirror the motion paths of the X- and the Y-axis:
N10 X0 Y0 F1000
N20 X5 Y1
N30 G38 X1 Y1
N40 X7
N50 Y2
N60 X5 M30

Figure 5-41: Programmable mirror, effect of the programs P1 to P4

Additional Notes:
The mirror function is turned off by programming the instruction G39 or by
programming G38 without coordinate specification.

Repeated programming of G38, in each case with different axis address


characters has the effect that positioning is always carried out only on the
mirrored motion paths of the axis or the axes which were programmed in each
last G38-block before the programming of the corresponding motion path.

The starting point of a mirrored block to be positioned is always the destination


point of the preceding motion block.
Part Programming Manual
page 166/352
MACHINEMATE

If the function mirror is turned off at another position to the one at which it was
turned on, then a part position offset via G92 becomes automatically active for
the difference in the route.

Example 2 (Mirror with prior setting of an axis value using G92):


N10 G1 X0 Y0 F1000
N20 G1 X5 Y5
N30 G92 X0 Shift the Y axis to the current
position X5
/N40 G38 X1
N50 G1 X10 Y5
N60 G39 Turn off mirroring
N70 G4 Block without effect (dummy
block), necessary before G92
without axis coordinates
N80 G92 Cancel part position offset
N90 M30 Program end

Figure 5-42: Mirror with prior setting of an axis value using G92

Part Programming Manual


page 167/352
MACHINEMATE

When the G39 turns off axis mirroring and the axes have not returned to their initial
mirror positions, there is a shift in the part coordinate system that is saved in the G92
offsets. At the time of the G39, the zero of the new part coordinate system (via G92)
will be such that the current axis position is maintained. The CNC will display this part
zero shift to the operator by maintaining its presentation in the Position display of the
axis data. The End point display will continue to be the axis position in the part
coordinate system as it always is. This difference in values could be confusing but it
is important for the operator to be aware that when the G39 is not done in the same
position as the G38 the part coordinate system will be shifted by that amount. Several
examples below illustrate this CNC behavior.

N10 G92 (CANCEL ANY G92 OFFSETS)


N20 G0 X0
N30 G38 X1
N40 X1
N50 G39
N60 X0
N70 X2
N80 G92 (CANCEL G92 OFFSETS)
N90 M30

This is how the CNC will display the X axis positions during these blocks (with a
different number of trailing zeroes depending on G70 or G71 context).

Block Position End point


N20 0.0 0.0
N30 0.0 0.0
N40 -1.0 +1.0
N50 -1.0 +1.0
N60 -2.0 0.0
N70 0.0 +2.0
N80 0.0 0.0

In N30, the part coordinate system is rotating about X0 because the G38 was at
X0.0.

In N40, X is moving in the opposite direction due to the mirroring. The command is
X+1 but it was at X0 so it moves to X-1. The End point value indicates its position in
the current part coordinate system while the Position value indicates its position in
the shifted coordinate system. The axis really is at the Position value. The End
point value always represents the end point for the current block in the current part
coordinate system.

In N50, mirroring is being turned off. The block End point remains the same so X is at
the same, unchanged position within the current part coordinate system. Because the
X position when turning off mirroring was not at its original position in the part
coordinate system, there is now a 2.0 offset in X. There is no change to the display
of axis positions because nothing has changed in either context. The position in the
current part coordinate system is unchanged (End point) and the position where it
really is in the part coordinate system is also unchanged (Position).

Part Programming Manual


page 168/352
MACHINEMATE

In N60, X is moving to a new position. The End point shows its location in this
(shifted) part coordinate system while the Position shows its real position.

In N70, X moves again, with the same rules in the display.

In N80, G92 cancels the offsets and the X End Point now matches its Position
because the offset has been removed and the Position was indicating where it really
was in the unshifted part coordinate system.

The following is another example this handling of the displayed shift in the part
coordinate system due to mirroring.

N10 G92 (CANCEL ANY G92 OFFSETS)


N20 G0 X1
N30 G38 X1
N40 X0
N50 G39
N60 X0
N70 X2
N80 G92 (CANCEL G92 OFFSETS)
N90 M30

Block Position End point


N20 +1.0 +1.0
N30 +1.0 +1.0
N40 +2.0 0.0
N50 +2.0 0.0
N60 +2.0 0.0
N70 +4.0 +2.0
N80 +4.0 +4.0

In N30, the part coordinate system is rotating about X1 because the G38 was at
X1.0.

In N40, X is moving in the opposite direction due to the mirroring. The command is to
X0 but it was at X+1 so it moves to X+2. The End point value indicates its position in
the current part coordinate system while the Position value indicates its position in
the shifted coordinate system. The axis really is at the Position value. The End
point value always represents the end point for the current block in the current part
coordinate system.

In N50, mirroring is being turned off. Because the X position when turning off
mirroring was not at its original position in the part coordinate system, there is now a
+2.0 offset in X. The position in the current part coordinate system is unchanged
(End point) and the position where it really is in the part coordinate system is also
unchanged (Position).

In N60, X is commanded to its same position in the part coordinate system so it does
not move.

Part Programming Manual


page 169/352
MACHINEMATE

In N70, X is moving to a new position. The End point shows its location in the
(shifted) part coordinate system while the Position shows its real position

In N80, G92 cancels the offsets and the End Point now matches its Position because
the offset has been removed and the Position was indicating where it really was in
the unshifted part coordinate system.

5.2.4 G51, G52 Part rotation


Syntax:
G51 R.. Degree
G52 R.. Radiant
It is possible to rotate a complete program or a part of a program within an active
plane. The center of rotation is programmable. G51 or G52 activates the function.
The angle of rotation is defined by means of the address R. A positive value means a
rotation in the mathematical negative sense (counter clockwise) while a negative
value means a rotation in the mathematical positive sense (clockwise).

If G90 is active the value is interpreted as absolute, in the case of G91 it is


interpreted as incremental.

The rotation is always performed within the plane that is defined by G17-G20. The
center of rotation is defined in a G51 or G52 block by means of the address of the
corresponding axes, defining the plane.

If there is no explicit definition of the center of rotation, the rotation is performed


around the zero point of the plane.

The part rotation is deactivated by control reset, end of the program, a change of the
plane by a programmed G17-G20 or by means of G92 without axis information.

Two examples of part rotation follow:

Example 1 (Part rotation):

Main program P1:


N10 X4 Y4 F100
N20 L1 Q2
N30 M30
Subprogram P2:
N10 G90
N20 X8 Y4 F100
N30 Y7
N40 X4
N50 Y4
N60 G51 R90 Activation of part rotation. Angle of
rotation 90 degrees
N70 M30

Part Programming Manual


page 170/352
MACHINEMATE

Figure 5-43: Part rotation in the case of active G90

Example 2 (Part rotation):

Main program P1:


N10 X6 Y5 F1000
N20 G92 X0 Y0 Setting of zero point
N30 L3 Q2
N40 M30

Subprogram P2:
N10 G90
N20 G1 X2 Y-1
N30 G3 X3 Y0 I1
N40 G1 X2
N50 Y-1
N60 X0 Y0
N70 G91
N80 G51 R90
N90 M30

Part Programming Manual


page 171/352
MACHINEMATE

Figure 5-44: Part rotation in combination with incremental programming (G91)

Part Programming Manual


page 172/352
MACHINEMATE

5.2.5 G50 Scaling


Syntax: G50 R
The instruction Scaling is a "work piece orientated function". It enables a proportional
enlargement or reduction of a programmed work piece contour to a given scale
factor.

Programming:
The function scaling is programmed with the instruction G50 together with a scale
factor R. The scale factor must be >0. A scale factor <0 is rejected with the error
message 18.

Scale factors affect all subsequently programmed motion path and radii but only in
the active plane. A scale factor of 0.5, for example, has the effect that all motion path
and radii programmed subsequently are halved, and a scale factor of 2 has the affect
that all motion paths and radii subsequently programmed are doubled.

Note: The scale factor programmed with the address R is incremental when G91
(relative programming) is active. MACHINEMATE assumes a scale factor of 1 if
no scale factor has been input.

Example 1 (Scaling):
....
N50 G90
...
N80 G50 R0.5
....
N100 G91
.....
N120 G50 R0.25 -> effective scale factor = 0.75
Example 2 (Scaling):
....
N50 G90
...
N80 G91
.....
N100 G50 R0.25 -> effective scale factor = 1.25

Example 3 (Scaling):
The work piece contour K1 in Figure 5-45 has been produced using the program P1
with G90 active. The contour K2 has been produced using the program P2. This
program is identical to program P1 except for the scale factor of 0.5 in the N20 block.

Program P1 Program P2
N10 G90 F1000 N10 G90 F1000
N20 X20 Y20 N20 X20 R0.5 Y20 G50
N30 X40 N30 X40
N40 Y40 N40 Y40
N50 X20 N50 X20
N60 Y20 N60 Y20
N70 M30 N70 M30
Part Programming Manual
page 173/352
MACHINEMATE

A programmed scaling function is deleted by CONTROL RESET (the scale factor is


set to 1). Positioning information can be programmed in G50 blocks at the same time
(see example above).

Figure 5-45: Scaling with absolute and relative dimension input


In the operating mode AUTOMATIC, the destination point values obtained by the NC
program by scaling are displayed in the display window as end points during
processing of NC block for which a scale factor is active.

Note: The instruction G50 has no effect on part position offsets programmed with
instructions on tool tip radius, tool length compensations, rotational axes or
work field limits programmed with instructions from G24 to G27.

Part Programming Manual


page 174/352
MACHINEMATE

5.3 Dresser, wheel or tool tip radius compensation


(DWRC)
This section describes the operation of the dresser, wheel or tool tip radius
compensations. This feature is often used in grinding or turning applications. This
section does not include a description of the standard D- and H-compensation tables,
to be found in section 4.3. For brevity, sometimes this feature will be called DWRC,
an acronym for Dresser, Wheel or tool tip Radius Compensation.

5.3.1 Entering compensation values in tables


For DWRC, two tables are used for entering compensation values. For the length
offsets the H-compensation table is used. For the tool tip radius and its orientation
values the D-compensation table is used.

5.3.1.1 Wheel length offsets

Wheel gauge point on Wheel gauge point on


spindle from which spindle from which
wheel offsets are wheel offsets are
normally measured normally measured
X length offset

X length offset

Z
Length
offset This point is Z This point is
selected by the Length selected by the
length offsets as offset length offsets as
control point control point

Figure 5-46: Grinding wheel offset definitions

In a grinding application, the wheel length offsets are entered in the H-compensation
data. The H-table entries from 1 to 64 can be used for DWRC. Each table entry
consists of two axis values, Z and X.
Part Programming Manual
page 175/352
MACHINEMATE

In a turning application, the turret offsets are entered in the same table.

5.3.1.2 Dresser / Wheel radius offsets

The dresser, wheel or tool tip radius offsets are entered in the D-compensation data.
The D-compensation entries from 1 to 128 can be used for DWRC. The D-
compensation values contain the extra information for the DWRC feature, the
orientation direction for this compensation value. The values for the orientation are
from 0 to 9. The correlation between orientation and orientation value is displayed in
the figure below, for a wheel or a dresser/lathe. The figures are drawn for a machine
with a wheel/turret moved by X and Z axes and with a stationary part or dresser (so
orientation 1 is used when the grinding wheel is moving into the part in the X+ and Z+
direction; the same interpretation applies for the dresser or tool tip orientation 1 for
X+,Z+). If the machine has a part or dresser that moves by an axis then the relative
movement between the two partners must be taken into account. The axis moving a
part or dresser is the same as an imaginary axis moving the wheel in the opposite
direction.

Figure 5-47: Grinding wheel radius orientation definitions

Part Programming Manual


page 176/352
MACHINEMATE

Figure 5-48: Dresser or tool tip radius orientation definitions

The orientation is entered in a row with the D-Correction value. When this D-table
data is in a file, the orientation value (0 to 9) is distinguished from the D-correction(s)
value with the character R. For example, these lines in a file are possible:

D001 = +1.000 +0.010 R1 (D-Correction, wear value, orientation)

D001 = +1.000 R1 (D-Correction, orientation, no wear value)

The figure below demonstrates the values which have to be set in the D- and H-
tables to allow the correct compensation for the corner radius of a wheel.

Part Programming Manual


page 177/352
MACHINEMATE

Wheel gauge
point

R S H X

x
S
z
P
H (control point)
Z

Figure 5-49: Grinding wheel control point and gauge point definitions

The wheel corner radius (Rs) and its orientation value (4 in the case) have to be set in
D-compensation table. Tool offset values of X (Hx) and Z (Hz) axes have to be set in
the H-table. In the figure Hx value is positive and Hz value is negative (i.e., the H-
offset is an offset from the control point to the wheel gauge point). The corner radius
center of a wheel (S) can be set as a control point of a dresser/wheel. In the case the
corner orientation value 0 or 9 has to be set in the D-compensation table.

5.3.2 Dresser Wheel Radius Compensation

5.3.2.1 Definitions

The following terms are used within DWRC:

Outside-corners An angle between two intersecting programmed paths is referred to as an


outside corner if, in the direction of travel, the angle measured clockwise
from the second path into the first is greater then 180 degrees. If one or
both of the two moves are circular. The angle is measured from a line
tangent to the path(s) at their point of intersection.

Inside-corners An angle between two intersecting programmed paths is referred to as an


inside corner if, in the direction of travel, the angle measured clockwise from
the second path into the first is less than or equal then 180 degrees. If one
or both of the two moves are circular. The angle is measured from a line
tangent to the path(s) at their point of intersection.

Part Programming Manual


page 178/352
MACHINEMATE

Figure 5-50: Inside corner definition

Grinding wheels or dressers can have rounded edges which means there is a
difference between the machining edge and the control point. This causes a
difference between the programmed contour and the actual final contour of the part
or the dressed wheel. The DWRC is able to compensate this difference.

There are three types of DWRC entry and exit moves with this compensation. The
table below gives an overview of the main differences between the three
compensation move types.

Type of move Type A Type B Type C


Entry move to The path is The path stays at least one The entry move is
compensation the shortest radius away from the start- the shortest possible
possible path point of the next block at all path to its the
to its offset times. intersection point of
position. Extra motion blocks can be the equidistant lines.
generated in an attempt to
preventing gouging of the
part as can occur in type A.

Dresser / No difference between type A , type B and type C during


wheel path compensation.
Exit move Exit move is The exit move path is the The shortest path is
from the shortest shortest path to the end- taken from the
compensation path to the point for inside corners only. intersection point of
end-point for For outside-corners, the the equidistant lines
both inside path stays at least one to the end-point of
and outside radius away from the end the exit move for
corners. point. both inside and
outside corners.
Table 5-4: Differences between DWRC entry/exit move types A, B, C

5.3.2.2 Programming the compensation

The following G-Codes are used for programming DWRC. They are the same G-
codes for path compensation described in section 5.1.1. These G-codes will apply
DWRC rather than the conventional tool radius path compensation when a radius
orientation is defined by the modal D-code.
Part Programming Manual
page 179/352
MACHINEMATE

G-Code Dresser / wheel radius compensation


G40 Compensation off
G41 Path compensation left of the work piece contour.
Compensation entry / exit move type is defined in a machine
parameter.
G42 Path compensation right of the work piece contour.
Compensation entry / exit move type is defined in a machine
parameter.
G43 Path compensation left of the work piece contour with an
altered approach. Compensation entry / exit move type is
defined in a machine parameter.
G44 Path compensation right of the work piece contour with an
altered approach. Compensation entry / exit move type is
defined in a machine parameter.
Table 5-5: G-codes for DWRC path compensation

To activate the DWRC the orientation value in the D-correction table has to be a
value in the range from 1 to 8. The values 0 or 9 disable this DWRC compensation
and result in a normal length and path correction according to the usual rules.

The dresser-wheel compensation is activated by programming H and D-words for the


tool configuration. This format is as follows:

Ddd Hhh

were the number of digits for H and D depend on the number of correction table
entries. Normally the ranges are 128 D-values and 64 H-values.

5.3.3 DWRC application schemes


The four basic application schemes or types:

Dresser radius compensation

Corner radius compensation

Entire wheel radius compensation

Tool tip radius compensation

All the application schemes mentioned above use the same tables to store values.
The first three schemes are commonly for grinders while the fourth is for lathes.

Note: The active plane has to be correctly programmed for these application
schemes. Usually the Z-X plane (G18) is used for the dresser radius, corner radius
and tool tip radius compensations while the X-Y plane (G17) is used for the entire
wheel radius compensation.

Part Programming Manual


page 180/352
MACHINEMATE

DWRC Length offsets Part coordinate DWRC compensation


Scheme (H-correction) offsets (G54-
G59, G92)
Dresser radius Shifted on Z and Shifted to point On radius of diamond
X axes to wheel of dresser tip dresser
control point
Corner radius Shifted on Z and Shifted to point On radius of wheel
X axes to wheel on part being corner where Z/X
control point machined. length offset is located
Entire wheel Shifted on Z to Shifted to point On entire radius of
radius wheel control on part being wheel
point; Y offset is machined.
taken into
account with
DWRC.
Tool tip radius Shifted on Z and Shifted to point On radius of tool tip
X to tool control on part being
point. machined.
Table 5-6: Application schemes for DWRC path compensation

5.3.3.1 Dresser radius compensation

With this scheme, the CNC can compensate dressing errors from the radius of the
dresser tip. The radius of the dresser tip is entered in the Dresser / Wheel radius
offset table (D-Compensation).

Figure 5-51: Dress/wheel radius compensation example


Usually the grinding wheel moves across the dresser. The wheel becomes the part
and the dresser is the shaping tool. The axis motion is then opposite to the dresser

Part Programming Manual


page 181/352
MACHINEMATE

motion. If the dresser is mounted to independently moving axes then the inversion of
motion as just described is not done.

5.3.3.2 Corner radius compensation

The errors resulting from the rounded corners of the grinding wheel can be
compensated. The corner radius must be selected from the D-table for the correct
point of control. The programmer is responsible that the correct combination is
selected and in this way one, two or more corners can be programmed for one wheel.

Figure 5-52: Wheel corner radius compensation example

5.3.3.3 Entire wheel radius compensation

The CNC can also compensate errors resulting from the entire radius of the grinding
wheel. The radius of the grinding wheel is to be entered in the radius table. (There is
no need to enter an orientation because orientation values are not used in this
scheme.) No X-length offset has to be entered. For compensation only Z-length offset
and the radius value is needed.

5.3.3.4 Tool tip radius compensation

The CNC can also compensate errors resulting from the tool tip radius of the lathe
cutting tool. The tool tip radius and its orientation are entered in the D-table. The H-
table X and Z-length offsets are associated with the turret position (nothing to do with
the tool radius). An illustration of this type of compensation is shown above (Figure 5-

Part Programming Manual


page 182/352
MACHINEMATE

51) but in this case the diamond dresser tip example in the upper right corner of the
figure represents the tool tip used in turning and the grinding wheel in the lower left of
the figure represents the part being turned.

Note that the tool tip radius compensation is not possible during any of the G271 to
G276 turning cycles (see 9.17).

5.3.4 NC block formats


The DWRC is programmed with the following format:

Gcc Xpppp Zpppp Drr Hll


With:

cc One of the activation G-Codes: 41, 42, 43, 44


pppp Any position the axes are to be positioned to.
ll Number of the length offset which is to be used (00-64); 00
deactivates the length compensation.
rr Number of the radius / orientation set which is to be used (00-
99). 00 deactivates the path compensation.
The DWRC can be activated in several ways:

Program block Comment


Activation within one block
N10 G41 D12 H11 Sets compensation left of the work
X10 Y5 piece, selects DWRC offset number 12,
length offset 11, activates the
compensation entry move, moves axes to
X10 X5 (with DWRC).
Activation within two blocks
N10 D12 H11 Selects DWRC offset number 12, length
offset 11.
N20 G41 X10 Y5 Sets compensation left of the work
piece, activates the compensation entry
move, moves axes to X10 X5 (with DWRC).
Activation within three blocks
N10 D12 H11 Selects DWRC offset number 12, length
N20 G41 offset 11.
N30 X10 Y5 Sets compensation left of the work
piece.
Activates the compensation entry move,
moves axes to X10 X5 (with DWRC).
Activation within three blocks
N10 G41 Sets compensation left of the work
N20 D12 H11 piece.
N30 X10 Y5 Selects DWRC offset number 12, length
offset 11.
Activates the compensation entry move,
moves axes to X10 X5 (with DWRC).

Table 5-7: Activations of DWRC path compensation

Part Programming Manual


page 183/352
MACHINEMATE

5.3.4.1 Intermediate block types

In certain instances, the control generates a non programmed move called an


intermediate block. This block improves the performance and cutting quality. The
user can program the type of intermediate block as linear or circular by programming
a G45 (for linear intermediate blocks) or G46 (for circular intermediate blocks). These
G-Codes are modal. The initial state (default) or the state after a control-reset is
always G45. These two G-Codes can be programmed anywhere in the program but
they must be programmed before or in a block that causes an intermediate block to
have their effect.

Figure 5-53: Linear and circular intermediate blocks

5.3.5 Compensation Entry/Exit Move Types


Three compensation entry/exit move types are defined. These move types refer to
different entry and exit moves when activating DWRC, while the path during active
compensation will not differ. The figure below shows the main differences of the
compensation move types. There are three identical pictures, where one of the
compensation move types is enhanced and the two other move types are displayed
in gray only. This is done to see the specific features of each compensation move
type in comparison to the others. These pictures show also the contour of a work-
piece which would be the result.

Part Programming Manual


page 184/352
MACHINEMATE

Intersection point of equidistant lines Offset point


Compensated Path
Type A entry move
d

With this entry


d move type, the
Up to three Programmed Path tool moves to the
intermediate
blocks offset point of the
in case of
d
d
Workpiece start point of the
type C entry Type A Entry Path next block.
d

Type B Entry Path

Type C Entry Path

Start Point

Intersection point of equidistant lines Offset point


d Compensated Path Type B entry move

With this entry


d
move type, the
Up to three Programmed Path
intermediate tool is always
blocks
d
left at least one
in case of d Workpiece radius away from
type C entry Type A Entry Path
the start point of
d
the next block.
Type B Entry Path

Type C Entry Path

Start Point

Intersection point of equidistant lines Offset point


d Compensated Path
Type C entry move
d
Up to three
With this entry
Programmed Path
intermediate move type, the
blocks
d tool moves to the
in case of d Workpiece intersection point
type C entry Type A Entry Path
of the equidistant
d
lines of the entry
Type B Entry Path block and the first
compensated block.
Type C Entry Path
For this example
no angle short cut
is applied.

Start Point

Figure 5-54: The three compensation entry move types (overview)

Part Programming Manual


page 185/352
MACHINEMATE

It is important to repeat that the path during compensation will be equal for all three
move types. The path will maintain the tool one tool radius to the left or right from the
programmed path, depending on the active DWRC G-code (G41 to G44).

5.3.5.1 Move Type A Compensation

The type A Compensation is characterized by entry and exit moves which start or
end at the offset points. The paths during compensation are not different from the
type B or type C compensations. Two machine parameters define which entry or exit
move type is used when activating DWRC by one of the four G-codes (41 to 44).

The following pictures show different entry moves. The path ends at the offset point,
which is at a right angle on the left or right side of the next programmed move in the
active plane. Type A compensation entry moves do not generate any intermediate
blocks.

Figure 5-55: Compensation entry moves type A, linear to linear

Part Programming Manual


page 186/352
MACHINEMATE

Figure 5-56: Compensation entry moves type A, linear to circular

Figure 5-57: Compensation entry moves type A, circular to linear

Part Programming Manual


page 187/352
MACHINEMATE

Figure 5-58: Compensation entry moves type A, circular to circular


The last move before switching off the compensation is done always to the offset
point of the endpoint of the last compensated block.

5.3.5.2 Move Type B Compensation

Type B entry moves guarantee that the tool is kept off at minimum one radius from
the start point of the first compensated block. The following picture gives some
examples.

Part Programming Manual


page 188/352
MACHINEMATE

Figure 5-59: Compensation entry moves type B, linear to linear


When circular intermediate blocks are selected (i.e., G46 is modal), then in case of
entry move type B only one circular intermediate block is generated. This behavior is
shown in its figure below.

Part Programming Manual


page 189/352
MACHINEMATE

Figure 5-60: Compensation entry moves type B, circular intermediate blocks

5.3.5.3 Move Type C Compensation

The type C Compensation is characterized by entry and exit moves which start or
end at the intersection point of the equidistant lines of the entry move and the first
compensated block.

In the following some examples for type C entry moves are shown, where the end or
start moves are at the intersection points of the equidistant lines.

Part Programming Manual


page 190/352
MACHINEMATE

Figure 5-61: Compensation entry moves type C, linear to linear


Similar to the entry moves, the last compensated block ends at the intersection point
of the equidistant lines.

5.3.6 Special Cases

5.3.6.1 Changing compensation direction or sign

In the following the behavior of the control is described when changing the
compensation direction (i.e., switching between G41 and G42) within a program.
Changing compensation direction can result in the tool crossing over the
programmed path as compensation changes from left to right or vice versa.

Move Type A: Setting up the compensation as a new move

When this feature is active, a change in the compensation direction result that the
block in which the change is programmed will be treated as an entry block.

Move Type B: No new entry move

In this case, the control generates two points:

Point 1: The final wheel / dresser position before compensation


direction is changed. This point is at right angle to the end
point of the programmed path offset by one dresser / wheel

Part Programming Manual


page 191/352
MACHINEMATE

radius.

Point 2: Dresser / wheel position for the start of the first block using
the new compensation direction. The point is at right angle
to the start point of the motion block that changes the
compensation direction and is offset by one dresser /
wheel radius.

5.3.6.2 Non-motion blocks

Non-motion blocks are the blocks without movement information for the axes in the
active plane. Such blocks can make it difficult for the control to calculate the
compensation path correctly. If the next block is a non-motion block then the
compensated path of the current block ends at the offset point of that block.

The NC programmer should avoid usage of non-motion blocks during active DWRC.

Note: Cycle blocks (i.e., blocks that start with * before the N, to identify a special
syntax; this syntax is defined in section 6) are not considered non-motion blocks in
this situation and can be used during active DWRC with no problem.

Note: Some non-motion blocks cannot change the compensated path if they are
programmed between two tangential blocks.

Two examples:

Program block Comment

Compensation direction change in a cycle block

N10 G41 D1 X10 Set compensation left of work piece.


*N20 D1=-D1 change sign of the compensation value.
This is not a non-motion block.
N30 Y20 Continue with DWRC active

Non-motion blocks between tangential blocks

N10 G41 D1 X10 Set compensation left of work piece.


N20 X20 First of two tangential blocks
N30 G4 Non-motion block
N40 G4 Non-motion block
N50 Y20 Second of two tangential blocks

Part Programming Manual


page 192/352
MACHINEMATE

6 General Cycle Programming


6.1 Introduction
The general cycle programming for the MACHINEMATE allows calculations to be
done with parameters that may then be used for the regular NC programming. The
syntax of these blocks is different than that of the regular blocks. The cycle blocks
can not result in motion like a regular block; the cycle blocks affect only parameter
values and, with the use of the IF and GO instructions, the selection of the next NC
block to execute.

6.2 Application of Cycle Blocks


Using cycle blocks considerably extends the application spectrum of
MACHINEMATE, ensuring a clear separation between normal programming and
cycle programming. Cycle blocks allow the machine tool manufacturer and CNC
users to simplify constantly recurring setting-up procedures and quality improvement
measures during production and in many cases even to automate such processes.

Above all, technology-adapted operator controls and data inputs can be realized and
canned cycles for standard processes such as, cutting, drilling etc. can be provided.
It is also possible to generate NC programs with cycle blocks (e.g., with a calculated
path).

6.2.1 Cycle programming


The cycle programming syntax contains the necessary instructions to access the
following tables available in the CNC:

Length compensations H1-H128

Path compensations D1-D128

Part position offsets G54-G59

P-parameters P1-P1000

Axis positions (read only)

Input/output bit (for PLC)

To enable calculation functions to be executed, many calculation operations (basic


calculations, root, trigonometric functions, etc.) are available.

Part Programming Manual


page 193/352
MACHINEMATE

6.2.2 Integrating Cycle Blocks in an NC Program


The handling of cycle block differs from the handling of "normal" program blocks only
in that the character * is placed before the block number.

Example:

N30 G1 X...
N40 G2 X...
*N50 P1=...
*N60 IF P2=...
N70 G1...
Thus normal program blocks and cycle blocks can be mixed at will. The
MACHINEMATE recognizes a cycle block by the preceding asterisk.

During the processing of cycle blocks, the cycle interpreter in the implemented cycle
level is activated. If cycle instructions, which do not belong to the implemented cycle
level, are used, the error message 259 appears. This must be acknowledged by
CONTROL RESET, whereby the program is aborted.

Parameters can also be programmed in the form "=Pxxx" in the NC program, with
nearly all types of program words instead of the digit string:

*N100 P20=85000
N110 G0 X=P20

instead of

N110 G0 X85

This assumes that the parameters used at the relevant point in time have the correct
value (P20=85000 based on a presetting of 3 decimal places for the X-axis).

Note: The allocation of values to parameters can be made either while setting up in
the operating mode DATA (function F4: Modify F2: Cycle Parameters) or by
using cycle blocks in the NC program.

6.2.3 Comments
Cycle blocks can be explained by attaching comments. This is especially important
for long-term program documentation. The cycle interpreter recognizes comments by
the character /. Everything positioned to the right of this character in the relevant
cycle block is not interpreted for the program processing.

Example:
*N50... /this is a comment

Part Programming Manual


page 194/352
MACHINEMATE

Note that the parentheses characters (i.e., ( and )) are not used for a comment in a
cycle block (unlike a normal NC block; see 1.9) nor can they be used to define a
specific order of calculations in a cycle block. Any calculations in a cycle block are
always done in a straight left to right order (see 6.2.7) with no priority of certain
operations over others.

6.2.4 Cycle block syntax


During the programming of cycle blocks, the following instructions, addresses and
operations can be used:

Access to CNC table values


Dx Path compensation, x=1, ..., 128
DWx Path compensation wear offset, x=1, ..., 128
Gxa Part position offset, x=5459,
a = axis identification
Hx Length compensation, x=1, ..., 128
HWx Length compensation wear offset, x=1, ..., 128
Hxa Length compensation, x=1, ..., 64,
a = axis identification
HWxa Length compensation wear offset, x=1, ..., 64,
a = axis identification
Ibx Input bit, x=1 ... 8
Obx Output bit, x=1 ... 8
Px Parameters, x=1 ... 1000
xxxxxxx.xxxxxxxx Constant (typically up to 8 digits)
Type and number of compensations available
depend on the control options!
Ava Axis set position, a= axis letter
A Axis set position, a= axis letter
Mva Axis actual position, a= axis letter
Ax ASCII parameters, x= 1..20

Calculation operations and functions

= Allocation; e.g., of a numerical value to a parameter


- Minus sign
+, -, *,: Basic calculations (add, subtract, multiply, divide)
<, >, = Comparison operations
ABS Absolute value
ATN Arc tangent
COS Cosine of angle
DGR Conversion to degrees
INT Conversion to integer
MOD Modulus function (remainder)
RAD Conversion to radians
SIN Sine of angle
SQT Square root

Part Programming Manual


page 195/352
MACHINEMATE

General programming instructions

DO Execute instruction, in connection with IF


GO Jump instruction to block number
IF Conditional instruction
/TEXT Comments in a cycle block

Special instructions

SEL Select, additional functions


Table 6-1: Cycle programming: parameters and instructions

6.2.5 Basic rules for processing of instructions


The instruction block of the cycle interpreters is modeled on the BASIC programming
language. The maximum block length is 128 characters inclusive of the END label
and checksum, if preset. Cycle blocks are marked with the symbol * before the block
number to identify them.

Interpreter process Interpolator process

NC Blocks

4 G10
Cycle
Interpreter

1 Preceding
blocks

Dynamic block
buffer

Axis Control

3 G1...

Figure 6-1: Transfer of the NC blocks to the interpolator process

Part Programming Manual


page 196/352
MACHINEMATE

The MACHINEMATE processes NC program blocks via block buffers. If the NC


program contains cycle blocks in which the complete execution of the preceding
positioning instructions must be guaranteed (such as checking an axis position), then
a G10 block must be inserted.

Error messages that may appear during the processing of cycle programs can be
found in this chapter under "Possible errors".

A NC block first passes through two block buffers in the interpreter process. The first
block buffer activates the cycle interpreter as soon as a cycle block is recognized.
The interpreters block look ahead fills the dynamic block buffer (steps 1 and 2 in the
figure above) with non-cycle blocks. The NC blocks arrive in the dynamic block buffer
of the interpolator. The interpolators execution and removal of blocks (step 3 in the
figure above) is separate from the interpreters block look ahead.

If a G10 code is programmed, it is recognized in the first block buffer (step 4 in the
figure above). The transition of this G10 block to the dynamic block buffer is inhibited,
halting the block look ahead on this block. The interpreters block look ahead is again
enabled only when there are no more blocks in the dynamic block buffer (from the
interpreter process to the interpolator process) .

Example:
N120 G1 X100 F100
N130 G10
*N140 P1 = MVX

Explanation:
A G10 block is necessary so block N140 is not processed (which references the
current X position) until all NC blocks before it (including N130) are finished.

6.2.6 Numbers and variables


Numbers and variables in different forms can be used within cycle blocks. The
following are admissible as numbers:

Whole numbers between -99999999 and 99999999

Floating point numbers with a maximum of eight positions before and after the
decimal point, whereby only the first seven of the positions entered are
significant.

Leading zeros may be written with numbers. If there are no digits after the decimal
point, omit the decimal point.

Variables can be used in the form of free and fixed parameters. Free parameters are
the P-parameters (P1, P2, etc.). These can be used to store any numbers and to
form calculation formulae. Fixed parameters are the CNC parameters (H, D, G, etc.),
with which control-specific and machine-specific data can be accessed.
Part Programming Manual
page 197/352
MACHINEMATE

Numbers and variables can be combined with calculation operations but the
individual number formats used must be compatible.

The P-parameters can be used in "normal" NC blocks instead of numbers. When


allocating numbers to parameters using cycle blocks, it must be ensured that the digit
string matches the preset number of decimal places of the relevant NC address.

Example:
*N50 P1=50000, P2=1000, P3=100
N60 G1 X=P1 Y=P2 F=P3
The N60 block above has the same effect as N60 G1 X50 Y1 F100, when 3 decimal
places are preset for the axis values and 0 decimal places for the feed rates.

ASCII parameters A1, A2, ..., A20


The 20 ASCII parameters are used in a similar way to the P-parameters. The ASCII
codes 0 to 255 can be allocated to the individual parameters as values. Values
exceeding the value range are not recognized. ASCII parameters can be indexed by
P-parameters. See the following three examples.

Example:
*N100 A1=65, A2=66, A3=67

The addresses A, B, and C are allocated as ASCII values to the ASCII parameters
A1, A2 and A3.

Example:
*N100 A1=65, P1=2
*N110 A2=A1+P1

A1 takes the ASCII value of the address A; P1 takes the numerical value 2. A2 takes
the ASCII value of A1 that has been increased by 2 (the ASCII value of the address
C).

Example:
*N200 IF A1=A2 DO P30=0

If the ASCII values of A1 and A2 are the same, then set parameter P30 to 0.

6.2.7 Calculation operations and functions


The following notes and list apply to calculation operations applicable to the
parameter cycles.

The parameters Px, Py and Pz represent arbitrary constants and variables when
they stand to the right of the = sign.

The angle data for SIN, COS, ATN is given in radians. With an expression with
several calculation operations the processing is done from left to right, whereby
Part Programming Manual
page 198/352
MACHINEMATE

any preceding negative signs are always associated with the concerned number
or variable and are not seen as calculation operations.

Brackets or parentheses are not allowed (performed left-to-right).

Several expressions can be written in a program block if a comma separates


them.

Px = Py Allocation Px receives the value of Py


Px = Py+Pz Addition Px = sum of Py and Pz
Px = Py-Pz Subtraction Px = difference of Py and Pz
Px = Py * Pz Multiplication Px = product of Py and Pz
Px = Py: Pz Division Px = quotient of Py and Pz
Px = ABS Py Absolute value Px = absolute value of Py
Px = ATN Py Arc tangent Px = Arc tangent of Py
Px = COS Py Cosine Px = Cosine of Py
Px = DGR Px Degrees Px is converted from radians to degrees
Px = INT Py Round Px = rounded integer value
Px = RAD Px Radians Px is converted from degrees to radians
Px = SIN Py Sine Px = sine of Py
Px = SQT Py Square root Px = root from Py
Px = Py MOD Pz Modulus function Px = remainder of the division Py: Pz

Table 6-2: Calculation operations and functions


Example:
*N10 P1=5, P2=2
*N20 P3=P1+P2
In N10 the value 5 is assigned to P1 and the value 2 to P2. In N20 the sum of P1 and
P2 is formed and assigned to P3. The value 7 is therefore stored in P3.

Example:
*N10 P1=4
*N20 P1=SQT P1
In N10 the value 4 is assigned to the parameter P1. In N20 the square root of 4 is
calculated, and P1=2.

Example:
*N10 P1=3.141593
*N20 P1=COS P1
In N10 the value 3.141593 is assigned to the parameter P1. In N20 the cosine of P1
is calculated and P1= -1.

Example:
*N10 P1=90
*N20 P2=RAD P1
*N30 P2=SIN P2
The value 90 is assigned to the parameter P1 in N10 and in N20 is converted into
radians so that N30 supplies the result P2=1.
Part Programming Manual
page 199/352
MACHINEMATE

Example:
*N10 P1=1
*N20 P2=ATN P1
*N30 P2=DGR P2
In N20, P2 has the value 0.7853982 (Radians). In N30 this value is converted to
degrees. The result is that P2=45.

Example:
*N10 P1=60
*N20 P1=RAD P1
*N30 P1=SIN P1: COS P1
*N40 P1=ATN P1
*N50 P1=DGR P1
In N10, a value is assigned to P1. This value is converted in N20 to radians. In N30
the tangent (sine/cosine) is calculated. In N40 the arc tangent of this is calculated. In
N50 this result is converted to degrees, so that P1 receives the value 60 again.

Example:
*N10 P1=-12.9
*N20 P1=ABS P1
In N10 the value -12.9 is assigned to P1. In N20 the absolute value is formed from
this value, i.e., P1=12.9

Example:
*N10 P1=1.495, P2=3.55, P3=-3.5
*N20 P1=INT P1, P2=INT P2, P3=INT P3
In N10 the value 1.495 is assigned to P1, the value 3.55 to P2 and the value -3.5 to
P3. In N20, P1 has the value 1, P2 has the value 3 and P3 have the value -3. The
operation INT converts a floating point number to an integer by rounding down.

Example:
*N10 P1=13
*N20 P2=5
*N30 P3=P1 MOD P2
The result is 3, since P1:P2 = 13:5 = 2 remainder 3.

Example:
*N10 P1=-13
*N20 P2=5
*N30 P3=P1 MOD P2
MOD calculates the positive remainder to the next smallest whole multiple of P2 and
the result is 2.

Example:
*N10 P1=5
*N20 P2=7
*N30 P3=3
Part Programming Manual
page 200/352
MACHINEMATE

*N40 P4=P1 + P2 MOD P3


The result in P4 will be 0 because of the order of operations as always right to left.
The evaluation order is first 5+7 and then the MOD 3. In order to avoid compatibility
problems, cycle blocks should always be written so that this evaluation is clear.
Sometimes the clearest programming is through the use of several blocks.

6.2.7.1 Operation sequence

When calculating operations, attention must be paid to the sequence of the individual
operations. Operations are processed from left to right. The following examples help
to explain the rules for calculating operations.

All the following examples use P1=30, P2=100, P3=RAD P1, P4=2, P5=4, P6=3.

Example:
*N20 P10=P1 *-P2

In usual notation:

P10 = P1 * (- P2) = -3000

Example:
*N30 P10=-P1 *-SIN P3+-12

In usual notation:

P10=-P1 * (-SIN P3) + (-12) =-30 * (-SIN 0.524)-12=3

Example:
*N40 P10=P1+P2+SIN P3

In usual notation:

P10 = 30 + 100 + SIN 0.524 = 130.5

Example:
*N50 P10=SIN P3

In usual notation:

P10 = SIN (RAD P1) = SIN 0.524 = 0.5

Example:
*N60 P10=12+P1

In usual notation:

Part Programming Manual


page 201/352
MACHINEMATE

P10 = 12 + 30 = 42

Example:
*N70 P10=P1+P2 * SIN P3-18.3

In usual notation:

P10 = ((P1 + P2) * SIN P3)-18.3 = 46.7

Example:
*N80 P10=P1+P2 * P4+SQT P5 * P6

In usual notation:

P10 = (((P1 + P2) * P4) + SQT (P5)) * P6


= (((30 + 100) * 2) + SQT (4)) * 3 = 786
Example:
*N90 P3=4, P3=SQT P3+P3+2
*N95 P3=4, P3=SQT P3, P3=P3+2
The calculation in N90 gives P3=8, the calculation in N95 gives P3=4. This is
because Result variables are only changed at the end of each complete calculation
operation.

6.2.7.2 Possible calculation errors

If calculation errors occur it is generally because of the following:

Division by zero
Root of a negative number
Overflow: Number > 99999999
Spelling errors (e.g., P1=SON P1)
Index too large (e.g., P1=6000, PP1=3 and only 1000 parameters set-up)

6.2.8 Use of P-parameters


In the standard equipment 1000 P-parameters (P1, P2, up to P1000) are available. If
a numerical value is assigned to a parameter during the execution of a cycle
program, then this value is retained until a new value is assigned to this parameter.
This value also remains stored when the CNC is switched off.

P-Parameters can be programmed in NC blocks instead of numerical values. The


current numerical value, which is momentarily stored under the respective parameter
number, is first assigned to the parameter during processing when the relevant NC
block is processed. It is possible to change the parameter values during installation in
the operating mode DATA or in the NC program through cycle blocks.

Part Programming Manual


page 202/352
MACHINEMATE

P-Parameters can be combined with all available calculation operations (see


examples in the previous chapter).

6.2.8.1 Technological or machine values

If technological values are stored in P-parameters (e.g., axis coordinates such as


lengths or angles, feed rates or rotational speeds) then the numerical values also
fundamentally contain the preset fixed decimal places. The number of decimal places
is determined by the machine tool manufacturer machine parameters.

Example:
The resolution for linear movement is one thousandth of a millimeter (3 decimal
places).

*N70 P12=50500, P13=1000


N80 G1 X=P12 Y=P13 F=P13

The line N80 is equivalent to:

N80 G1 X50.5 Y1 F1000

With a machine parameter change in the control configuration, it is also possible for
the parameters to take their intended values, so there is no decimal point shifting
required, so N70 could be P12=50.5,P13=1.0 and N80 would result in the same
execution except that F=P13 would be F1. This manual assumes the default setting
for cycle parameters which means this no decimal point programming is active.

If a rotary axis position is used for a calculation in a cycle block then this no decimal
point programming assumption must be recognized in that calculation. The
DGR/RAD operations use the expected interpretations for their values, like an input
of 90.0 to RAD represents 90.0 degrees and an output of 45.0 from DGR represents
45.0 degrees. The DGR/RAD operations are relevant since all of the trigonometric
operations (ATN, COS, SIN) use radians, not degrees (see 6.2.7). If the current
rotary axis position is 45.0 degrees and the rotary axis position is shown with 3
decimal places then those decimal places will appear in the cycle parameter value
representing its position (e.g., *N1 P3=B when B is at 45.0 degrees will result in P3
having a value of 45000; see 6.2.9.6). When in this no decimal point programming
context and with the rotary axis resolution to 3 decimal places, a cycle parameter
value representing its position would be divided by 1000 prior to its input to the RAD
operation for the correct conversion.

Part Programming Manual


page 203/352
MACHINEMATE

6.2.8.2 Indexed P-parameters

The indexed parameter is recognized by the notation double-P. PPx designates the
parameter whose number is positioned in Px.

Example:
*N10 P1=5, PP1=7

The cycle block produces P5=7.

Note: When using indexed parameters it must be ensured that the index parameter
(e.g., P1 with PP1) contains a meaningful value; otherwise the error message
262 is output. A parameter used as an index may not be indexed itself (because
indexing of indexes is not possible).

6.2.8.3 Reserved parameters

The first 200 parameters can be used to easily communicate to the PLC. Therefore,
we recommend that the first 200 parameters be reserved for that purpose.

A contiguous block of 50 parameters is reserved for special functions. The location of


this reserved parameter block can be preset using a machine parameter. The default
location is P10-P59. Refer to the control manufacturer's documentation.

Important: For reasons of safety, the 50 reserved parameters should not be used for other
purposes. Since the default start of this block is parameter 10, practically the
first 60 cycle parameters are not available for user applications (with the first
10 being used for the canned drilling cycles). The following list contains the
assignment of some reserved parameters to the corresponding special
functions; the remaining reserved parameters are intended for more specific
purposes or for future expansions. (For each, the value of x is the number of
the first reserved parameter, whose assignment is carried out by setup data).

Part Programming Manual


page 204/352
MACHINEMATE

Parameters Assignment/meaning
P (x+0) reserved
P (x+1) reserved
P (x+2) Contains start parameter number for SEL:80
for the set of 15 active G-codes
P (x+3) to Reserved
P (x+7)
P (x+8) 0, if CONTROL RESET was triggered
P (x+9) 0, if operating mode memory or DATA chosen
P (x+10) 0, if CONTROL RESET was triggered manually
P (x+11) to Analog value read in with SEL:61 - SEL:68
P (x+18) for A/D channel 1 to channel 8
P (x+19) to Reserved
P (x+20)
P (x+21) to Analog value output with SEL:71 - SEL:73
P (x+23) for D/A channel 1 to channel 3
P (x+24) to User cycle parameters (one for each letter
P (x+49) in the work cycle block)
Table 6-3: Reserved cycle parameters

The user cycle parameters (at the end of the table above) allow the programmer to
access the NC statement fields within a work cycle, where the value with each letter
in the block is passed to its corresponding cycle parameter.

For example, if the code G920 is assigned to be the first work cycle and its work
cycle subprogram is assigned to be 900001, then this subprogram can interpret the
values provided with the work cycle G-code. A statement of N1G920 (assuming the
default assignment for the reserved parameters is starting at P10, so x in the table is
10) results in P47 having a value of 1 (since N is the 14th letter of the alphabet and
with an A value going to P34 so the N value goes to P47) and P40 having a value of
920 (since G is the 7th letter). The work cycle must recognize that the number of
decimal places for the particular parameter affects the user cycle parameter values.
A statement of N1G920Z5.5 where Z has 4 decimal places results in P59 having a
value of 55000 in the work cycle. However this does not prevent the work cycle from
directly passing on axis commands since a subsequent statement in the work cycle
of N20Z=P59 would move Z to 5.5 as expected (if G90 is modal), as described in
section 6.2.2.

A letter that is not present in the work cycle block will be given an invalid value,
approximate 1 x 10^308. Typically, the work cycle subprogram monitors for letters
that are not present by checking for a large number, like this

*N100 IF P34>99999999 GO 200

Where the work cycle will jump ahead to block N200 if the letter A (whose value goes
to P34) is missing with the work cycle G-code.

Part Programming Manual


page 205/352
MACHINEMATE

6.2.9 Use of CNC parameters

6.2.9.1 Summary of the CNC parameters

Dx Path compensation, x = comp number (1-128)


DWx Path compensation wear offset, x = comp number
(1-128)
Hx Length compensation, x = comp number (1-128)
HWx Length compensation wear offset, x = comp
number (1-128)
Hxa Length compensation, x = comp number (1-64),
a = axis letter
HWxa Length compensation wear offset, x = comp
number (1-64), a = axis letter
Gxa Part position offset, x = 54-59, a = axis
letter
IBx Input bit from PLC, x = 1 to 8
OBx Output bit to the PLC, x = 1 to 8
a Read current axis position, a = axis letter
AVa Read current axis position, a = axis letter
MVa Read current axis position (including any
following error), a = axis letter
Table 6-4: Summary of CNC data as cycle parameters
The number of available H and D compensations depends on whether the
corresponding option is available.

The allocation of values to these CNC parameters (e.g., *N200 H1X=12) causes a
table entry to be updated in the length compensation 1 for the X-axis. Thus an
already existing entry, which could have come from the tool presetter, is overwritten
(the above value corresponds to 0.012 mm for example with G71 modal). Numerical
values within the CNC parameters can also be replaced by P-parameters (without
indexing).

Example:
*N300 P1=5
*N310 HP1X=22
HP1X is equivalent here to H5X.

6.2.9.2 Length compensation Hx, Hxa

Up to 128 H-compensations can be set or read with the parameters Hxa. If only one
compensation axis is available, then the parameters are H1, H2, ... H128. If there are
two compensation axes, the parameters are H1X, H2X and H1Y, H2Y etc.,
depending on which axes are set up. The wear compensation values are also
available to read or write. If only one compensation axis is available then the wear
parameters are HW1, HW2, HW128. If there are two compensation axes, the
parameters are H1X, H2X and H1Y, H2Y etc., up to 64 sets, with the axis letters

Part Programming Manual


page 206/352
MACHINEMATE

depending on which axes are set up (with the accompanying wear offset parameters
as HW1X, etc.).

Example:
*N10 H1=P1

Entry of an H-compensation is possible like this when the H-table is configured for
only one axis. The H-table compensation 1 takes the value of P1.

Example:
*N10 H1Y=P1

Entry of the H-compensation for the Y-axis if H-compensation is defined for 2 axes.

Example:
*N10 P2=1
*N20 HP2X=12

Allocation of the value 12 (increments) to the H-compensation 1 of the X-axis.

6.2.9.3 Path compensation Dx

Up to 128 D-compensations (D1, ..., D128) can be set or read with the parameters
Dx. The wear compensation values are also available to read or write with the
parameters DW1 to DW128.

Example:
*N10 P1=D12
*N20 D120=P20

Storage of the compensation value D12 in the parameter P1 (N10) and assignment
of the compensation value D120 with the content of the parameter P20 (N20).

Example:
*N30 P1=5
*N40 DP1=18400

The result of the indexing in N40 is D5 = 18 400. The compensation value stored in
D5 is 18.4 mm when G71 is model (would be 1.84 inches with G70 modal). The code
DR is used to reference the dresser wheel orientation in the D-table.

6.2.9.4 Part position offset Gxa

Six part position offsets (G54-G59) are available per axis. The axis address (e.g., X,
Y, and Z) must always be indicated here. The compensation number can also be
given here via the P-parameter.
Part Programming Manual
page 207/352
MACHINEMATE

Example:
*N100 G54Z=53000, G54X=0, G54Y=0, P1=54
N110 G=P1

N100: Table entry and N110: Activate G54 offset of Z = 53 mm.

6.2.9.5 Input/output bits (cycle byte) OBx, IBx

For the programming of parameter cycles a standard interface of 2 sets of 8 bits are
available for the communication with the machine PLC. The following notation is
used:

IB1-IB8 stands for: read PLC interface input bit 1-8, IN_CYCB_01

OB1-OB8 stands for: write PLC interface output bit 1-8, ON_CYCB01.

The bit number can also be given via parameters (e.g., IBPX). Upon execution, a
test is made on the value stored in the parameter. For values smaller than 1 or
larger than 8, the error message 262 appears.

IBx is only admissible in expressions after IF (e.g., IF IB1=1 GO 50); direct allocation
to parameters (e.g., P1=IB1) is not possible. In the latter case the error message 261
appears.

The output bits 1-8 are set to 0 at CONTROL RESET. It can however be set that the
output bits retain their values at CONTROL RESET in the PLC.

Example:
*N30 OB3=1

The output bit 3 is set to 1.

Example:
*N30 IF IB2=0 DO...

The input bit 2 is scanned to see if it contains 0.

Example:
*N30 P5=P2 MOD 8+1, OBP5=0

A value is assigned to the parameter P5 between 1 and 8, and then the


corresponding output bit is set to 0.

Example:
The following cycle block causes the execution to wait until the bit 3 in the PLC
interface is set to 0 by the PLC:

Part Programming Manual


page 208/352
MACHINEMATE

*N230 IF IB3 >0 GO 230


*N240... /here the PLC has set the bit 3 to zero

Input bits and output bits can only have the values 0 or 1. Values not equal to 1 are
treated as 0 during the allocation. Reading and describing the PLC interface is
meaningful for some applications, for example:

Using measuring probes and other measuring devices

Scanning the page at part tables

Overwriting the feedrate by PLC

6.2.9.6 Current position of axes

The current set positions of the axes can be directly assigned to parameters.

These values are in actual G92 coordinates not programmed coordinates. If an axis
position is offset by a part zero offset (one of G54 to G59) and/or by a tool length
offset (one of H1 to H128) the axis position will reflect that offset in its position. For
example if an axis is programmed to be at +1.000 but the active G54 offset for the
axis is +1.000 and the active H1 offset for the axis is +0.500 then the axis position
obtained by the axis letter parameter would be 2500 (in G71 with the no decimal
point format described in 6.2.8.1), which comes from the programmed position plus
any active offsets for the axis. Note that if there is an active G92 offset for this axis
that G92 offset value will not be included in this axis position value. An active G92
offset for the above example would not affect the axis position. Therefore this axis
position is not really machine coordinates because this G92 offset (G92 is a zero shift
from machine coordinates) is not included.

An example:

G56 Z is +1.0000. These positions are in G70/inch. The Z axis has an observed LAG
of about -0.0008 at standstill due to an analog offset in the drive.

The sequence:

1) Z at 0.0 with no offsets of any kind


2) G0 Z1. (move Z to +1.)
3) G92 Z0 (shifts Z zero position by -1.)
4) G56 Z1 (move Z to +1. in G56 work offset which has shift in Z zero by +1.)
5) G92 (removes the G92 zero offset)
6) G53 (removes the G56 work offset)

Part Programming Manual


page 209/352
MACHINEMATE

The values provided by these three cycle block parameters after each step:

Z AVZ MVZ
1) 0 0 -8
2) 10000 10000 9992
3) 0 0 -8
4) 20000 20000 19992
5) 30000 30000 29992
6) 30000 30000 29992
If there is no G92 offset active then these values of these reserved names are in
machine coordinates. If there is an active G92 offset then these values reflect that
zero shift.

Note that these values do not change if the axis is affected by diameter programming
(G190/G191). For example if G190 is active (radius programming) and X is moved to
1.0 (1.0 inch from center line) then AVX will be 10000. If G191 is active (diameter
programming) and X is moved to 1.0 then AVX will be 10000. This matches the
programmed position even though X is really at a physical location of 0.5 when at a
programmed diameter of 1.0 since the X feedback/position scaling is in the radius
context, or the distance from center line). Therefore the NC programmer should not
have to check for the G190/G191 condition when using any of these reserved names
for axis data.

The axis letter can be used to obtain the current programmed position for the axis.
The symbol AVx, where x is the letter of the axis, will also get the current
programmed position. The symbol MVx, where x is the letter of the axis, will get the
current axis position (its commanded position with any following error that is present).

Example:
*N250 P1= AVx, P2= AVy
*N260 P3= X
The current set position of the X-axis (without following error of the position control) is
stored in the parameter P1, the current set position of the Y-axis is stored in
parameter P2 and the current set position of the X-axis is stored in parameter P3.

If G56 and H5 were both active then the following cycle block calculation will result in
the P1 having the current Z axis position in the part coordinate system (when the H-
table has been configured for 2-axes, X and Z):

*N270 P1=AVZ-G56Z-H5Z-HW5Z

AVZ is the effective Z axis position in the part coordinate system because its value
includes both any part zero offset (G5x) and any tool length offset (Hx and its wear
offset HWx). Note that either Z or AVZ (i.e., just the axis letter alone or the 3-letter
combination of AV with the axis letter) will always be equivalent in a cycle block. This
calculation would be valid regardless of a G92 shift in the part zero.

Part Programming Manual


page 210/352
MACHINEMATE

A subsequent block like the one below following the above block would result in no
motion of Z because P1 is the current Z axis position in part coordinates after the
N270 calculation when G56 and H5 were active:

N280 G90 Z=P1

6.2.10 Conditional instructions and jump instructions


As with many other programming languages conditional codes can also be
programmed for the parameter cycles. This entails the use of the IF question to test
for a state and the execution of a following action based on the result of the question
(via the DO instruction or GO instruction).

6.2.10.1 IF Question

Example:
It is desired to execute the calculation P2=P1 * 2 if P1=5:

Question Action state


*N10 IF P1=5 DO P2=P1 * 2

If the condition is satisfied, the subsequent instruction from "DO" to the


end of the block is executed.

If the condition is not satisfied, all instructions located between "DO" and the end
of the block are jumped over.

A question is made up of two operands between which a comparison operator is


positioned. P-parameters, CNC parameters or numbers can represent operands.

The following characters can be used as comparison operators:

= : equal to
> : greater than
< : less than

An action can be made up of a jump instruction (GO) or an End symbol (DO) followed
by one or more cycle instructions, where DO only has an effect on the current block.

6.2.10.2 Jumps

The jump instruction GO block number causes the program to jump to the NC
block with the corresponding block number. It operates as a conditional instruction
(with IF) and as an unconditional instruction (without IF). If the NC block which is

Part Programming Manual


page 211/352
MACHINEMATE

programmed as a jump destination is not found, the error message 69 appears.


Ascending block numbers must be used in the part program with a GO instruction.

Example:
*N10 GO 200

This is an unconditional instruction. It causes the program processing to be continued


at block N200.

Example:
*N10 IF P1=30 GO P1

This is a conditional instruction. If the parameter P1 has the value 30, a jump is
executed to N30.The block number can be given either as an absolute number or via
parameters.

Example:
*N10 GO 200

or
*N10 P1=200
*N20 GO P1

or
*N10 P1=200
*N20 P2=1
*N30 GO PP2

All three previous examples result in a jump being made to block N200. For this
function it is important that block numbering in ascending order is kept or is
guaranteed by the editor. It is possible to jump to either a higher or a lower block.

Note: With MDI (manual data input), no jump instructions may be used.

6.2.10.3 Loops

Loops can be programmed using the IF instruction together with GO. The number of
loop passes can be determined by a P-parameter.

Example:
*N50 P1=10
N60
N70...
N80...
N90...
...
*N140...
*N150 P1=P1-1, IF P1 > 0 GO 60

Part Programming Manual


page 212/352
MACHINEMATE

...
Explanation:

N50: 10 loop passes are defined


N60-N140: This program segment is to be repeated.
N150: Jump to block N60 if P1 is greater than or
equal to 0.
The programming becomes even more flexible by the use of indexed parameters
together with loops (see next example).

Example:
All parameters from P1 to P800 are to be set to zero.


*N100 P1=800
*N110 PP1=0, P1=P1-1, IF P1 > 0 GO 110
*N120 P1=0
...
P1 is used as an index. The line N110 is repeated 799 times.

6.2.11 Possible errors


The most important error messages, which can appear during the cycle programming
are listed below together with notes on causes of errors and their removal.

6.2.11.1 Error message No. 260

Cycle error in block No. ____, Key word incorrect

Error Recognition:
After editing a block
By running
Possible causes of error:
Non-admissible operator or start of key word

Point used where it is not allowed


Too many digits before or after the decimal point
Index too large
False axis address
Error removal:
Correct the cycle block

Example: HXP1 instead of HP1X

Part Programming Manual


page 213/352
MACHINEMATE

6.2.11.2 Error message No. 261

Cycle error in block No. _____, Instruction incorrect

Error recognition:
After editing a block
By running
Possible causes of error:
The composition of key words does not produce a cycle block.

Error removal:
Correct the cycle block.

Example:
N20 P1=IB1 instead of *N20 IF IB1=P1 DO...

6.2.11.3 Error message No. 262

Cycle error in block No. ____, Index too large/small

Error recognition:
By execution when using a parameter as index

Possible causes of error:


Index too large or too small

Error removal:
Index as number (not as parameter): check syntax

Index as parameter: examine parameter value

6.2.11.4 Error message No. 263

Cycle error in block No. ____, Parameter content incorrect

Error recognition:
By execution

Possible causes of error:


Division by zero
Root of a negative number
Integer overflow

Part Programming Manual


page 214/352
MACHINEMATE

Integer underflow
Error removal:
Examine parameter value
Correct program

6.2.12 Instructions

6.2.12.1 Instruction: IF < comparison > < action >

Function:
Conditional instruction

Description:
If the comparison is satisfied, the programmed action is executed. In the question two
operands (parameters, input bits or constants) are combined with a comparison
operator. Possible comparison operators:

= is equal to
> is greater than
< is less than
Table 6-5: IF comparison operators
Description:
An IF instruction will always be followed by one of these two instructions:

GO instruction, [instruction], ...

DO instruction, [instruction], ...

Example:
*N10 IF P1 > P2 GO 100

If the parameter P1 contains a value larger than P2, jump to block N100.

Example:
*N20 IF P1=P2 DO P1=10

Explanation:
If the parameter P1 contains the same value as P2, set P1=10.

6.2.12.2 Instruction: GO < block-no. >

Function:
Jump to the block number

Part Programming Manual


page 215/352
MACHINEMATE

Description:
The processing of the NC program is to be continued at the block number indicated.
Use together with IF instruction as a conditional jump or without IF as an
unconditional jump.

Example:
*N50 GO 210

Jump to program block N210.

Note: No jumps may be programmed in MDI. If the jump destination is not


found, error message 69 is given.

6.2.12.3 Instruction: DO < instruction>

Function:
Execute!

Description:
The relevant instruction is to be executed. DO is used only with an IF instruction.

Example:
*N60 IF P1=0 DO P1=10, P2=1

Explanation:
If the parameter P1 contains the value 0, set it to the new value 10. Parameter P2 is
then set (independently) to 1.

6.2.12.4 Instruction: SEL < instruction>

Function:
Select a function

Description:
The selected function is to be executed.

Parameters:
nn identifies the special function to select

SEL: 0 Deactivation of all SEL-special functions


SEL: 10 Parameter transformation OFF
SEL: 11 Parameter transformation ON
SEL: 61-68 Read in analog value via channel 1 to 8 of the AD-board to
its cycle parameter (one per AD channel)
SEL: 70 Switch off DA-Output
SEL: 71 Request for DA-output for channel 1 of the DA-board from
its cycle parameter (one per DA channel)
SEL: 72 Request for DA-output for channel 2 of the DA-board
Part Programming Manual
page 216/352
MACHINEMATE

SEL: 73 Request for DA-output for channel 3 of the DA-board


SEL: 80 The active G-codes of the 15 G-code groups are copied to
15 parameters. The number of the first of the 15 parameters
used for this is placed in the reserved parameter area at P
(x+2).
Table 6-6: Summary of cycle block SEL functions
Please reference table 6-3 for the relevant cycle parameters for these respective SEL
function selections.

Example:
SEL: 80

*N110 P192=10
*N120 SEL: 80
...
It is assumed for this example that the reserved parameter area starts at parameter
190. In block 120 the active G-codes of the 15 groups are written in the parameter
table starting from the parameter number determined by the setting of P192 (x+2,
where x is the start of the special reserved block of 50 parameters), written in block
110. In this case, the parameters P10 to P24 are used because the value of 10 is
used in the (x+2) parameter.

To enable the part program for A/D or D/A access (i.e., SEL:nn is 61 to 73), there is a
machine parameter in the control configuration that must be properly set up defining
which cycle parameter is used for the input from the A/D or for the output for the D/A
(see 6.2.8.3 for information about this block of cycle parameters).

Part Programming Manual


page 217/352
MACHINEMATE

6.3 Work Cycles


6.3.1 General notes
Up to 8 user-defined work cycles can be created. Their configuration consists of 1)
defining the first of the set of 8 G-codes and 2) defining the subprogram number for
each G-code (since they are specified individually these numbers do not have to be
consecutive). The part program calls these work cycles by their G-code.

Parameters from A to Z can be passed from these cycles where the values are
stored in the Reserved Parameter area from P34 to P59 (by default; this area can be
assigned to a different set of cycle parameters). These user cycle parameters are
described in section 6.2.8.3.

These work cycles are G-codes that invoke specific subprograms. The work cycles
are not drilling cycles, which have a modal behavior (i.e., within a drilling cycle each
axis move block results in another drilling cycle until the G80 cancels the cycle). The
work cycles run only once, when invoked by its G-code in an NC statement.

6.3.2 Example
If the first work cycle G-code is defined to be 920 and the first work cycle subprogram
is defined to be P900001, then a part program statement like N10G920X1.1Z3.3 will
immediately call the subprogram P900001, with the parameters within that NC
statement.

Within the subprogram P900001, the cycle parameters can be checked for values
and then processed. If the letter is not present in the statement, then the cycle
parameter is given a very large (nearly infinite value) value of about +1.2345E+308.
This behavior allows the work cycle to react to the presence or omission of any
letters within the NC statement. For example, if the letter A is assumed to have 3
decimal places then a field of A4 with the G920 results in P34 having a value of
4000.

Part Programming Manual


page 218/352
MACHINEMATE

7 Drilling Cycles
7.1 Introduction
The programming of drilling processes can be simplified using the drilling cycles. The
available selection of drilling cycles covers the most important standard cases. The
programmer only has to define a few parameters in order to adapt the drilling cycles
to a particular application.

The cycle programming of the cycle level 1 must used for the drilling cycle
parameters.

The drilling cycles are recognized as independent subroutines in a protected area of


the NC part program memory with the program numbers P999981 to P999989.
However, their call is made in a simplified form through G-codes G81 to G89. The
drilling cycles cannot be changed or cancelled.

The machine tool manufacturer can change the program sequence in the individual
drilling cycles if required. Refer to the control manufacturer's documentation to
determine if this is the case.

Call and set-up of the drilling cycles are modeled according to DIN 66025.

One of G81 to G89 sets that drilling cycle as modal, with subsequent axis blocks
causing that cycle to run at that new axis position after their move.

G80 cancels the modal condition for a drilling cycle.

Note: G-Codes and program numbers for work cycles can be preset and thus could
have been changed by the machine tool manufacturer. For details about this,
please refer to the machine tool manufacturer's documentation. This
description of the drilling cycles however is based on the default values for G-
codes (G80-G89) and program numbers (P999981-P999989).

Part Programming Manual


page 219/352
MACHINEMATE

7.2 Use of the drilling cycles


A drilling cycle in an NC part program is always programmed in the following steps:

Allocate the parameters

Select the desired drilling cycle

Move to the drilling position in X and Y (once or repeatedly)

Automatically call up and execute the selected drilling cycle after reaching the
drilling position

Deselect the drilling cycle

7.2.1 Allocation of the parameters/definition of terms


Before a drilling cycle is selected, feed rate, spindle speed and the parameters
with the geometric data of the respective drilling cycle must be programmed.
Specific parameters are for example motion distances and dwell times. The
drilling cycles use the parameters P1 to P15. Always allocate the correct
parameters to the corresponding drilling cycle.

If not all parameters are allocated with values, no error message is output. Within
the drilling cycle all parameters which are necessary are used unchecked. Error
messages due to incorrect or non-allocated parameters can first appear during
the execution.

The reference plane lies at the safety clearance above the work piece surface.
Above this plane it is possible to move vertically in the rapid traverse. Below this
plane, rapid traverse is only possible in the Z+ direction (or away from the work
piece). The feed movements start from the reference plane. See Figure 7-1.

The retract plane is the plane to which the spindle moves at the end of the
drilling cycle. The spindle is then at the position to move between holes. See
Figure 7-1.

The final hole depth is obtained from the measuring point of the tool. For
example, this is the drill tip for a twist drill or an arbitrary point on the top surface
for a machine reamer. See Figure 7-1.

The cycle parameters are assigned values based on no decimal points. The
cycle parameter value must consider the number of decimal places for the
particular parameter.

Part Programming Manual


page 220/352
MACHINEMATE

If a cycle parameter is given a dimension in inches (usually 4 digits after the decimal
point), then the dimension is multiplied by 10,000. For example, a final hole depth of
1.25 inches would be defined with a cycle parameter value of 12500.

If a cycle parameter is given a dimension in millimeters (usually 3 digits after the


decimal point), then the dimension is multiplied by 1000. For example, a final hole
depth of 1.25 mm would be defined with a cycle parameter value of 1250.

If a cycle parameter is given a value for time in milliseconds but the F word provides
time in seconds (usually 3 digits after the decimal point), then the value as seconds is
multiplied by 1000. For example, a dwell time of 0.25 seconds would be defined with
a cycle parameter value of 250.

Retract Plane

Reference Plane

Final hole depth

Figure 7-1: Reference plane, retract plane and final hole depth
Each drilling cycle description includes an example of NC blocks, a figure illustrating
the steps of the cycle and a description of the sequence. Each figure shows where
the Z-axis zero-plane is (at the left of the part), to help identify the respective
parameters values in the sequence.

Part Programming Manual


page 221/352
MACHINEMATE

7.2.2 Selection of the desired drilling cycle


By programming the G-codes G81 to G89 the corresponding subroutine is selected.
The cycle itself is first selected automatically after the positioning of the X or Y-axis
(see below). The feed-in of the drilling cycles is always made in the Z direction.

Note: After termination of the drilling cycle with G80, the G00-code (linear
interpolation in the rapid traverse) is always active. If destination point
coordinates are programmed in a following NC block without a G-code, then a
move to these points is made in the rapid traverse.

No drilling cycle is performed on the block with the G81 to G89 unless the
block also contains an X or Y coordinate. If X or Y is in the G8x block then that
axis motion will occur before the actual drilling cycle at that X/Y position. With
no X or Y in the block the first execution of the drilling cycle occurs on the next
block having an X or Y command (see the example below).

7.2.3 Move to the drilling position in X and Y (once or repeatedly)


A drilling cycle is independently called up after each positioning of the X or the Y-axis
as long as it has been selected. This is true as long as one of the following G-codes
is modally effective:

G00 Linear interpolation in the rapid traverse

G01 Linear interpolation in the feed rate

G02 Circular or helical interpolation with specified center point in the clockwise
direction

G03 Circular and helical interpolation with specified center point in the counter-
clockwise direction

G07 Tangential circular interpolation

G12 Circular or helical interpolation with specified radius in the clockwise


direction

G13 Circular or helical interpolation with specified radius in the counter-


clockwise direction

G33 Thread cutting, constant rise

G34 Thread cutting, variable rise

Note: Drilling cycles cannot be used during modally effective G06 (spline
interpolation).

Part Programming Manual


page 222/352
MACHINEMATE

Example:
N30 G1 F1000 S500
*N40 P2=500000, P3=420000
*N50 P10=600000, P4=1000
N60 G82
N70 X20 Y20
N80 X40 Y70
N90 G80
N100...

The definitions of the parameters are created in the program blocks N40 and N50.
These definitions are used in the subsequent cycle (NC subroutine). In N60 the
drilling cycle G82 is activated (spot facing with dwell time). The drilling cycle is first
processed after the position programmed in N70 is reached. G00 (rapid traverse) is
effective after the termination of the drilling cycle. The following NC block causes a
further processing of the drilling cycle at a new X/Y position. The cycle is deactivated
again with the instruction G80.

The above program was running in G70 (inch mode). In that context, N40 assigned
the reference plane (P2) to 50.0 inches and the final hole depth (P3) to 42.0 inches.
N50 assigned the retract plane (P10) to 60.0 inches and the dwell (P4) to 1 second
(or 1000 milliseconds). N70 performed the cycle at X of 20.0 inches and Y of 20.0
inches. N80 performed the cycle at X of 40.0 inches and Y of 70.0 inches.

If the above program was run in G71 (metric mode), then N40 assigned the reference
plane (P2) to 500.0 mm and the final hole depth (P3) to 420.0 mm. N50 assigned the
retract plane (P10) to 600.0 mm and the dwell (P4) to 1 second (or 1000
milliseconds). N70 performed the cycle at X of 20.0 mm and Y of 20.0 mm. N80
performed the cycle at X of 40.0 mm and Y of 70.0 mm.

A subroutine call cannot be made from the X and/or Y block to run a drilling cycle.
The drilling cycle is an implied subroutine that runs automatically for this block so
another subroutine cannot be run as well from the same block. The subroutine will be
ignored. The N70 below is an example of this invalid syntax:

N60 G81
N70 X4 Q345 (A SUBROUTINE CALL IS NOT VALID HERE)
N80 Y7
N90 G80

Part Programming Manual


page 223/352
MACHINEMATE

7.2.4 Deselecting of the drilling cycle


An activated drilling cycle is deselected either by the program word G80 or by calling
up another drilling cycle.

Note: No motion occurs during the G80 block unless it also contains an axis
coordinate. If the G80 block contains an X or Y coordinate the G80 occurs first
(canceling the drilling cycle). If an axis command is in the G80 block then that
axis motion will occur after the drilling cycle is cancelled. That axis motion with
the G80 is never part of the previous drilling cycle.

When using the G-codes G80-G89 to call up drilling cycles, the following
overlapping with other functions exist:

5-axis transformation

Corner jump, contour accuracy (Look Ahead)

Activation of positioning axes

If one or more of these functions are available in your control configuration, then
other G-codes must have been assigned by the machine tool manufacturer either to
these functions or to the call up of drilling cycles. For further information about this,
please refer to the control manufacturer's documentation.

As a consequence of programming drilling cycles as NC subroutines, the execution


of the drilling cycles is limited to one main and four subroutine planes. Thus, drilling
cycles cannot be executed from the 4th subroutine plane outwards. However, an
execution from the main program plane or from the 1st to 3rd subroutine planes is
possible. The execution (the implicit subroutine call up) is made after the
programmed positions have been reached.

Part Programming Manual


page 224/352
MACHINEMATE

7.3 G80 Cancel the drilling cycle


Syntax: G80

The function drilling cycles is deselected with the program word G80. Positioning
instructions following G80 therefore cause no more cycle call up for that drilling cycle.

7.4 G81 Drilling to final depth


Syntax: G81
The program word G81 selects the drilling cycle drilling to final depth. The feed
values and rotational speeds defined in the NC program are used in the drilling cycle.
The following three parameters must be defined before calling up this cycle:

P2 Reference plane, absolute Z coordinate


P3 Final hole depth, absolute Z coordinate
P10 Retract plane, absolute Z coordinate

Example:
...
*N40 P2=25000, P3=10000
*N50 P10=30000
N60 G81
N70 X10 Y15
N80 G80
N90 ...

The above program was running in G70 (inch mode). In that context, N40 assigned
the reference plane (P2) to 2.5 inches and the final hole depth (P3) to 1.0 inches.
N50 assigned the retract plane (P10) to 3.0 inches. N70 performed the cycle at X of
10.0 inches and Y of 15.0 inches.

Part Programming Manual


page 225/352
MACHINEMATE

Figure 7-2: Drilling cycle G81

Sequence of drilling cycle G81:


1. Rapid traverse in the Z direction to the reference plane (P2).

2. Drill to the final hole depth (P3) using the current feed rate.

3. Pull out in rapid traverse to the retract plane (P10).

Part Programming Manual


page 226/352
MACHINEMATE

7.5 G82 Spot facing with dwell time


Syntax: G82
The program word G82 selects the drilling cycle spot facing with dwell time. The
feed values and rotational speeds defined in the NC program are used in the drilling
cycle. Four parameters must be defined before calling up this cycle:

P2 Reference plane, absolute Z coordinate


P3 Final hole depth, absolute Z coordinate
P4 Dwell time in ms
P10 Retract plane, absolute Z coordinate

Example:
N30 ...
*N40 P2=25000, P3=10000
*N50 P4=1000, P10=30000
N60 G82
N70 X10 Y15
N80 G80
N90 ...

The above program was running in G70 (inch mode). In that context, N40 assigned
the reference plane (P2) to 2.5 inches and the final hole depth (P3) to 1.0 inches.
N50 assigned the dwell (P4) to 1 second (or 1000 milliseconds) and the retract plane
(P10) to 3.0 inches. N70 performed the cycle at X of 10.0 inches and Y of 15.0
inches.

Part Programming Manual


page 227/352
MACHINEMATE

Figure 7-3: Drilling cycle G82


Sequence of drilling cycle G82:
1. Rapid traverse in the Z direction to the reference plane (P2).

2. Drill to the final hole depth (P3) using the current feed rate.

3. Wait for the dwell time (P4) to elapse before breaking contact with work piece.

4. Pull out in rapid traverse to the retract plane (P10).

Part Programming Manual


page 228/352
MACHINEMATE

7.6 G83 Deep hole drilling


Syntax: G83
The program word G83 selects the drilling cycle deep hole drilling with shaving
removal. The feed values and rotational speeds defined in the NC program are
taken over in the drilling cycle. Seven parameters must be defined before calling up
this cycle:

P1 First delivery, incremental value


P2 Reference plane, absolute Z coordinate
P3 Final hole depth, absolute Z coordinate
P4 Dwell time in ms
P5 Further feed-in, incremental value
P6 Safety clearance, incremental value
P10 Retract plane, absolute Z coordinate
Example:
N30...
*N40 P1=12500, P2=25000
*N45 P3=2500, P4=1000
*N50 P5=5000, P6=2500
*N55 P10=30000
N60 G83
N70 X10 Y15
N80 G80
N90...

The above program was running in G70 (inch mode). In that context, N40 assigned
the first delivery plane (P1) to 1.25 inches and the reference plane (P2) to 2.5 inches.
N45 assigned the final hole depth (P3) to 0.25 inches and the dwell (P4) to 1 second
(or 1000 milliseconds). In that context, N50 assigned the further feed increment (P5)
to 0.5 inches and the safety clearance increment (P6) to 0.25 inches. N55 assigned
the retract plane (P10) to 3.0 inches. N70 performed the cycle at X of 10.0 inches
and Y of 15.0 inches.

Note that the parameter P14 is used during this canned cycle for the calculation of
the intermediate Z depth. P14 is treated as a temporary variable and its value is
never maintained from before to after the drilling cycle.

Part Programming Manual


page 229/352
MACHINEMATE

Figure 7-4: Drilling cycle G83

Sequence of drilling cycle G83:


1. Rapid traverse in the Z direction to the reference plane (P2).

2. Drill using the current feed rate with the first feed-in value (P1) to depth 1.

3. Pull out in rapid traverse to the reference plan (P2).

4. To allow the drill bit to cool, the Z-axis remains on the reference plane (P2) during
the dwell time (P4).

5. Move in rapid traverse to P1-P6 (first feed-in minus safety clearance) in the hole.

6. Drill to the depth 2: P6+P5 (safety clearance plus feed-in) using the current feed
rate.

7. Pull out in rapid traverse to the reference plane (P2).

8. To allow the drill bit to cool, the Z-axis remains on the reference plane (P2) during
the dwell time (P4).

Part Programming Manual


page 230/352
MACHINEMATE

9. Move in rapid traverse to P1+P5-P6 (first feed-in plus further feed-in minus safety
clearance) in the hole.

10. Drill using the current feed rate to the next depth of P6+P5 (safety clearance plus
feed-in). Drill using the current feed-in plus n times the further feed-in) exceeds the
final hole depth (P3).

11. Pull out in rapid traverse to the retract plane (P10).

7.7 G84 Thread cutting with balanced chuck


Syntax: G84
The program word G84 selects the drilling cycle thread cutting with balanced
chuck (also called a floating tap). This is also called a simple tapping cycle. The feed
values and rotational speeds defined in the NC program are taken over in the drilling
cycle. Four parameters must be defined before calling up this cycle:

P2 Reference plane, absolute Z coordinate


P3 Final hole depth, absolute Z coordinate

P4 Dwell time in ms
P10 Retract plane, absolute Z coordinate

Example:
N30 ...
*N40 P2=25000, P3=10000
*N50 P4=1000, P10=30000
N60 G84
N70 X10 Y15
N80 G80
N90 ...

The above program was running in G70 (inch mode). In that context, N40 assigned
the reference plane (P2) to 2.5 inches and the final hole depth (P3) to 1.0 inches.
N50 assigned the dwell (P4) to 1 second (or 1000 milliseconds) and the retract plane
(P10) to 3.0 inches. N70 performed the cycle at X of 10.0 inches and Y of 15.0
inches.

Part Programming Manual


page 231/352
MACHINEMATE

Figure 7-5: Drilling cycle G84


Sequence of drilling cycle G84:
1. Rapid traverse in the Z direction to the reference plane (P2).

2. Drill using the current feed rate and clockwise rotating spindle (M03) to the final
hole depth (P3).

3. Reverse spindle (the direction of rotation changes). A pause is made for the dwell
time (P4).

4. Pull out using the current feed rate to the reference plane (P2). Reverse spindle.
The spindles direction of rotation is again clockwise.

5. Move in rapid traverse to the retract plane (P10)

Part Programming Manual


page 232/352
MACHINEMATE

7.8 G85 Reaming


Syntax: G85

The program word G85 selects the drilling cycle reaming. The feed values and
rotational speeds defined in the NC program are taken over in the drilling cycle. Four
parameters must be defined before calling up this cycle:

P2 Reference plane, absolute Z coordinate


P3 Final hole depth, absolute Z coordinate
P4 Dwell time in ms
P10 Retract plane, absolute Z coordinate

Example:
N30 ...
*N40 P2=25000, P3=10000
*N50 P4=1000, P10=30000
N60 G85
N70 X10 Y15
N80 G80
N90 ...

The above program was running in G70 (inch mode). In that context, N40 assigned
the reference plane (P2) to 2.5 inches and the final hole depth (P3) to 1.0 inches.
N50 assigned the dwell (P4) to 1 second (or 1000 milliseconds) and the retract plane
(P10) to 3.0 inches. N70 performed the cycle at X of 10.0 inches and Y of 15.0
inches.

Part Programming Manual


page 233/352
MACHINEMATE

Figure 7-6: Drilling cycle G85

Sequence of drilling cycle G85:


1. Rapid traverse in the Z direction to the reference plane (P2).

2. Drill using the current feed rate to the final hole depth (P3).

3. Wait for the dwell time (P4) to elapse.

4. Pull out using the current feed rate to the reference plane (P2).

5. Move in rapid traverse to the retract plane (P10).

Part Programming Manual


page 234/352
MACHINEMATE

7.9 G86 Bore out


Syntax: G86
The program word G86 selects the drilling cycle bore out". The boring out is
followed by an orientated spindle retraction which is offset in the X, Y direction. This
prevents the inner contour of soft materials from being damaged when the boring bar
is pulled out. A spindle with feedback must be provided for this function. The feed
values and rotational speeds defined in the NC program are taken over in the drilling
cycle. Six parameters must be defined before calling up the cycle:

P2 Reference plane, absolute Z coordinate


P3 Final hole depth, absolute Z coordinate
P4 Dwell time in ms
P8 Incremental lift distance in the X axis, sign dependent
P9 Incremental lift distance in the Y axis, sign dependent
P10 Retract plane, absolute Z coordinate

Example:
...
*N40 P2=25000, P3=10000
*N50 P4=1000, P8=1000
*N55 P9=1000, P10=30000
N60 G86
N70 X10 Y15
N80 G80
N90 ...

The above program was running in G70 (inch mode). In that context, N40 assigned
the reference plane (P2) to 2.5 inches and the final hole depth (P3) to 1.0 inches.
N50 assigned the dwell (P4) to 1 second (or 1000 milliseconds) and the X lift
distance (P8) to 0.1 inch. N55 assigned the Y lift distance (P9) to 0.1 inch and the
retract plane (P10) to 3.0 inches. N70 performed the cycle at X of 10.0 inches and Y
of 15.0 inches.

Part Programming Manual


page 235/352
MACHINEMATE

Figure 7-7: Drilling cycle G86

Sequence of drilling cycle G86:


1. Rapid traverse in the Z direction to the reference plane (P2).

2. Bore to the final hole depth (P3) using the current feed rate.

3. Wait for the dwell time (P4) to elapse.

4. Move away 0.1 in or .1 mm using the current feed rate.

5. Spindle is orientated to 0 degrees (M19).

6. The lift distance (P8 and/or P9) moves spindle in the X and/or Y-axis.

7. Pull out to the retract plane (P10) in rapid traverse.

Part Programming Manual


page 236/352
MACHINEMATE

7.10 G87 Reaming with measuring stop


Syntax: G87
The program word G87 selects the drilling cycle reaming with measuring stop.
Note that the area of the retract plane must guarantee sufficient space for measuring.
Seven parameters must be defined before calling up this drilling cycle:

P2 Reference plane, absolute Z coordinate


P3 Final hole depth, absolute Z coordinate
P4 Dwell time in ms
P10 Retract plane, absolute Z coordinate
P11 Processing feed rate
P12 Retract feed rate

P13 First reamed depth, absolute Z coordinate

Example:
N30 ...
*N40 P2=25000, P3=10000
*N45 P4=1000, P10=30000
*N50 P11=6000, P12=4000
*N55 P13=17500
N60 G87
N70 X10 Y15
N80 G80
N90 ...

The above program was running in G70 (inch mode). In that context, N40 assigned
the reference plane (P2) to 2.5 inches and the final hole depth (P3) to 1.0 inches.
N50 assigned the dwell (P4) to 1 seconds (1000 msec) and the retract plane (P10) to
3.0 inches. N50 assigned the processing feed rate (P11) to 6.0 IPM and retract feed
rate (P12) to 4.0 IPM. N55 assigned the first reamed depth (P13) to 1.75 inches. N70
performed the cycle at X of 10.0 inches and Y of 15.0 inches.

Part Programming Manual


page 237/352
MACHINEMATE

Figure 7-8: Drilling cycle G87


Sequence of the drilling cycle G87:
1. Rapid traverse in the Z direction to the reference plane (P2).

2. Ream with the processing feed rate (P11) to the first reamed depth (P13).

3. Pull out to the retract plane (P10) with the retract feed rate (P12).

4. Halt feed rate to allow measuring of the hole. Press START to continue with the
processing.

5. Rapid traverse to the reference plane (P2).

6. Ream with the processing feed rate (P11) to the final hole depth (P3).

7. Wait for the dwell time (P4) to elapse.

8. Pull out with the retract feed rate (P12) to the reference plane (P2).

9. Move to the retract plane (P10) in rapid traverse.

Important: After leaving the drilling cycle, G87 the retract feed rate is active.

Part Programming Manual


page 238/352
MACHINEMATE

7.11 G88 Bore out with spindle halt


Syntax: G88
The program word G88 selects the drilling cycle bore out with spindle halt. The
feed values and rotational speeds defined in the NC program are taken over in the
drilling cycle. Four parameters must be defined before calling up this cycle:

P2 Reference plane, absolute Z coordinate


P3 Final hole depth, absolute Z coordinate
P4 Dwell time in ms
P10 Retract plane, absolute Z coordinate

Example:
N30 ...
*N40 P2=25000, P3=10000
*N50 P4=1500, P10=30000
N60 G88
N70 X10 Y15
N80 G80
N90 ...

The above program was running in G70 (inch mode). In that context, N40 assigned
the reference plane (P2) to 2.5 inches and the final hole depth (P3) to 1.0 inches.
N50 assigned the dwell (P4) to 1.5 second (or 1500 milliseconds) and the retract
plane (P10) to 3.0 inches. N70 performed the cycle at X of 10.0 inches and Y of 15.0
inches.

Part Programming Manual


page 239/352
MACHINEMATE

Figure 7-9: Drilling cycle G88

Sequence of drilling cycle G88:


1. Rapid traverse in the Z direction to the reference plane (P2).

2. Bore to the final hole depth (P3) using the current feed rate.

3. Stop the spindle (M05)

4. Wait for the dwell time (P4) to elapse.

5. Pull out to the retract plane (P10) in rapid traverse with stopped spindle.

Part Programming Manual


page 240/352
MACHINEMATE

7.12 G89 Bore out with intermediate halt


Syntax: G89
The program word G89 selects the drilling cycle bore out with intermediate halt.
The feed values and rotational speeds defined in the NC program are used in the
drilling cycle. Six parameters must be defined before calling up this cycle:

P2 Reference plane, absolute Z coordinate


P3 Final hole depth, absolute Z coordinate
P4 Dwell time in ms

P10 Retract plane, absolute Z coordinate


P13 First drilling depth, absolute Z coordinate
P15 Second drilling plane, absolute Z coordinate

Example:
N30 ...
*N40 P2=25000, P3=10000
*N50 P4=1000, P10=30000
*N55 P13=17500, P15=12500
N60 G89
N70 X10 Y15
N80 G80
N90 ...

The above program was running in G70 (inch mode). In that context, N40 assigned
the reference plane (P2) to 2.5 inches and the final hole depth (P3) to 1.0 inches.
N50 assigned the dwell (P4) to 1 second (or 1000 milliseconds) and the retract plane
(P10) to 3.0 inches. N55 assigned the first drilling depth (P13) to 1.75 inches and the
second drilling plane (P15) to 1.25 inches. N70 performed the cycle at X of 10.0
inches and Y of 15.0 inches.

Part Programming Manual


page 241/352
MACHINEMATE

Figure 7-10: Drilling cycle G89

Sequence of drilling cycle G89:


1. Rapid traverse in the Z direction to the reference plane (P2).

2. Bore to the final hole depth (P13) using the current feed rate.

3. Rapid traverse in the Z direction to the second drilling plane (P15).

4. Bore to the final hole depth (P3) using the current feed rate.

5. Wait for the dwell time (P4) to elapse.

6. Pull out in rapid traverse to the retract plane (P10).

Part Programming Manual


page 242/352
MACHINEMATE

7.13 Example: base plate


A base plate with four threaded holes is used here as an example. The drilling cycles
can be used to process this panel, making the NC program considerably shorter and
clearer.

Figure 7-11: Example: Base plate

Part Programming Manual


page 243/352
MACHINEMATE

The following is used to program the four threaded holes in the base plate:

N10 (BASE PLATE)


N20 G00 X0 Y0 Z400 Positioning instruction
N30 F200 M03 S1000 Technological data
*N40 P2=20000, P3=3000 Parameter definitions
*N50 P10=30000
N60 G81 Cycle: Drill to final depth
N70 X10 Y10 Drilled hole 1
N80 X40 Drilled hole 2
N90 Y30 Drilled hole 3
N100 X10 Drilled hole 4
N110 M0 Unconditional halt
N120 M5 Spindle halt, tool change
N130 F150 S300 Technological data
*N140 P3=5000, P4=1000 Parameter definitions
N150 G84 Cycle: Thread cutting with
balanced chuck
N160 Y10 Threaded hole 1
N170 X40 Threaded hole 2
N180 Y30 Threaded hole 3
N190 X10 Threaded hole 4
N200 G80 Deactivate the function drilling
cycle
N210 Z400 Positioning instruction
N220 X00 Y00
N230 M30 Program end
The drilling cycles G81 (Drill to final depth) and G84 (Thread cutting with balanced
chuck) are used in the NC program. Before calling up the respective drilling cycle, the
specific parameters were defined. Note that the value of the final hole depth P3 is
different in the two drilling cycles. A feed rate and cutting speed reduction was also
programmed before the cycle thread cutting. The values of the reference plane and
the retract plane do not need to be redefined before calling up G84. These values
were already assigned and are unchanged.

Sequence of the processing


Move to the coordinate X10 Y10 in rapid traverse.

Rapid traverse in the Z direction to the reference plane (P2).

Drill to the final hole depth (P3) using the current feed rate.

Pull out to the retract plane (P10) in rapid traverse.

Move to the coordinate X40 Y10 in rapid traverse and repeat steps 2 to 4.

Move to the coordinate X40 Y30 in rapid traverse and repeat steps 2 to 4.

Move to the coordinate X10 Y30 in rapid traverse and repeat the steps 2 to 4.

Part Programming Manual


page 244/352
MACHINEMATE

Interrupt program (unconditional halt) and halt spindle for tool change; continue the
program by pressing the START button.

Move to the coordinate X10 Y10 in rapid traverse and rapid traverse to the reference
plane (P2) in the Z direction.

Drill using the current feed rate and clockwise rotating spindle (M03) to the new final
hole depth (P3).

Reverse spindle. The direction of rotation changes and a pause for the dwell time
(P4) is made.

Pull out to the reference plane (P2) using the current feed rate.

Reverse spindle (spindle has clockwise direction of rotation).

Move to the retract plane (P10) in rapid traverse.

Repeat the steps 12 to 17 at the other three drilling positions.

Part Programming Manual


page 245/352
MACHINEMATE

8 Program Optimization
8.1 Hints for rational program creation
8.1.1 Subroutines
If the same contour element frequently appears in a contour, then it should be
programmed in a subroutine. The subroutine can then be called up at each position
of the main program at which the contour element is required.

8.1.2 Modally effective instructions


Modally effective instructions should not be programmed again if they are already
active. Following this recommendation gives the following advantages:

Less memory space required

Shorter program processing time

Shorter program transfer time

8.1.3 Value allocation to NC addresses using parameters


If certain values (e.g., feed rate or spindle speed) repeatedly change during the
processing of an NC program, assign parameters to these values instead of
programming them with firm values in the program. These parameters can then be
allocated with values at the start of the program. When these values are altered later
in the program, a search does not have to be made for all the program positions at
which the concerned size was programmed. Instead, only the corresponding
parameters at the start of the program have to be assigned with new values. An
example is below:

*N... P1=1000
*N... P2= 500
N... ...
N... ... F=P1
N... ...
N... ... F=P2
N... ...

Part Programming Manual


page 246/352
MACHINEMATE

8.2 Hints for Processing Programs


8.2.1 Look Ahead
The function Look Ahead should always be activated by programming G09 at the
beginning of an NC program, as long as on technological grounds there is nothing
against processing the program with "Look Ahead" (see also point "Activation of
special functions using a subroutine").

Avoid programming any PLC codes (i.e., usually the M, S and T codes) in blocks with
short axis motion because the CNC must hold that block long enough for the PLC to
get its code(s) from the block. This delay for the PLC will affect the path performance
for blocks with very short axis motion when the time for the blocks axis motion is less
than the time for the PLC code(s).

8.2.2 Programmable acceleration at Look Ahead


When Look Ahead is active the control recognizes, over several NC blocks away,
when the axes must be slowed down or sped up. The acceleration with active Look
Ahead is made so that the maximum velocity at the start of the block is reached as
quickly as possible. If the NC block currently to be executed is followed by a block in
which a lower path velocity has been programmed, then the braking is not made at
the beginning of the following block, but during the execution of the preceding one.
This can result in rapidly successive acceleration and braking processes.

The function programmable acceleration can be used with active "Look Ahead" to
obtain a leveling of the axis accelerations. This puts the machine tool under less
stress and increases processing accuracy.

8.2.3 Activation of special functions using a subroutine


Always program the real contour geometry description as the main program. By
comparison, functions necessary for the processing (e.g., MACHINEMATE specific
functions such as Look Ahead, spline interpolation, part position offsets) should
be stored in a resident subroutine, at the end of which a conditional hold is
programmed with M01. This provides the following advantages:

Specific functions (e.g., Look Ahead) can be quickly and easily activated in
standard programs using a subroutine call up.

After aborting a program (e.g., due to tool breakage), all the necessary modal
values for the program continuation may still be active. The main program is then
only reprocessed up to the conditional halt in the subroutine. The main program
is then interrupted and, using a manual block selection, continued at the desired
position.

Part Programming Manual


page 247/352
MACHINEMATE

8.3 Hints for Avoiding Errors


8.3.1 Protection of subroutines against call up as main program
In order to avoid processing subroutines as main programs by mistake, when the
subroutines are not intended for this, no F word should be programmed in these
subroutines. If a subroutine without F word is selected as main program, the error
message 199 appears and the subroutine is not processed.

8.3.2 Functions not automatically reset at the program end


If modally effective functions that are not automatically reset at the end (e.g., G92,
G81, G100 and other transformation instructions) are used in programs, then the
instructions that deactivate these functions should be programmed at the program
start. This ensures that these functions are no longer effective after a program restart
(e.g., after having to abort because of tool breakage).

8.3.3 Circular interpolation


Output error messages will occur during circular interpolation if three decimal places
are set up in the control and a post processor that only considers two decimal places
reads programs in.

The control always checks at circular interpolation that the distance from the circle
start point to the circle center point corresponds exactly to the distance from the circle
end point to the circle center point. The control outputs an error message if this is not
the case. Since the post processor rounds values up or down, these distances may
not exactly correspond to each other. Such problems can be avoided by using the
instructions G12/G13 (circular interpolation with specified radius) instead of the
instructions G02/G03 (circular interpolation with specified center point).

8.3.4 Avoid dummy blocks at subroutine call up


Subroutine call-ups within closed contours should be programmed in the last motion
block before the desired subroutine processing and not in separate NC blocks.

Example:

... ...
N50 X70 Y80 instead of: N50 X70 Y80
N60 Y90 Q100 instead of: N60 Y90
... instead of: N70 Q100

Part Programming Manual


page 248/352
MACHINEMATE

8.3.5 Avoid dummy blocks at subroutine end


The end of program instructions M02 or M30 in subroutines should be incorporated in
the last motion block of the subroutine instead of being programmed in separate NC
blocks. Continuous block processing is obtained at subroutine repetitions of the
individual subroutine loops and a pause at the end of each subroutine loop is
avoided.

Example:
Main program:

...
N20 G9
N30 G90
N40 G1 X. . Y. . Position over work piece
N50 G91 Z-10 Q17 L9 Feed-in to work piece-upper edge,
call up subroutine, 9 repetitions
N60 Z30
...

Subroutine P17:
N1 G2 I5 Z-2 M30

If the M30 in the subroutine was programmed in a separate block the helix would not
be processed continuously and M30 would be interpreted as a dummy-block. This
would result in a standstill after each revolution of the helix.

8.3.6 Avoid dummy blocks at path compensation


Path compensations are normally activated with the instructions G41-G44 and
deselected with the instruction G40. If the activation or deactivation of a path
compensation is to be made simultaneously with a change of the interpolation type
(e.g., exchange G01 <-> G02), then two NC blocks would have to be programmed.
One NC block would be programmed for the change of the interpolation type and one
would be programmed for the activation or deactivation of the path compensation.
This is because two G-codes must not be contained in the same NC block. The G40-
G44-blocks would be dummy-blocks in this case.

Dummy-blocks can be avoided in such cases as follows:

The instruction for the activation of the path compensation is already


programmed in a block, together with D0 or the address of an empty
compensation value memory before the change of the interpolation type. In the
block in which the path compensation is to be active, only the D word of the
compensation value memory that contains the desired compensation value is
programmed.

Part Programming Manual


page 249/352
MACHINEMATE

Analog programming to deselect path compensation is done by not programming


G40 in a separate block, but instead by programming D0 or D together with the
address of an empty compensation value memory in the first motion block which
should be processed without path compensation.

Example:

Acceptable:
...
N90 G1 X0 Y0 F1000
N100 Y10
N110 G43 D1 Activate the path compensation
(dummy-block)
N120 G2 X10 I5 Block, which should be processed with
path compensation
N130 G40 Deactivation of the path compensation
(dummy-block)
N140 G1 Y0

Better:
...
N90 G1 X0 Y0 F1000
N100 Y10 G43 D0 Activate the path compensation with
compensation value 0
N120 G2 X10 I5 D1 Activate compensation value the
compensation value memories 1
N120 G1 Y0 D0 Activate compensation value 0

8.3.7 Collision free movement


To ensure collision free movement to a point, use the instructions of cycle level II.
This enable the current axis values to be read.

8.3.8 Contour accuracy (G186)


When Look Ahead is active, a contour accuracy that has been programmed with
G186 together with a K word is only effective with circular interpolation (using
G02/G03, G12/G13 or G07) and not with linear and spline interpolation.

Part Programming Manual


page 250/352
MACHINEMATE

9 Programming Various CNC Features/Capabilities


Note that some of these features are optional and not available in all controls. Others
are standard features but are not enabled until the system integrator changes the
appropriate machine parameters to activate and configure the particular feature.

9.1 Angled Wheel Transformation


Some machines can have linear axes which are not orthogonal to each other. These
so called angled wheel axes can be used for certain applications, such as certain
grinders. Usually angled wheel axes machines are difficult to be program using
standard NC statements. This Angled Wheel transformation feature allows the easier
programming of such a machines, in the same manner as usual machines with
orthogonal Cartesian axes.

9.1.1 Angled wheel transformation syntax


G220 angled-wheel transformation OFF, programming with machine
coordinates.
G221 normal motion angled wheel transformation ON, programming with axes
addresses X, Y, Z or other defined in machine parameters; is an axis (or
axes) an angled-wheel axis or not is defined in machine parameters as
well. Programming is done using virtual orthogonal Cartesian coordinate
system which axes could be equal or not to physically axes.
G222 two step motion angled-wheel transformation ON; virtual orthogonal
Cartesian coordinates are used for programming and are displayed in
MMI; first angled-wheel axis is moved in the first step if programmed
movement is away from the part; all other axes are moved in the second
step
G223 two step motion angled-wheel transformation ON; movement behaviour is
opposite to G222 first angled-wheel axis is moved in the second step, if
programmed direction is away from the part

Real time normal motion Angled-Wheel transformation is activated with the


instruction G221. It allows programming in virtual normal Cartesian coordinate
system even by machines with angled-wheel axes. This virtual coordinate system is a
part coordinate system which is defined for programming. It can have two (usually X
and Z or X and Y for 2D programming) or three axes (usually X, Y, Z).

Instruction G221 is a modal one and once being programmed it allows us to use
standard instructions for axes movements: G0 or G1 for linear interpolation, G2 or G3
for circle interpolation. Polar-/barrel cam transformation (instructions G100 - G108,
G14, G15) is not possible with G221 Angled-Wheel transformation active.

G220 deactivates the angled wheel transformation. It means all given axes
coordinates are machine coordinates for corresponding axes. The transformation is
not performed so the programming is done in the machine coordinates.

Part Programming Manual


page 251/352
MACHINEMATE

Two step motion Angled-Wheel transformation (activated with G222 or G223) means
that each programmed motion block is separated in two steps. Depending on active
angled-wheel G-code and programmed first angled-wheel axis (usually X) direction
all first angled-wheel axis (usually X) movement can take place in the first step
(G222) or in the second step (G223). Corresponding all others axes motion take
place in second (G222) or in the first step (G223). In two step motion mode axes are
programmed in virtual orthogonal Cartesian coordinates. The CNC generates the
intermediate blocks to realise two step axes motion.

Angled-wheel transformation G-codes G220-G223 have to be programmed alone in


the program line. Axes movements programmed in the same line are ignored.

Following G-codes are not allowed in two step motion mode:


- circular interpolation (G2,G3, G12, G13)
- radius compensation (G41-G44)
- Threading blocks (G33, G34)
- spline interpolation (G6)

9.1.1.1 Example of G220 and G221

Y (physical)

Y (virtual)

30 N30 N40

20 N50
N60
N20
X (physical)

10

= 60o

= 30o
N5, N10

X (virtual)
10 20 30

Figure 9-1: Relationship between two linear axes with Angled Wheel Transformation

Part Programming Manual


page 252/352
MACHINEMATE

A simple example illustrates usage of angled wheel transformation. In the figure


above is a machine with two physical axes: X axis (as an angled wheel axis) and Y
axis (as a normal linear axis). Often in grinders the normal linear axis will be Z.

Program example with G221:


N5 G0 X0 Y0
N10 G221
N20 G0 X10 Y20
N30 G1 Y30 F100
N40 X20
N50 Y20
N60 X10 M30

N5 physical axes homing (may be necessary for some machine)


N10 - switching in angled wheel mode. All commanded coordinates after switching
are related to virtual axes. PA CNC calculates necessary physical axes movements
automatically.
N20 movements to commanded positions of both virtual axes with maximal
velocity.
N30 - movement of virtual Y axis.
N40 movement of virtual X axis. Note: by this movement both physically axes have
to be moved. It is done automatically.
N50-N60 further axes movements and program end.

Program example with G220

The same axes movements can be programmed by switching off the Angled-Wheel
transformation (G220 instruction active).

N5 G0 X0 Y0
N10 G220
N20 G0 X11.547 Y14.2265
N30 G1 Y24.2265 F100
N40 X23.094 Y18.453
N50 Y8.453
N60 X11.547 Y14.2265 M30

This simple example shows the same programming without G221 instruction is
possible (however not so simply). But for more complicated cases (e.g., circular
interpolation, etc.) it can be much more complex task and so using Angled-Wheel
transformation is preferable.

9.1.1.2 Example of G220 and G222

Part Programming Manual


page 253/352
MACHINEMATE

Y (physical)
G-211 movement
Y (virtual)

G-212 movement

30

First step

Second step

N20
20
N30, N40
X (physical)

Second step
10

= 60o

= 30o
First step

N5, N10
X (virtual)
10 20 30

Figure 9-2: Example for G222, two step move for Angled Wheel Transformation
The figure above shows the difference between a two-step move (G222) and the
interpolated move (G221).

Program example with G222:


N5 G0 X0 Y0
N10 G222
N20 G0 X10 Y20
N30 X30 M30

N5 physical axes homing (may be necessary for some machine)

N10 - switching in two step angled wheel mode.

N20 movements to commanded positions in two step (dashed line in the fig. 2 );
angled axis is moved in the first step, other axis is moved in the second step. PA
CNC generates intermediate block for the second step.

N30 - movements to commanded positions and program end.

Solid line demonstrated G221 command behaviour in the same program.

Program example with G220

Part Programming Manual


page 254/352
MACHINEMATE

The same axes movements can be programmed by switching off the Angled-Wheel
transformation (G220 instruction active).

N5 G0 X0 Y0
N10 G220
N20 G0 X11.547
N25 X14.226
N30 X34.641
N35 Y2.679 M30
The same movement can be programmed by without the angled-wheel
transformation but the program is more complicated even in this simple example.

9.1.1.3 G92 offset

Even with angled-wheel transformation active, G92 axes offset can be active. By
transformation between current machine coordinates (G220) and Cartesian
coordinates (G221), G92 offset values remain the same. Switching between normal
motion mode (G221) and two step motion mode (G222) is also possible.

9.1.2 Axes sequence by two step mode


In two step mode, the axes sequence is depending on the programmed first angled-
wheel axis (usually X) direction. Motions of the axes by different G-codes are
described in the table below.

Note: by calculating whether X axis is programmed away from the part spindle center
line (assumed to be X 0.0) the CNC takes programmed values. No G92 offset is
taken into account. If such behaviour is not right in some NC program places than
earlier programmed two step motion G-code can be changed to it opposite (G222 to
G223).

G-Code X axis is programmed away from X axis is programmed towards


the part spindle center line the part spindle center line
G222 STEP 1: STEP 1:
all first angled-wheel axis (X) all other axes motion takes place (Y,
motion takes place Z and other axes programmed)
STEP 2: STEP 2:
all other axes motion takes place (Y, all first angled-wheel axis (X)
Z and other axes programmed) motion takes place
G223 STEP 1: STEP 1:
all other axes motion takes place (Y, all first angled-wheel axis (X)
Z and other axes programmed) motion takes place
STEP 2: STEP 2:
all first angled-wheel axis (X) all other axes motion takes place (Y,
motion takes place Z and other axes programmed)
Table 9-1: Angled Wheel Transformation two-step motion description

Part Programming Manual


page 255/352
MACHINEMATE

9.1.3 Mirroring
Angled-wheel axes can be mirroring by active angled-wheel transformation. Mirroring
works in normal motion mode as well in two step motion mode.

Note: normally mirroring should be switching off in the position in which it has been
switching on. If it is not the case, after switching off the mirroring with G38 or G39 an
extra G92 without any parameters has to be programmed to remove all G92 related
axis offsets.

9.1.4 H and G compensation


The values of H- and G5x-compensations can be set (using the Data mode displays).
With an active angled-wheel transformation (G221-G223) these values for
programmed axes are interpreted as given in Cartesian coordinate.

9.2 Automatic Spindle Gear Step (Range) Selection


The Automatic Spindle Gear Step (or range) Selection feature supports different gear
ratios in the spindle transmission. The desired gear range can be directly specified
with an associated M-code or the appropriate gear range can be determined from the
programmed spindle speed.

9.2.1 General
The programming of the spindle gear step (or range or stage) switching for
different spindle speeds is achieved using M-codes:

M40 = automatic range switching - computed from the


programmed spindle speed.
M40 = effective at the time the machine is turned on.
M41..M46 = programmed switching. A maximum of 6 ranges is possible.
M40-M46 = modally effective gear range code

M03 = spindle turning clockwise


M04 = spindle turning counter-clockwise
M05 = spindle stop

Note

The function Automatic Gear Step Selection is only possible for the main spindle. The
first spindle in the system is termed the Main spindle.

Part Programming Manual


page 256/352
MACHINEMATE

9.2.2 M40 is Active


If M40 is active, the speed stage is selected via the programmed S-word. A minimum
and maximum speed for every speed stage is specified in the machine parameters.

Stage by stage (begin with speed stage 1) applies:

The defined maximum speed is compared with the programmed spindle speed. The first
stage is valid where: the programmed spindle speed is smaller than or equal to the
maximum speed for the range. A speed stage with the applicable minimum speed = 0
will be treated as not specified. If the programmed spindle speed is greater than the
largest applicable maximum spindle speed, the speed will be automatically limited to the
maximum allowable value. G92 and the spindle override have no influence on the
selected speed stage.

9.2.3 M41 to M46 is Active


This allows a speed stage to be directly selected. A maximum of 6 levels are possible.
The gear ratio of each step is set in the machine parameters. The speed stage selected
via M41-M46 has priority over the programmed S-value; i.e., the spindle speed will be
limited to the speed interval corresponding to the selected stage if necessary.

Note:

Definition of the transmission ratio (machine parameter):

Motor speed = spindle speed * Transmission Ratio

9.2.4 Switchover procedure between gear ranges


The switchover procedure is initiated if the programmed speed stage does not
agree with the PLC feedback message concerning the currently applied speed
stage (see PLC-CNC Interface signals IN_GEAR01 to IN_GEAR06). Five
temporary blocks are created for this. (The following is displayed at the block
display on the screen: AUTOMATICALLY INTERMEDIATED BLOCK).

The first temporary block decelerates the spindle to the gear change speed (which
can be different for each gear range). A delay is also calculated, based on the speed
change (with a full delay for a change from top speed in the range).

The second temporary block provides the programmed gear range as an M-Code to
the PLC (with the programmed S-code). The NC block transfer is blocked as long as
it takes to obtain feedback from the gearbox (via the PLC) that it is in the selected
speed range.

The third and fourth temporary blocks are G10 blocks to suppress the block look
Part Programming Manual
page 257/352
MACHINEMATE

ahead feature during the spindle gear shift.

The fifth temporary block accelerates the spindle to the programmed speed. A delay
is also calculated, based on the speed change (with a full delay for a change to top
speed in the new range). After this delay, normal NC block processing continues.

Notes:

The waiting time is only considered during speed stage changes but not during other
speed change operations.

Switching to counter-clockwise and clockwise turning can be achieved if the PLC signal
IN_REV (in IN_SPINDLE) is continuously reversed by the PLC.

9.2.5 G96 is Active


As long as G96 is active and the spindle is turning it is not possible to execute a gearing
level change. If M40-M46 is programmed, an error message is output:

NC ADDRESS M WRONG!
One of M40 to M46 can be programmed into the G96 switch-on block. The S-word,
however, has no function if M40 is active.

The speed stage can be changed (only via the M-code, not via the S-code) while M05 is
active if the spindle that has been programmed using M05 was stopped. The actual
change is carried out if the spindle is switched on via M03/M04.

In case of G96 Mxx S200 in one block (where xx = 41 to 46), the spindle first accelerates
to the speed that was programmed last (i.e., before the speed stage change). Only then
S200 is taken into consideration.

9.2.6 G92 is Active


In case of G92, the S-word for the speed stage is ignored. The M-word is relevant.

9.2.7 G33/G34 is Active


As for G96 but the S word is also relevant.

The PLC signal IN_NULLV always provides for a spindle stop; also in case of M40-M46.

S0 has no effect on the current speed stage if M40 is in operation.

Part Programming Manual


page 258/352
MACHINEMATE

9.3 Barrel Cam Transformation


The Barrel Cam Transformation feature requires associated additions to a typical NC
program to obtain the desired behavior.

9.3.1 General
Using the instructions G102 and G106 the barrel cam transformation is activated.
Following the instruction G102 the specified coordinates are interpreted as Cartesian
coordinates and following the instruction G106 as polar coordinates or cylinder
coordinates.

The barrel cam transformation also offers the possibility of switching between absolute
dimension input (G90) and incremental dimension input (G91).

If other axis addresses were specified for the polar transformation as substitutes for X
and Y, then they also have to be used with active G106. When G102 is active, however,
the axis addresses X and Y are used, as with G101. If no other axis addresses were
specified as substitutes for X and Y, then the instruction G106 with the axis addresses X
and Y is available.

Example:
A groove is to be milled into the curved surface of a cylinder. During the milling process
the cylinder must rotate about its center axis. Simultaneously linear axes must be
moved. In order to achieve the desired groove, the movements of the rotational axis and
the linear axes must be exactly in coordination with each other, which is relatively
complicated. The barrel cam transformation is a simplification for the programming of
such processes.

The curved surface of the cylinder is unwrapped or developed to form a plane that
serves as an interpolation plane for compensations and the feed rate during barrel cam
transformation.

Within this plane the complete range of geometric options of the


MachineMate are available.

9.3.2 Barrel cam transformation using Cartesian coordinates G102


Syntax:
G102 R ...
Activation of the barrel cam transformation with specification of Cartesian coordinates is
achieved using the instruction G102 together with the cylinder radius in the form of an R
word.

Example:
G102 R80.05
Part Programming Manual
page 259/352
MACHINEMATE

In this NC block a reference cylinder with a radius of 80.05 is specified for the following
processing steps.

When G102 is active the values programmed together with the axis addresses X and Y
are to be interpreted as follows:

The value programmed together with the axis address Y indicates the position in the
direction of the cylinder axis. The value programmed together with the axis address X
indicates the position in the direction of the cylinder's curve.

X
Y

Figure 9-3: Interpretation of the X and Y values when G102 is active.

N 60 N 70
X N 30
N 50
40 N 40
R 80,5 20
0 Y
-20
-40 20
0
-20
Figure 9-4: Barrel cam transformation

The X-values result in rotations of the rotational axis, the Y-values in linear travel movements
in the positive or the negative direction of the Y-axis, i.e., in the axial direction of the curved
cylinder surface.

Part Programming Manual


page 260/352
MACHINEMATE

Program example with G102:

N10 G102 R80.5


N20 X20 Y20 F500
N30 X0
N40 Y-20
N50 X40
N60 Y20
N70 X0 M30

The program shown above results in the travel movements displayed as arrows in the
figure above.

9.3.3 Barrel cam transformation with cylinder coordinates G106


Syntax:
G106 R...
As in the case of polar transformation, the barrel cam trans-formation also offers the
possibility of programming the rotations of the rotational axis by specifying an angle
instead of by specifying the Cartesian coordinates as was shown in the above example.

To enable this the instruction G106 is to be programmed instead of G102. When G106 is
active, the same axis addresses must be used as for active G105 (see above).

For the following example, it is assumed that for the rotational axis the axis address C
was specified and for the linear axis the axis address V. When G106 is active, the values
programmed together with the axis address C are then interpreted as angles and the
values programmed together with the axis address V are interpreted as the positions, in
the axial direction of the cylinder curved surface, to which the linear axis is to be moved.

To find out which axis addresses are specified for the axes in your particular control,
please see the documentation provided by the machine tool manufacturer. The following
example can be easily adjusted to suit your individual configuration simply by replacing
the axis addresses used in the example by those specified in your control.

Program example with G106

N10 G106 R80.5


N20 C14.235 V20
N30 C0
N40 V-20
N50 C28.47
N60 V20
N70 C0 M30

Part Programming Manual


page 261/352
MACHINEMATE

N 60 N 70
C N 30
28,47 N 50
14,235 N 40
R 80,5
0
V
20
0
-20
Figure 9-5: Meaning of the C and V values when G106 is active

This program leads exactly to the same result like the program example for G102.

9.3.4 Illegal G-codes during Barrel Cam


The instructions G74 programmable homing, mirror and G0 rapid traverse are not
possible when barrel cam transformation is active. The error messages 108 or 241 are
displayed. This is also displayed if an attempt is made to activate or switch off the
transformation when G92-offset is still active. This also applies to offsets that arise due
to mirroring. It is therefore recommended before activating or switching off the
transformation to always program G92 in case an offset of the program zero point was
previously active.

9.3.5 Real time radius compensation G103, G107


In standard barrel cam transformation, the cylinder surface is seen as an interpolation
plane where path compensation in particular is active. Real time radius compensation is
slightly different in that the compensation normally carried out on the rotational axis is
transferred to another linear axis. This linear axis - here referred to as the U-axis -
together with the cylinder longitudinal axis (Y-axis) forms the osculation plane on the
cylinder pattern. The axis allocation must therefore be seen as follows.

Part Programming Manual


page 262/352
MACHINEMATE

X
Y

Figure 9-6: Osculation plane axis allocations for the cylinder

The function is activated analogously to G102, G103 and G106 with the G-codes G107.
After a block such as:

N100 G103 R80.5

the usual barrel cam transformation G102 is activated first of all. The process deviates
from G102 only when path compensation is then activated.

A brief example should clarify this.

Example:
N10 X0 Y0 F500
N15 G20 I1 J2
N20 G103 R80
N30 X30
N40 Y20
N45 D1=5000
N50 G41 Y40 D1
N70 G12 X50 Y60 K20
N80 G1 X50 Y60 K20
N85 G1 X80
N90 G12 X100 Y40 K20
N100 G1 Y30
N110 G1 Y30
N110 G40 Y20
N120 G100
N130 X0 Y0 M30

The path programmed in this example is sketched in the following figure. The X/Y plane
here is the developed cylinder pattern.

Part Programming Manual


page 263/352
MACHINEMATE

D1
DX
60
DY K 20 K 20
40

20

20 50 80 100 X 360

Figure 9-7: Real-time radius compensation

The compensated path is indicated by dashes. It should be noted that the indicated paths
DX are traveled by the U-axis. In contrast to conventional path compensation, the
uncompensated path is interpolated. The compensation components DX and DY are first
calculated during interpolation, whereby every interpolated point is displaced vertically by
the compensation value.

Limitations:
1. While real time compensation is active, no blocks without travel information may
be programmed in the active plane.
2. In order to avoid jumps in the U-axis or Y-axis, it is imperative to program
tangential transitions between the travel blocks.
3. When processing curved contours, the velocity differs from the programmed
velocity.
4. The U-axis may not be programmed once G103 or G107 are programmed. Error
message 145 is output if this does occur.
5. Similarly to polar transformation, the axis limits of the U-axis and V-axis are
monitored in real time for real time radius compensation. If the axis limits are
violated, an error message is output and the interpolation is stopped.

9.3.6 Barrel cam transformation with centerline deviation of an


additional axis and real time radius compensation, G104,
G108
This is an additional option to G103 and G107.

Part Programming Manual


page 264/352
MACHINEMATE

In addition to the compensation components for the X-axis, the U-axis travels for an
additional value that is obtained from the following equation using the movement of the
cylinder longitudinal axis.

Um = A + K2 - (Y-B)2 | A < 0
(1) Um = A - K2 - (Y-B)2 | A > 0
A: axis distance
B: lever distance
K: lever radius

The meaning of the individual parameters is explained in the following sketch that
includes these parameters.

Activation takes place in an NC block of the form

G104 R80.5 A80 K100 B20

C
V
Z
A

K
B R

Figure 9-8: Barrel cam transformation with centerline deviation


The above figure also clearly shows the purpose of this function, which is chiefly used for
processing a guide groove in a symmetrical cylinder. It is assumed here that a roller
moves in the groove, and that the roller is firmly connected to a lever attached to a fixed
point. Any movement in the longitudinal direction of the cylinder necessitates a circular
movement of the roller in the U-Y plane. This movement is simulated by deviation from
the center point. The picture also reveals the significance of real time radius compen-
sation for this case.

Since the roller is moved in the U-Y plane, it is important that the projection of the guide
groove in the U-Y plane has the correct width, i.e., the compensations must be relative to
this plane. From this it is also clear that an equidistant path in the U-Y plane is not
equidistant on the cylinder surface.

In addition to pure X components with G103/107, with path compensation a further


component is considered which results from the centerline deviation.

Part Programming Manual


page 265/352
MACHINEMATE

Limitations:
The limitations are the same as for G103/107. In addition it is monitored whether a
meaningful centerline deviation is possible according to the equation (1). If in this
equation the term under the root is negative, then the error message Axis limit U is
output. This is always the case when the guide groove is extended so far in the Y
direction that a roller fixed onto a lever with length K can no longer reach this point.

9.3.7 Switching between machine coordinates with barrel cam


transformation.
When changing over from operation in machine coordinates (G100) to the barrel cam
transformation (G105) and vice versa, no compensation (no G-, D- or H- compensation)
must be active.

It is not possible to change over directly to the barrel cam transformation from the polar
transformation. G100 must always be programmed before changing the transformation
type. If an attempt is made to program an axis position in a block with a switching G-
code, error message 145 is displayed.

9.3.8 End of program and change of the operating mode.


At the end of the program the operating mode is always switched back to operation in
machine coordinates. Simultaneously, a G92-offset, possibly active for the rotational
axis, is calculated. When changing over from the operating mode MANUAL to
AUTOMATIC the position of the rotational axis is always reduced to a value between 0
and 360.

Part Programming Manual


page 266/352
MACHINEMATE

9.4 Diameter Programming


9.4.1 Programming
The "diameter programming" function enables the programming of the diameter of the
work piece to be processed and the display of the point of contact referring to the
diameter or to the radius dimension.

Figure 9-9: Diameter Programming


D1, D2 Diameter programming
R1, R2 Radius programming

9.4.1.1 Syntax

G191 Activate the diameter programming and display the point of contact referring to
diameter dimension.
G192 Only display the point of contact referring to diameter dimension; programmed
values are in radius dimension.
G193 Only display the point of contact in radius dimension; programmed values are
in radius dimension.
G190 Deactivate the diameter programming (display shows the tool reference point
in radius, programmed values are in radius).

The G-codes appertain to a group (only one code of the group is in effect at a time) and
they are modal effective.

Using the G191 command, diameter programming is activated. It is deactivated using


G190. The display of the axis programmed for diameter processing is also modified. The
location of the point of contact is displayed with reference to the diameter dimension.

Part Programming Manual


page 267/352
MACHINEMATE

A short overview gives the following table:

Active G-code Programmed values Display

G190 Radius dimension Tool reference point in radius dimension


G191 Diameter dimension Tool contact point in diameter dimension
G192 Radius dimension Tool contact point in diameter dimension
G193 Radius dimension Tool contact point in radius dimension

Table 9-2: Diameter programming G-codes

In the examples, it is always assumed that the axis with address letter X is the diameter
programmable axis.

9.4.1.2 Negative orientation

The behavior of the function in the case of negative radius is applied by the machine
parameter DiameterAppl.

DiameterAppl Bit 1 = 0

With DiameterAppl Bit 1 = 0 the orientation of the diameter programmable axis to the
tool spindle is determined by the axis position achieved before. If this position is negative
then the diameter corresponding to the negative axis position is computed.

Note:

Only the end positions of programmed paths are checked whether the zero point is
crossed when DiameterAppl Bit 1 = 0. Certain motions might possibly cross the zero
point of the axis.
Example:

Programming a circle with start and end point in the positive range and a radius which is
smaller than the distance of the center point from the zero point of the axis will lead to a
motion through the zero point:
N10 G191 Activate diameter programming
N20 G1 X20 Y100 Move to the start position at X20 / Y100
N30 G3 X20 Y20 I0 J-80 Circular interpolation (counter
clockwise) to the end point at X20 /
Y20. Axis moves through the zero point.

Part Programming Manual


page 268/352
MACHINEMATE

Figure 9-10: Diameter Programming with negative orientation


DiameterAppl Bit 1 = 1

With DiameterAppl Bit 1 = 1 positive and negative values of the diameter will be
allowed.

In this case it is possible to start from negative position and move through the zero-
positions or program negative positions.

9.4.1.3 Commands that are not allowed

The G38 "Mirroring" and G101-G106 "Polar/Cylinder transformation" commands are not
permissible for diameter programmable axis. Error message 241 is output.

Error message 241 is also output if one of the diameter programmable axes is one axis
on the active G17-G20 "Plane selection" plane and G14-G16 "Polar programming" or
G51 "Part rotation" is active.

Error message 435 is output if during active diameter programming a negative value is
programmed for a diameter programmable axis.

9.4.1.4 Incremental dimension programming

When incremental dimension programming is modal, programmed values interpreted as


follows:
DiameterAppl Bit 1 = 0

Positive values always increment the diameter, negative values always decrement the
diameter.
Example:

N10 X-100 Move to position X-100


N20 Gl91 Activate the diameter programming and display X-200
(diameter)
N30 G91 Activate incremental dimension programming
N40 X100 Increment the diameter by 100. Axis moves to 150
(radius dimension) display shows X-300.

Part Programming Manual


page 269/352
MACHINEMATE

DiameterAppl Bit 1 = 1

Positive values lead to a motion of the axis in positive direction and negative values lead
to a motion in negative direction. In this mode, the position of the axis is incremented.
Example:

N10 X-100 Move to position X-100


N20 G191 Activate the diameter programming and display X-200
(diameter)
N30 G91 Activate incremental dimension programming
N40 X100 Increment position by 100. Axis moves to 50
(radius dimension) display shows X-100.

9.4.1.5 Part position offsets

When part position offsets (G53 to G59; see chapter 5.1.2) are used, the machine
parameter DiameterCorr value determines whether the G corrections are considered at
the determination of the contact point or not.

DiameterCorr = 0
The G corrections are not considered at the determination of the contact point. The
display shows the value relative to the origin.

DiameterCorr 0
The G corrections are considered at the determination of the contact point. The display
shows the value relative to the part position offset.

9.4.2 Control reset, end of program


After power on, control reset and end of NC program the value in the machine parameter
DiameterResetState defines which diameter programming mode (G190 - G193) is
active.

9.4.3 Display functions


The "diameter programming" function enables the display of the point of contact referring
to the diameter or to the radius dimension.

G190 Display of tool reference point in radius dimension


G191/G192 Display of point of contact in diameter dimension
G193 Display of point of contact in radius dimension

Part Programming Manual


page 270/352
MACHINEMATE

Figure 9-11: Diameter Programming Point of Contact

9.4.4 Programming conditions


When using diameter programming (G191), note the following conditions listed in the
table.
In the subsequent notes, it is always assumed that the axis with address letter X is the
diameter programmable axis.

Item Notes
X axis command specified with a diameter value
Incremental command (G91) specified with a diameter value
Cycle parameters in X axis command (X=P12) specified with a diameter value
Set X axis value (G92) specified with a diameter value
X Part position offset (G54-G59) specified with a diameter value
Circular parameters (I, J, and K) specified with a radius value exception: G2 or
G3
For these commands it depends on the setting
of bit 2 in the machine parameter
DiameterAppl.
Bit 2 = 0 radius value
Bit 2 = 1 diameter value
This is valid if the axis to which the parameter
belongs is diameter programmable. For
example I to X, J to Y, etc.
Feed rate along X (F word) specified in radius/min
specified in radius/rev
X axis position display displayed in diameter dimension
Tool radius compensation (D) specified in radius dimension
Tool length compensation (H) specified in diameter dimension
Table 9-3: Diameter programming conditions

Part Programming Manual


page 271/352
MACHINEMATE

9.4.5 Programming Examples


In the subsequent examples, it is always assumed that the axis with address letter X is
the diameter programmable axis.

9.4.5.1 Example program using G191

N10 G1 X0 F4000 Moving of the X-axis to the X0 position


(orientation)
N20 G191 Activate the diameter programming
N30 X200 Move to position X100 (radius) and display
X200 (diameter)
N40 G190 Deactivate the diameter programming and
switch-over of the display to X100
N50 M30

9.4.5.2 Programming example with G192

N10 G1 X100 F4000 Moving of the x-axis to the X100 position


(orientation)
N20 G192 Display of the tool tangential point
referring to the X200 diameter; no motion.
N30 X200 Move to X200 (radius) and display the X400
position (diameter)
N40 G190 Deactivate the diameter programming and
switch-over of the display to X200
N50 M30

9.4.5.3 Programming example with G193

N10 G1 X100 F4000 Moving of the X-axis to the X100 position


(orientation)
N20 G191 Activate the diameter programming and display
X200 (diameter)
N30 G193 Display of the tangential point at the actual
diameter X100 (radius). Programmed values are
in radius.
N40 X200 Move to X200 and display X200
N50 G190 Deactivate diameter programming (Display
shows the tool reference point, programmed
values are in radius
N60 M30

9.4.5.4 Example program with negative orientation

With DiameterAppl Bit 1 = 0


N10 G1 X-100 F4000 Move the X-axis to the X-100 position
(orientation)
Part Programming Manual
page 272/352
MACHINEMATE

N20 G191 Activate the diameter programming and


display X-200 (diameter). There is no
moving.
N30 X100 Move to position X-50 (radius) and display
X-100 (diameter)
N40 G190 Deactivate the diameter programming and
switch-over of the display to X-50
N50 M30

9.5 Distance Regulation


The Distance Regulation feature requires associated additions to a typical NC
program to obtain the desired behavior.

9.5.1 G265 Axis selection


Syntax:
G265 X... Y... Z... Axis selection

The axes to be distance regulated and their direction vectors can be preset. A new axis
selection can additionally be programmed with the code G265.

The values programmed with the address letters of the axes determine the new direction
vector. These values are standardized internally.

Example:
...
Nxx G265 X0.5 Y0.5
...

The new axis selection is valid from Nxx with the standardized direction vector (0.71,
0.71, 0).

Note:

If more than three axes are programmed, this is indicated by error message 433.

A new axis selection may only be programmed with inactive distance regulation,
otherwise error message 432 is output. The activation code may be located in the same
block as G265 and all other information in this NC block is ignored.

The axis selection programmed by G265 ... is reset to the presetting at deactivation of
distance regulation and at Control Reset.

9.5.2 M140 / M141 activation/deactivation of distance regulation


Syntax:
M140 Distance regulation ON using the preset BCD code
M141 Distance regulation OFF

Part Programming Manual


page 273/352
MACHINEMATE

Distance regulation is activated by the code M140. The effect is that the distance
between tool tip and work piece is regulated to a constant value when a programmed
path is traveled. This enables compensation of deviations in the actual work piece
geometry from the programmed work piece geometry. An NC block with M140 may
contain path information.

With 5-axis machines when transformation is active regulation is performed in the work
piece direction when all transformed linear axes have been distance-regulated. If an axis
in the current selection is not affected by transformation (e.g., a 3-axis machine), this is
not further regulated with active transformation. The offset built up by this time is
maintained. If not all axes involved in transformation are distance regulated then the
regulation is in the direction of the current direction vector.

Example:
N10 X0 Y0 Z0 F1000
N20 G81
N30 M140 X20

NC block N20 activates 5-axis transformation and N30 activates distance regulation.
Regulation is in the work piece direction if the first three axes of the machine are preset.

M141 deactivates distance regulation again. The NC block may not contain any further
codes or path information. When distance regulation is deactivated, there is no
compensating movement to the programmed position. The position resulting from
distance regulation is used for the next NC block as the starting position, by means of a
synchronization process. This prevents damage to the tool tip and the work piece.

9.5.3 Monitoring the axis limits


When distance regulation is active the axis limits of distance-regulated axes are
monitored in real time. If during processing of an NC block a point is reached where the
axis limits are exceeded, interpolation is stopped and error message 211 is displayed.

9.5.4 G74 is invalid


G74 Homing is not allowed with active distance regulation. Error message 431 is
displayed.

Note:

With active distance regulation, if the Feed enable or Drive ON signal is removed for one
of the axes to be regulated, the offset built up by then is retained. The voltage value
continues to be read in, but regulation no longer takes place. Regulation is only
continued when the Feed enable or Drive ON signal is re-applied.

Part Programming Manual


page 274/352
MACHINEMATE

9.6 Fast output signals


9.6.1 Output turned on or off by CNC with M-code
This feature is sometimes called laser shutter control because the signal to open
and close the laser shutter is critical in time. The CNC has to output the signal
directly and fast. To control the opening or closing of the laser shutter for safety
purposes with external signals (PLC, relays, etc.) an allow signal (shutter allow) is
necessary (see machine parameter BCDByteMaskIndex). This signal gives the
possibility to interlock the opening or closing of the laser shutter with different
conditions. This makes it possible to close the shutter in emergency situations or
open it, when all interlock conditions are fulfilled.

However this feature can be applied to any output signal with critical timing. The
CNC handles the output being turned on or off at the CNC interpolation timing, not
dependent on the PLC scan time. Some of the examples use laser terminology;
these are just examples, not the only application of these M-codes.

Some applications need additional fast signals (M-functions); therefore additional


bits are necessary. Due to this reason a complete byte for time critical signals is
provided. This byte has specified M-functions that can be selected in the part
program.

M111 output bit 1 M101 reset bit 1


M112 output bit 2 M102 reset bit 2
M113 output bit 3 M103 reset bit 3
M114 output bit 4 M104 reset bit 4
M115 output bit 5 M105 reset bit 5
M116 output bit 6 M106 reset bit 6
M117 output bit 7 M107 reset bit 7
M118 output bit 8 M108 reset bit 8
M109 reset all bits

Output set (open laser shutter) by M-function


The M-code to set an output bit (e.g., M111) is active at the beginning of an
executed block. The opening of the laser shutter takes a certain amount of time. A
delay of the feedrate release can be achieved by programming a dwell time.

N10 G04 F100 M111


N20 G01 X1000 F6000

Shutter opens at the beginning of the block dwell time cycle feedrate

Output off (close laser shutter) by M-function

Part Programming Manual


page 275/352
MACHINEMATE

The M-code that resets a fast output is modal and is active at the beginning of the
block. For example, the M101 resets the output bit that is set by M111.

The following conditions also reset the output bit signal (e.g., M101) and close the
laser shutter:

EMERGENCY STOP
CONTROL RESET
M02 or M30

9.6.2 Position-defined fast M-functions


Syntax

M111 to M118 (set output)


M101 to M109 (reset output)

With the function, the output of the fast M-codes (M101-M118) will be controlled so
that the output is affected by a defined position.

Example:

In the following example, a position is defined for the fast outputs at the points X10
and X20 is desired. After the position X10 is reached, the fast output bit 1 (M111) is
set; at the position X20 the fast output bit 1 (M101) will be reset. The function is
active at the beginning of the block so the axis reaching its start point (or the end
point of the last block) results in the fast output (set or reset).

With machine parameters, a delay (defined in microseconds) can be specified for a


fast output. The second figure indicates that a specified delay has retarded the fast
output actions (both the set and reset).

N10 X10 F1000


N20 X20 M111
N30 X30 M101

Part Programming Manual


page 276/352
MACHINEMATE

N30

N20

N10
t

retarded output
Bit = 1

Figure 9-12: Position-defined fast M-functions

Part Programming Manual


page 277/352
MACHINEMATE

9.7 Feed Influencing via Probe Signals


The Feed Influencing via Probe Signals feature requires associated additions to a
typical NC program to obtain the desired behavior using a probe. This feature is
similar to the M80 (delete remaining path) described earlier except that there are
external programmable input signals possible for the probe inputs rather than
dedicated probe input used for the M80.

9.7.1 General
There are 16 rapid inputs (2 bytes) available and there are three ways of influencing the
feedrate. The probe input bit among the possible two bytes is indicated in the part
program using an M-code for each bit.

M151 probe input byte 1, bit 1 is the active probe signal


M152 probe input byte 1, bit 2 is the active probe signal
M153 probe input byte 1, bit 3 is the active probe signal
M154 probe input byte 1, bit 4 is the active probe signal
M155 probe input byte 1, bit 5 is the active probe signal
M156 probe input byte 1, bit 6 is the active probe signal
M157 probe input byte 1, bit 7 is the active probe signal
M158 probe input byte 1, bit 8 is the active probe signal
M161 probe input byte 2, bit 1 is the active probe signal
M162 probe input byte 2, bit 2 is the active probe signal
M163 probe input byte 2, bit 3 is the active probe signal
M164 probe input byte 2, bit 4 is the active probe signal
M165 probe input byte 2, bit 5 is the active probe signal
M166 probe input byte 2, bit 6 is the active probe signal
M167 probe input byte 2, bit 7 is the active probe signal
M168 probe input byte 2, bit 8 is the active probe signal

9.7.1.1 Influencing the feedrate without Stop

No stop occurs in the axis feed movement. The rapid input signal just causes a block
transfer. Thus a change in the feedrate is possible through the application of external
digital signals.

9.7.1.2 Influencing the feedrate with stop and return movement

The feed movement is stopped immediately without any slope in the axial speed curve (a
hard stop). In the case that a return movement has been programmed, this occurs
afterwards. The change of program line occurs after this.

9.7.1.3 Influencing the feedrate with Stop

Part Programming Manual


page 278/352
MACHINEMATE

In this instance the feed movement is not stopped immediately (a soft stop), but is
stopped by inserting a new nominal value.

9.7.2 Programming
With a G170, G171 or G172 (applicable) the following options can be activated in
advance. The choice of one given option excludes the use of the other.

Syntax:
G170 (without axis information) no return motion,
block transfer with an instantaneous hard
stop
G170 X0.1 Y0.01 (with axis information) instantaneous hard
stop and then return motion in the X-axis by
about 0.1, in Y-axis by about 0.01
G171 Block transfer without Stop
G172 (without axis information) block transfer with
a soft stop without return motion
G172 X0.1 Y0.01 (with axis information) block transfer with a
soft stop and return motion in X-axis by
about 0.1, in Y-axis by about 0.01

Example:
N10 G170 Define no return motion.
N20 G1 X100 F100 M151 Proceed in the direction of X100 and
upon recognition of input 1, perform a
block transfer and initiate an
instantaneous hard stop of the axes,
display X100.
N20 G170 Y0.2 Define a return movement of Y = 0.2 mm.
N30 Y100 M152 Proceed in the direction of Y100 and
upon recognition of Input 2 initiate a
return motion of the axes and a block
transfer, display Y100.
N40 G171 Definition without stop.
N50 X0 M153 Proceed in the direction of XO and upon
recognition of Input 3 initiate block
transfer, display X0.
N60 G172 Define a Stop.
N70 Y0 M154 Proceed in the direction Y0 and upon
recognition of Input 4 a soft stop of
the axes is initiated, display Y0.
N99 M30

Since the movement on the return path occurs without a slope, monitoring of the
maximum permitted stroke per axis occurs. This path is computed as follows from
several machine parameters:

Return path = GainSpeedFactor * FastIOReturnMaxAppl

Part Programming Manual


page 279/352
MACHINEMATE

The machine parameter factor FastIOReturnMaxAppl is assigned according to the


situation. If the path goes into overrun, an error message is given and the pre-processing
of the program line stops.

Note:

G170 is active after a control reset.

The enabling of the probing logic (G170 to G172 and also M170, M171) must be done
when G01 is modal and when the modal feedrate is greater than 0. If both of these
conditions are not met then error message 196 will result.

9.7.3 Programming measurement probe logic


A bit mask can be defined by programming the NC or the PLC. If the bit so released is
used, the function measurement probe logic is initiated and causes the following.

Note:

M159 indicates that the PLC cannot define the bit mask for the probe signals; M159 is
active after a control reset.

M160 indicates that the PLC can define the bit mask for the probe signals.

9.7.4 Masking out input bits via the PLC


The PLC can deactivate certain input bits using two further interface bytes. The bit
activated by NC programming is only active if the corresponding bit of the interface byte
is being used. If that bit is not used, then activation by the NC programming will be
ignored. This function is only active after applying the corresponding interface bytes (see
Instructions for Start Up and for programming the PLC Interface)

9.7.5 G92 and setting the remaining distance to zero


After a control reset, the remaining distance offset and the zero point coordinate offset
(G92) remain intact. With a G92 statement, without axis information, the remaining
distance offset is set to null. The remaining distance offset is also set to null when
activating M171, the function Stop pre-processing the program line.

9.7.6 Measurement probe logic via the interface signal


In this case the function measurement probe logic is activated via a fast input signal.
Since this measurement signal does not lead to an immediate storage of the measured
position, the positioning precision is not as great as when the activation occurs due to a
measurement input.

Part Programming Manual


page 280/352
MACHINEMATE

9.7.7 Dwell time


The function Digital Measuring Signals is also effective for a programmed dwell time.

Example:
N10 G1 F500
N20 G4 F5000 M161 When input 9 (byte 2 bit 1) is recognized,
program line N20 is stopped and a block
transfer to program line N30 occurs.
N30 X100 M162
N99 M30

9.7.8 Programming with Stop on block pre-processing


This function stop the pre-processing of program lines is activated in NC programming
using an M code. This operates modally, that is until it is deactivated. If the function
Digital Inputs is activated, then, for example, it is possible to have branching to
subroutines and similar possibilities. The preprocessing of program lines will continue
after the next program block transfer.

M170 do not stop the pre-processing of program lines a subsequent G92 in a block alone
will not remove the G92 offset introduced by the probe contact
M171 the pre-processing of program lines is stopped this is needed if the program or
subroutine will perform a G92 to extract the axis offset from a probe contact
Note:

M170 is effective after a control reset.

Example:

N330 G1 F50 (G1FX TO ENABLE PROBING)


N340 G172 (*PROBE FUNCTION FOR FEEDRATE CHANGE*)
N350 M171 (*ALLOWS G92 TO REMOVE OFFSET*)
N360 M37 (GAGE IN)
N370 M24 (CALL UP GAGE CYCLE 1, PART 3 OD GAGE CONTROL)
N380 X8.40 F2.25 M157 (MONITOR GAGE, START FEED TO C3)
N390 G92 (REMOVE OFFSET FROM PROBE CONTACT)
N400 G10
N410 X8.325 F1.25 M158 (MEDIUM FEED TO C2)
N420 G92
N430 G10
N440 X8.3 F.6 M161 (MEDIUM FEED TO C1)
N450 G92
N460 G10
N470 X8.3 F.08 M162 (FINE FEED TO C0 SIZE)
N480 G92
N490 G10

Part Programming Manual


page 281/352
MACHINEMATE

9.8 Feed Interpolation


The Feed Interpolation feature requires another code (an E-value) within the program
to obtain the desired behavior.

9.8.1 Function and handling


The Feed Interpolation function guarantees that the path velocity can be continuously
changed during the processing of an NC block. During the processing of an NC block, a
programmed feed modification is interpolated in parallel to and depending on the path
interpolation.

The following applies:

Fcur: = Fold + (Fnew - fold) * (Scur/ Stot)


Fcur = current feed
Fold = Feed of the previous block
Fnew = Feed of the current block
Scur = path of the current NC block already traversed
Stot = total path of the current block
The function works in the NC block in which the setup NC address is programmed.

Example:
Feed interpolation is setup using the NC address E.

NC program:

N010 G01 X100 F200


N020 G01 X50 F100
N030 G01 X30 F50 E1
. . .
N100 G01 X100 F200 E1

N010 = X runs with 0.2 m/min to 100 mm


N020 = X runs with 0.1 m/min to 50 mm
N030 = X starts with 0.1 m/min and reduces the speed so it is 0.05 m/min at the end of
the block (at 30 mm).
N100 = X starts with 0.05 m/min and increases the speed so it is 0.2 m/min at the end of
block (at 100 mm).

Note:

When traversing with acc/dec slopes, the target speeds are not accomplished to a 100
percent since the deceleration is activated before reaching the end of block.

The CNC does not verify whether the acceleration limits of individual axes are exceeded
by this function.

Part Programming Manual


page 282/352
MACHINEMATE

The feed override also works while the function is active.

The function can also be programmed together with the rotational speed interpolation
(the electronic gear).

The function can be used for linear and circular interpolations.

Part Programming Manual


page 283/352
MACHINEMATE

9.9 Handwheels in Automatic mode


9.9.1 General
This function allows one or several axes with the handwheel in Automatic
mode to move. The movement of the selected axis results in an offset to
the programmed movement. The axes could be selected with the NC-
program block or via PLC interface signal. The offset values of the
handwheel movement can be transferred to a block of cycle parameters.

9.9.2 Programming
M200, M201-M208, M209, M210, M211

Syntax:

M200

With M200 the handwheel in automatic mode function will be activated.

The following M-code functions, with the axis selection via the NC-block
(M201-M211) or via the PLC-interface signals, can only be activated after
the M200 is activated:

M201-M208 With this M-code the axis-selection of axis 1 (M201) to axis 8


(M208) will be activated.
M209 This M-code activates several axes. The axis selections and
their handwheel factors will be programmed with the NC-axes
addresses present in this block. The default increment is 1
micron per handwheel click. For example, if an axis will
handwheel in G70/inch mode and an increment of 0.0001 is
desired, then the block sequence of N100M200 followed by
N110M209X2.54 (for a factor of 2.54) will result in each click
moving X 0.0001.
M209 with no axis selection/factor disables previously any
active selection.
M210 With this M-code the input of the handwheel counts will be
suppressed. The offsets established with the handwheel are
still active but the reading of the handwheel will stop. The
input of the handwheel is activated again with M201-M208.
M211 This M-code switches off the handwheel function. The
handwheel offset itself is not active any longer and the values
of the handwheel offsets will be transferred to a block of cycle
parameters. Any handwheel offsets will be removed and the
programmed positions will match the current positions.

Upon the M211, all eight of the cycle parameters will be written with the
current offsets from the handwheel activity. The start of this block of 8
parameters is configurable.

Part Programming Manual


page 284/352
MACHINEMATE

After M211 several intermediate blocks will be created.

If the M211 block also has a distance programmed then the error message
434 is displayed.

Example:

N10 G1 F1000 Default feedrate


N20 M200 Activation of the handwheel function
N30 M201 X100 M201 - the handwheel offsetting for X-axis
is activated while X moves
N40 X100 Y50 X-axis handwheel is still active
N50 M202 X50 M202 - the handwheel offsetting for Y-axis
is activated while X moves
N60 M209 Handwheel offsetting ignored for both X-
and Y-axes
N70 M210 Reading of the handwheel not active
N80 X55 Y100 Handwheel offset values are still active
because the handwheel function is still
active but not reading
N90 M211 Handwheel function will be deactivated,
removing any handwheel offsets
N100 M30

9.9.3 End of program and control reset


The handwheel function will be switched off at the end of program and after a control
reset.

A transfer of the handwheel offsets to a block of cycle parameters will not occur during
these events (like done with M211).

9.9.4 Cycle-Stop, Cycle-Off


With the cycle-stop or cycle-off conditions during an active part program, the selected
axis can still be moved with the handwheel.

Example:

N10 G1 F1000
N20 X100
N30 M201 Handwheel with X.
N40 M00 M00 results in a programmed stop. The selected
axis (X) can still be moved with the handwheel.
With a subsequent "cycle start" the block
processing will continue with the next block
(with handwheel offset in X, if any).
N90 M30

Part Programming Manual


page 285/352
MACHINEMATE

9.10 Infinitely Rotating Round (or Rotary) Axis


The Infinitely Rotating Round (or rotary) Axis feature requires several changes or
additions to a typical NC program to obtain the desired behavior.

9.10.1 General
The function Infinitely rotating round axis handles the endless moving of an axis in one
direction. In this scenario, the position of the axis is reduced automatically to the range of
0 to 360 for the round axis, without any influence on the axis motion. In particular, this
reduction has no effect on the moving of other axes (including linear axes) of the control.

Altogether, there are three different variants of the infinitely rotating round axis:

Normal round axis

Round axis drives always on the shortest way to the programmed position (such as
a tool magazine axis).

Modulo round axis.

In the following paragraphs, the features and the NC programming of all three variants
are described.

Altogether eight round axes are possible, but the number of modulo round axes is
restricted to three.

9.10.2 Programming
The programming of a round axis follows mainly in analogy to that of linear axes. How
certain movements of round axes must be programmed is different on the three variants
of round axis.

Like for a linear axis, the NC programming is done with the address letter of the axis. For
the modulo round axis the number of revolutions can be programmed additionally by
means of a fixed address letter.

For a round axis it is characteristic that after a complete revolution of the axis the same
machine position is reached. Therefore, any position of a round axis is uniquely
determined by a value, which is in the interval 0 to 360.

Note:
Depending on default values the travel range corresponding to one revolution of round
axes can be different. Nevertheless, in the following it is assumed that one revolution of
the axis corresponds to 360.

Part Programming Manual


page 286/352
MACHINEMATE

9.10.3 Normal round axis


The programming of the normal round axis is done in the usual way with the address
letter of the axis. The programmed value determines the axis end position. However, the
sign is not considered, but it determines only the rotation direction of the round axis. For
example, the A axis drives after programming of

N.. A90
to the position A = 90 with positive rotation direction. Alternately, if one is programming
N.. A-90
the position A = 90 is reached with negative rotation direction (see figure below).

Figure 9-13: Rotations of a normal round axis

On active G90 (absolute coordinate programming) the programmable positions are


limited to the range 0 up to 360. If a greater value is programmed a corresponding
error message is generated. That means in one NC block maximum one rotation can be
driven. If more than one rotation shall be driven in one NC block, first G91 (relative
coordinate programming) has to be activated. On active G91 the programmable value is
not limited and hence more than one rotation can be driven in one block. The
programmable values for a round axis are presented in the table below. (The values in
the table are not the absolute positions in degrees but only the values that can be
programmed.)

Active range A
G90 -360 < = A < = 360
G91 any value
Table 9-4: Programmable values for a round axis

Part Programming Manual


page 287/352
MACHINEMATE

For example the A axis has the position A = 90, then it is driving after programming of

N.. G91 A370

to the absolute position A = 90 + 370 = 460 100 with positive rotation. (That
corresponds to the movement of 1 rotation plus 10.) On reaching the position A = 360
the axis value is reduced to 0. This is also visible in the axis display of MMI.

If one is programming

N.. G91 A-740

the A axis drives 2 revolutions plus 20 with negative rotation.

The absolute position A = 0 can be programmed in two different ways. If it shall be


driven to A = 0 with positive rotation, one must program A0 or A360. The axis drives to
A = 0 with negative rotation, if one programs A-0 or A-360.

Example:
In the following program example it is assumed, that X and Y are linear axes of the
machine and A is a round axis.

N10 G90 X0 Y0 A0 F1000


N20 X10 Y20 A90
N30 X20 Y30 A-315
N40 G91 X50 Y50 A360
N50 M30

In the block N10 all axes move to the position 0. After that the linear axes drive to X = 10
mm, Y = 20 mm and the round axis to A = 90. In the next block N30 the axes drive to X
= 20 mm, Y = 30 mm and the round axis to A = 315. On that movement the A axis
rotates in negative direction. In the block N40 relative coordinate programming is
activated. The linear axes drive 50 mm and reach the positions X = 70 mm, Y = 80 mm.
The round axis makes one rotation in positive direction. The movements of the axes are
presented in the figure below.

Part Programming Manual


page 288/352
MACHINEMATE

Figure 9-14: Rotations of A axis (normal round)

9.10.4 Tool magazine round axis


The tool magazine round axis drives always the shortest way to the programmed
position. Thus the round axis drives up to one-half rotation in one NC block (180). The
programmable values are different for absolute and relative coordinate programming,
respectively, in the table below.

Active Range A
G90 0 < = A < = 360
G91 -360 < = A < = 360
Table 9-5: Programmable values for a tool magazine axis
If other values are programmed in a NC program an error message is generated.

How a programmed position is approached depends on the actual position of the round
axis. For example, the position A = 90 is reached with positive rotation after
programming of

N.. G90 A90

if the previous position was A = 0. If the previous position was A = 180, the position A =
90 is reached with negative rotation direction.

On active relative coordinate programming the round axis drives the programmed angle
relative to the previous position. If the programmed angle is greater than a half rotation
of 180, the rotating direction is reversed. For example after programming of

N.. G91 A315

Part Programming Manual


page 289/352
MACHINEMATE

the axis is not rotating from 0 to 315 with positive direction if the previous
position was A = 0, but it rotates with an angle of 45 in negative direction (see
figure below).

Figure 9-15: Tool magazine round axis

9.10.5 Modulo round axis


The programming of the modulo round axis is different of that of the other round axis
types. Additionally to the programming of position, it is possible to specify the rotation or
revolution number (sometimes also called the round number). The rotation number is the
same as the number of axis revolutions. The programming of rotation number is
accomplished with an extra address letter. The standard letters for that programming are
I, J and K for the three possible modulo axes, respectively. However, the default values
can also be other address letters.

It is not possible to program in a NC block only the rotation number of a modulo axis, but
it has to be programmed simultaneously a value for the position (normal address letter of
the axes). For example, the position of the axis is A = 45 (I = 0) and two complete
rotations are required so this statement is required:

N.. A45 I2

On active relative coordinate programming (G91) the programmed axis position as well
as the programmed rotation number is evaluated incrementally. That means after
programming of

N.. G91 A45 I3


the modulo axis drives 3 rotations plus an angle of 45 with positive rotation direction
(see the figure below, where 3 rounds = 3 rotations).

Part Programming Manual


page 290/352
MACHINEMATE

Figure 9-16: Modulo round axis

In the axis display on the MMI the programmed rotation number of the end point as well
as the actual rotation number are shown in addition to the position. The rotation numbers
(or the number of revolutions) that are displayed on the MMI are limited to the range -
999 to 999. However, this limitation has no effect on the travel range of modulo axes,
but only for rotation numbers that are outside the interval the corresponding maximum
values are displayed. Moreover, the actual rotation numbers are simultaneously
available in cycle parameters. It depends on default values which cycle parameters are
used. These cycle parameters can be accessed in a NC program in order to influence
the program execution depending on the actual rotation numbers of modulo axes.

The rotation counters of modulo axes are reset to zero on control reset and on program
end.

The traveling rotation numbers of modulo axes is principally unlimited (see the following
remark). In contrary to that the value that is programmed with the normal axis letter
cannot be arbitrary. The possible values are listed in the table below.

Active Range A
G90 0 < = A < 360
G91 any value
Table 9-6: Programmable values for a modulo axis

Part Programming Manual


page 291/352
MACHINEMATE

Note:

The maximal rotation number that can be traveled in one NC block is limited. The
limitation depends on the resolution of the round axis and from units that correspond to
one revolution of the axis. For example the maximal rotation number is R = 41 for a
round axis with a resolution of three digits after the point (m resolution) and a rotary
number of 360. For higher resolutions of the axis the maximal rotation number is
reduced correspondingly. If a rotation number outside the maximal range is
programmed, a corresponding error message is generated. This limitation is only valid
for the rotation number that can be traveled in one NC block. However, the total traveling
rotation number is not limited.

The cycle parameters, which are used for the storage of rotation counters, should not be
used for other purposes. That means, if the rotation counters are requested in the NC
program, these cycle parameters must not be used elsewhere, otherwise an incorrect
execution of the NC program results.

Part Programming Manual


page 292/352
MACHINEMATE

9.11 Multiple Spindles


The Multiple Spindles feature requires associated changes or additions to a typical
NC program.

9.11.1 General
The first spindle in the system is termed Main spindle. The additional spindles, up to a
maximum of five, are called Minor spindles. The function Automatic gear shifting is
only possible for the main spindle. The minor spindles feature all other spindle functions
apart from this, i.e., feedback, spindle orientation, feed rate in mm/rev, constant cutting
speed, constant circumferential speed, thread cutting and spindle/rotational axis switchover.

9.11.2 Spindle programming


Spindle programming is performed with an M-code and an S-value. The spindle last
programmed is always the active spindle. The programmed S-value refers to the currently
active spindle. All programmed rotational speeds and directions are maintained. If several
spindles have set up the same axis or D/A channel, the output is made to the spindle last
programmed.

For the main spindle (first spindle) the previous M codes are used.

M03 spindle 1 on, clockwise


M04 spindle 1 on, counter clockwise
M05 spindle 1 off, spindle stop

The M-Codes for the other spindles are usually found in the 200 range (but the first M-code
for each spindle is configurable).

M213 spindle 2 on, clockwise


M214 spindle 2 on, counter clockwise
M215 spindle 2 off, spindle stop

M223 spindle 3 on, clockwise


M224 spindle 3 on, counter clockwise
M225 spindle 3 off, spindle stop

The S-value does not have to be reprogrammed after each spindle change. If no S-value is
specified after a spindle change, the last S-value programmed for this spindle is valid.

Example:
N10 M213 S4000 spindle 2, clockwise, S = 4000 rpm
N20 S2000 spindle 2, clockwise, S = 2000 rpm
N30 M03 S800 spindle 1, clockwise, S = 800 rpm
N40 M214 spindle 2, counter clockwise S = 2000 rpm
N99 M30

9.11.3 Thread cutting, G33 and G34


Part Programming Manual
page 293/352
MACHINEMATE

The function Thread cutting is activated with G33 and G34 for the selected spindle.
The function remains active for the spindle after it is deselected; i.e., the spindles actual
rotational speed is used for calculating the feed rate. Thread cutting is only ever active
for one spindle at a time. Activation for another spindle is made after reprogramming
G33 or G34. The spindle does not have to be reselected for deactivation, i.e., to alter the
interpolation type (e.g., G01).

Note:
The function Thread cutting can only be activated for spindles with feedback.

Example:
N10 M213 S8000
N20 M03 S400
N30 G33 X10 I1 thread cutting with spindle 1
N40 X20 I2 following thread
N50 M213 S800 continue thread cutting with spindle 1
N60 X30 I1 no following thread
N70 G33 X40 I1 thread cutting with spindle 2
N..
N9999 M30

9.11.4 Spindle speed override rotary switch, G63


The position of the spindle rotary switch has a direct effect on all spindles.

The function G63 Spindle rotary switch off and G66 Spindle rotary switch on are also
directly effective for all spindles. The spindle percentage value programmed at G63 with
S becomes effective for all spindles immediately.

By means of special machine parameters, the spindle rotary switch can be adjusted so
that it does not affect individual spindles; i.e., the spindle rotary switch has no influence
on the rotational speed of spindles, which are appropriately set up. The percentage
value programmed with G63 also has no influence on the rotational speed.

9.11.5 Spindle speed restriction, G92


There are three possible rotational speed restrictions:

setup spindle restriction,

grinding wheel restriction and

G92 spindle restriction

If all are simultaneous effective, the smallest restriction is used.

Example:
N10 M03 S1000 spindle 1 rotates with S=1000 rpm
N20 G92 S500 spindle 1 is restricted to S=500 rpm
Part Programming Manual
page 294/352
MACHINEMATE

N30 M213 S3000 spindle 2 rotates with S=3000 rpm,


restriction is not active
N40 G92 S2000 spindle 2 is restricted to S=2000 rpm
N50 M03 S1200 spindle 1 is restricted to S=500 rpm
N60 G92 restriction is lifted for spindle 1

N...
N9999 M30

The spindle restriction programmed with G92 still remains effective after CONTROL
RESET and end of program. The restriction can only be lifted by programming G92 or by
restarting the CNC.

An S-value primarily affects G92.

Example:
N10 M03 S1000
N20 G92 S1500 gives a spindle restriction for the first
spindle to S=1500 rpm. The rotational
speed is not changed.
N..
N99 M30
Note:
Any part position offsets programmed with G92 are also reset.

9.11.6 Feed rate in mm / rev, or in / rev, G95


The function Feed rate in mm/rev or in/rev is activated for the current spindle with G95
and can only be active for one spindle. The function remains active for this spindle after
it is deselected, i.e., the actual speed of the spindle is used to calculate the feed rate.

Reprogramming G95 can become active for another spindle. The spindle does not have
to be reselected for deactivation with G94.

Note:
The code G95 can only be applied for spindles with feedback.

Example:
N10 M03 S100
N20 G95 F1 X10 Rotational speed of spindle 1 is used
N30 M213 S300 X20 spindle 2 is the active spindle,
rpm of spindle 1 is still used
N40 G95 F2 rpm of spindle 2 is used
N50 X30
N60 G94 G95 is deactivated
N..
N99 M30

9.11.7 G93, G96 and G97

Part Programming Manual


page 295/352
MACHINEMATE

The rotational speed of a spindle can be determined in three different ways:

G97 S = spindle speed in RPM

G96 S = constant cutting speed in m/min or feet/min

G93 S = constant circumferential speed m/min or feet/min

These functions are all mutually exclusive. After CONTROL RESET, the state that was
set up is active.

Note:
Programming of one of the three G-Codes automatically deactivates the previously
active function.

9.11.7.1 Constant cutting speed, G96

The function Constant cutting speed can be simultaneously active for several spindles.
For the calculation of the cutting speed the position of the setup transverse axis for each
spindle is used.

For the active spindle, the function Constant cutting speed can be activated with G96.
The function remains active for the spindle after it is deselected. This spindle must be
reselected to deactivate the function using G97 or G93 and for re-programming the
cutting speed (S-value).

An additional activation for the function Constant cutting speed is possible for another
spindle after the activation of the spindle using G96.

As long as no S-value has been programmed with G97, the current spindle speed is
retained.

Example:
N10 M03
N20 G96 S100 F10 X20 speed of spindle 1 is at cutting speed
of S = 100 rpm
N30 M213 X10 spindle 2 is the active spindle, speed
of spindle 1 is at cutting speed of S
=100 rpm
N40 G96 S30 F20 speed of spindle 2 is at cutting speed
of S = 30 rpm. Speed of spindle 1 is
still at cutting speed of S=100 rpm
N50 X5
N60 G97 G96 is deactivated for spindle 2. Speed
of spindle 1 is still at cutting speed
of S =100 rpm.
N99 M30

9.11.7.2 Constant circumferential speed of a grinding wheel, G93


Part Programming Manual
page 296/352
MACHINEMATE

This function is activated using G93 for the current spindle and deactivated using G96 or
G97. The circumferential speed of the grinding wheel is programmed using an S-value
and the grinding wheel diameter is programmed with K.

K is only recognized as grinding wheel diameter using G93. If G93 is not programmed in
the same block, K is taken as circular interpolation.

By programming the tool number (e.g., T11) the active spindle can be assigned a
grinding wheel and also a grinding wheel diameter. This assignment using tool numbers
has priority over a programmed K-value.

The function remains active for the spindle even after it is deselected. To deactivate or to
reprogram the circumferential speed (S-value) or that of the grinding wheel (K-word), this
spindle must be reselected.

The function Constant circumferential speed can only be activated additionally for
another spindle after activating that spindle.

The rotational speed is determined by the CNC depending on the programmed


circumferential speed and the current diameter. The rotational speed is automatically re-
calculated after each change of the diameter. If no S-value is programmed after
deactivation, the current rotational speed is retained.

In addition to monitoring the rotational speed, the maximum allowable circumferential


speed can only be assigned to the spindle by tool programming. If the monitoring limit is
exceeded, depending on the setup, further block processing is stopped and only error
message 445 is output (see machine parameter description).

The function Constant circumferential speed of grinding wheel can be activated


simultaneously for several spindles.

Calculation formula for rotational speed S

programmed S-value
S=
2 Radius *
Example:
N10 M03
N20 G93 S100 F10 rotational speed of spindle 1 is adapted
S100 K20 to circumferential speed from S =100 rpm
and the radius 10 mm
N30 M213 X10 spindle 2 is the active spindle, rpm of
spindle 1 is continued with
circumferential speed (S =100 rpm)
N40 G93 S30 F20 T4 rpm of spindle 2 is adapted to
circumferential speed from S =30 rpm and
the radius of grinding wheel 4, rpm of
spindle 1 is continued with
circumferential speed from S =100 rpm
N50 X5

Part Programming Manual


page 297/352
MACHINEMATE

N60 G97 G93 is deactivated for spindle 2 rpm of


spindle 1 is still adapted to
circumferential speed from S =100 rpm
N99 M30

9.11.8 Spindle orientation, M19


When M19 is programmed the setup stop speed is output as new set speed for the
active spindle. In addition, a spindle with feedback is oriented at the position
programmed with S. This is performed as soon as the stop speed is reached. The S-
value indicates the angle between spindle marker and required set position.

Note:
Spindle orientation is possible for all spindles and for several spindles at once.

Example:
N20 M03
N30 M19 S90 Spindle stop at marker position + 90 degrees
N40 M19 S270 Spindle stop at marker position +270 degrees
N99 M30

9.11.9 Spindle / rotational axis switchover


The function Spindle / rotational axis switchover set up one or more spindles to an axis
channel. Any of the spindles in the system can be used. For programming, see the
section Switchover Spindle-rotational axis.

9.11.10 Gear ranges or gear stages


The function Gear stages is only allowed for the main spindle (first spindle). For
programming, see the section Spindle Gear Stage Selection.

Part Programming Manual


page 298/352
MACHINEMATE

9.12 Parallel Axes


The Parallel Axes feature requires two G-codes to activate and deactivate the
feature.

9.12.1 Syntax
G21 Activate parallel axes
G22 Deactivate parallel axes

The activation of the parallel axes function is done by programming G21. The parallel
axes defined with machine parameters (see machine parameter CharacterApplTab) are
driven by the respective leading axis. Depending on the mirroring of the leading axis the
parallel axes drives contrary parallel or parallel to the leading axis. The parallel axes
function works relative to the power-on position; that means the parallel axes only runs
the difference to the power-on position parallel or contrary parallel to the leading axis. If it
is desired to run the parallel axis parallel to the mirrored leading axis this has to be
programmed explicitly with G38. The current position of the parallel axis is not shown on
the display. After deactivation of the parallel axes function via G22 the parallel axis is
normally moved out of power-on position. The distance the parallel axis is moved out of
power-on position internally has the same effect as the programming of G92 for a new
zero adjustment. Therefore it is recommended to program G92 without axes information
after deactivation of the parallel axes function to set the machine back to its original
coordinates. Up to three axis letters can be configured to associate with the same
master axis in this parallel arrangement.

Note:

With G21 active a programming of the parallel axes results in an error message. In
connection with G38 the parallel axes may be programmed. An axis is supposed to be
programmed even it is within an active level and a circle interpolation type (G02, G03,
G12, G13, G07) is active.

In manual mode the parallel axes always are autonomous axes. Therefore it is not
possible to move them simultaneously with the respective leading axes.

When programming a parallel axis with G74 (programmable reference point drive on)
G22 must be programmed in advance.

In contrary to the gantry-axes function the parallel axes function generally does not result
in a parallel movement of the machine axes, if the leading axis is a transformed axis.

Part Programming Manual


page 299/352
MACHINEMATE

9.12.2 Program examples

9.12.2.1 Example 1

Possible error message on activation of the parallel axes:

N10 G17 Level selection, e.g., X, Y-level


N20 G02 Circular interpolation
N30 G21 Error message if X or Y is a parallel axis
...

9.12.2.2 Example 2

Assumption:

Four axes control with the axes X, Y, U and V. On activation of the parallel axes U is
parallel to X and V is parallel to Y.

N10 G01 X100 Y0 U0 V100 F1000 Move to position:


X= 100, Y= 0, U= 0, V= 100
N20 G21 Activation of parallel axes
N30 X0 Y100 Move to position:
(no information on display)
X= 0, Y= 100, U= -100, V= 200

N40 Y200 Move to position:


X= 0, Y= 200, U= -100, V= 300
N50 G22 Deactivation of parallel axes
N60 G92 Reset the axes position to
machine position

9.12.2.3 Example 3

N10 G01 X100 Y0 U0 V100 F1000 Move to position


N20 G38 X1 Mirroring X-axis
N30 G21
N40 X0 Y100 Move to position:
X= 200, Y= 100, U= -100, V= 200
X and U move anti-parallel
N50 G22 Deselect parallel axes function
N60 G92 Reset the axes to the original
machine coordinates

Part Programming Manual


page 300/352
MACHINEMATE

9.13 Positioning Axis


The Positioning Axis feature requires a different part program approach as a
Positioning Axis is not capable of all the interpolation variations.

9.13.1 Introduction
Positioning axes are NC axes that are interpolated individually and with independent
feed. The interpolation of a positioning axis is performed asynchronously to the
interpolation and to block changes of other positioning or path axes. Positioning axes
can be moved in three ways:

in the 'Manual' and 'Reference point' NC operating modes in the same way
as path axes;

in the 'Automatic' NC operating mode via a NC program, parallel or


alternative to path axes programs. Here, the positioning part of the NC
program is not executed at first but only written to the positioning memory.
The movement of the positioning axes is activated only by the PLC via an
interface signal to the CNC after the axes have previously been enabled by
the NC program using G188.

via PLC-movement commands.

Note:
Positioning axes are defined by machine parameters and can never be interpolated in
the path operating mode.

A maximum of 32 positioning axes are possible.

With path axes also available, the processing (programming, implementation) of the
positioning axes is partially different.

Part Programming Manual


page 301/352
MACHINEMATE

9.13.2 Programming
Positioning axes can be programmed in the same way as path axes, e.g., using the NC
block format. Within a NC program, both axis types can be programmed individually or
commonly; i.e., a NC program can consist of a positioning section and/or a interpolating
path section. The positioning section must always be at the beginning of the NC
program. The positioning section can also be concluded by M2/M30, by G188, and in
case of additional path axes by programming a path axis character. Within the
positioning section, the positioning axes must be programmed separately; i.e., the
positioning section embodies exactly one positioning section per programmed
positioning axis. The positioning sections must keep the applied axis order of the
positioning axes. A positioning section is concluded by programming another positioning
axis character or by beginning the interpolated axes section. The following has to be
noted while programming the positioning axes:

only the following G-codes are possible: G00, G01, G04, G53 - G59, G63,
G66, G70, G71, G90, G91, G98;

all modally effective G-codes, all feed values and H-correction numbers are
not automatically reset at the end of a positioning section or start of
interpolating path section; an F-word must be programmed in the first block
containing G01;

at a certain axis position, a signal can be output to the PLC using G98. The
length of the signal is programmed in F in milliseconds and also acts as a
dwell time. Together with G98, traversing information is ignored;

if a positioning axis is not programmed, its positioning memory is erased;

the entire positioning memory is erased if an error occurs during


programming.

While executing a NC program with a positioning section in the 'Automatic' NC operation


mode, the traversing and dwell time blocks of the individual positioning axes are
processed and written into the positioning memory. However, these are not executed! In
the basic state, the size of the positioning memory has a capacity of 50 blocks per
positioning axis, i. e. for every positioning axis, the positioning section of the NC program
can have a maximum length of 50 NC blocks.

Part Programming Manual


page 302/352
MACHINEMATE

9.13.2.1 Execution of motion

From the PLC program, the start of the positioning blocks occurs via an interface signal
to the CNC (IN_POS_01 to IN_POS_05) and it is only processed in the 'Automatic' NC
operating mode.

If the H- and G-correction value memory are changed in the CNC between 2 executions,
the positioning memory are not automatically changed too but must be refilled by a
renewed processing of the positioning program.

Using 'Cycle stop'

active positioning commands from CNC are halted, and

using 'Cycle Start'

the axes are restarted.

9.13.2.2 Execution in case of additional path axes

If additional path axes are available then the execution of the movement and dwell time
blocks of the individual positioning axes stored in the positioning memory must be
enabled via G188 in an NC program in the 'Automatic' NC operating mode. After G188
has been activated, every positioning axis can be individually activated via an input
signal at any times. The activated positioning axes are independently interpolated of
each other and of the path axes with their programmed feed. The program end of the
active program can be reached only if all of the movements and dwell time blocks stored
in the positioning memory have been processed; i.e., all programmed positioning axes
must have been activated.

After the positioning axes have executed their programmed blocks, an end of program
(M2/M30) must be active before issuing the next enable using G188 or homing must
have been activated, i.e., G188 may only be activated once in an NC program.

9.13.2.3 Axis information without additional path axes

If no additional path axes are available, the axes can be activated as soon as the
programming and/or the filling of positioning memories occurred.

Part Programming Manual


page 303/352
MACHINEMATE

9.13.2.4 Examples

Definitions:
P1: Positioning axis program
P2: Path axis program
X, Y Path axes
U, V Positioning axes
P1
(Positioning part to positioning axis U)
N10 G54
N20 G0 U0
N30 G1 U-25 F400
N40 G4 F100
N50 G0 U0
N60 U-25
N70 G1 U-40
N80 G98 F200
N90 G0 U100
(Positioning part to positioning axis V)
N100 G0 V0
N110 G1 V-100 F280
N120 G98 F200
N130 G0 V100
N140 M30

In P1, the positioning axes are only programmed and the positioning memory filled. The
blocks N10-N90 generate the positioning section for U, the blocks N100-N130 the
positioning section for V. The blocks N80 and N120 signal the processing end of the
individual positioning axes to the PLC program.

P2
N10 G0 X0 Y0
N20 G1 X200
N30 G188 Mxx
N40 G2 X200 I150

N200 M30

In P2 in block N30, the positioning memory is released for processing by G188. Using
Mxx, the release is communicated to the PLC that activates the positioning axes now via
the individual input signals. Mxx is an M-code arbitrarily to be defined that is here
interpreted as an enable signal for the positioning axes by the PLC program. G188
and/or a path part could also be positioned following N130 in P1.

Part Programming Manual


page 304/352
MACHINEMATE

9.14 Programmable Oscillation


The Oscillation feature requires several M and G-codes within the NC program to
obtain the desired behavior.

9.14.1 Preparation set


The sinusoidal oscillation is prepared with a G35 block. The specification of at least one
oscillation axis with a deviation length and one oscillation frequency is absolutely
necessary. Dwell times and the number of deviations can also be programmed as
required. The frequency, number of deviations and dwell times are likely to be different
for each axis. A different preparation block must be programmed for each axis-specific
assignment. All oscillation data can be described by parameter whereby a parameter
that has the value 0 means that this date has not been programmed. Only the deviation
lengths are processed with signs. All other data are assumed to be absolute values.

Example:

N10 G35 X+5 Y 10 E4 I1000 J1000 Fl

9.14.2 Erasing oscillation data


The data defined with G35 can only be erased by a renewed start of the CNC or a G35
block that does not contain information.

9.14.3 Deviation lengths


The amplitude of the oscillation deviation is specified by the programmed axis value in a
G35 block. The oscillation direction is determined here by the sign of the axis value. If no
oscillation axis is programmed in a G35 block, then the block will be rejected with error
message 272. A separate G35 block must be coded for each axis if a separate
oscillation profile is required for each axis.

The deviation length must be at least 2 increments in size. Otherwise, error message
274 will be issued.

9.14.4 Number of deviations


The number of deviations is programmed using a NC address. It is usually the letter E.
The value of the E word specifies the number of oscillation deviations to be executed. If
the two axes are to have different deviation numbers, these must be programmed in two
separate G35 program blocks.

Example:
N10 G35 X+5 E4 Fl X-axis four oscillation deviations
N20 G35 Y-10 E2 F1 Y-axis two oscillation deviations
Part Programming Manual
page 305/352
MACHINEMATE

9.14.5 Frequency
The frequency of oscillation is defined by the F word. The standard unit of measure for
the frequency is deviations/minute. A scaling factor can be specified that the F word can
be multiplied by in order to also program small frequencies (see the application data
description). If the two axes are to have different frequencies, these must be
programmed in two separate G35 program blocks.

Example:
N10 G35 X+5 F2 X-axis 2 deviations/min
N20 G35 Y-10 F1 Y-axis 1 deviations/min.

At least four servo loops must be available per deviation. In this way the frequency is
limited at the upper end.

15000
maximum frequency =
servo time

The G35 block will be rejected with error message 274 if no frequency is programmed.

9.14.6 Dwell times


Dwell times can be programmed at the starting point and at the amplitude point of
oscillation deviations. The NC addresses I (starting point) and J (amplitude point) are
available for this purpose. By default, the times are stated in milliseconds (see the
application data description).

If the axes are to have different dwell times, these must be separately programmed in
two separated G35 program blocks.

Example:
N10 G35 X+5 I1000 J1000 F1 X-axis 1 second dwell at starting
point and at the amplitude point,
N20 G35 Y-10 J2000 F1 Y-axis 2 seconds dwell time only at
the amplitude point.

9.14.7 Behavior in case of programming errors


With programming errors, an active oscillation will continue to run until the program stops
in the home position. By default, the last oscillation deviation is discontinued on all
oscillation axes. It is also applicable to still execute the current deviation after reaching
the home position (see the application data description).

9.14.8 Behavior in case of Emergency Stop


With an Emergency Stop, an active oscillation will be unconditionally discontinued and
synchronized to the programmed final point.

Part Programming Manual


page 306/352
MACHINEMATE

9.14.9 M20 Start M-code


The start M-code can be programmed at any point within the NC program and initiates
an oscillation start. Only then the oscillation data contained in the preparation block are
processed. The Start M-code can be programmed straight into the G35 block. It should
not be programmed before the G35 block since otherwise old oscillation data can be
activated.

Example:
N10 G35 X+5 Y-10 E4 I1000 J1000 Fl M20

M20 is the specified start M-code. The oscillation data have already been prepared
before the oscillation is started.

9.14.10 M21 End M-code


The end M-code is the only way to stop the oscillation while an NC program is being
executed. This can be placed anywhere in the NC program.

Note:
Even when the axes carry out no further oscillatory movements since the programmed
number of deviations has been attained, the oscillation can only be considered as
completed when the End M-code has been recognized.

Upon recognizing the End M-code, the oscillation is discontinued and synchronized to
the current nominal position. In this case, there is assurance that a Start M-code
programmed into the next NC block will be carried out since there are no further
oscillations active (see the application data description). With a synchronized deviation
abort it should be noted that the starting point for further oscillations has been changed
(due to the synchronization). In applications where this effect is undesirable, the block
preparation before a new Start M-code should be stopped using M00 programming or by
using signals output by the PLC until a previously activated oscillation is actually
finished.

Example:
N10 G35 X+5 Y 10 E4 I1000 J1000 Fl M20
N20 M21
N30 M0
N40 M20
N..
M20 or M21 are the specified Start or End M-codes (see the application data
description). At M0, no deviation abort with synchronization and no oscillation stop are
applied. In this way, the M0 start can be delayed until the first oscillation is finished and
the second oscillation in N40 does not get lost. An M0 start can be avoided by
programming a sufficiently long dwell time into N30.

Example:

Part Programming Manual


page 307/352
MACHINEMATE

N10 G35 X+5 Y 10 E4 I1000 J1000 Fl M20


N20 M21
N30 G4 F250000
N40 M20
N..

Frequency 1 deviation/minute, dwell time 250 seconds.

One can omit block N30 and under some circumstances obtain a more dynamic time
behavior by removing the transfer enable via the PLC during the period from the
recognition of the Start M-code to the end of the active oscillation in N10.

9.14.11 M00 Programming


By default, M00 only stops the interpolation until there is a restart but not the oscillation.
In order to also achieve the dependency of the oscillation on an interpolation, there is
application data available that can also be used to facilitate an oscillation stop (see the
application data description).

9.14.12 Program end / home position


To exit a program using program end or home position causes the end of the oscillation
even if no End M-code has been processed yet in the NC program. The last deviation
will also be executed as standard. It is, however, possible to specify a deviation abort
with synchronization using application data (see the commissioning instructions).

The deviation abort is activated when the event occurs.

Note:
In the NC program one must ensure that the oscillation does not negatively affect the
axial dynamics since the software does not monitor these effects. Should an axis violate
its software limits during the oscillation, the axis will be held at its axis limit and its
oscillation value will be erased.

9.14.13 Error messages


274 Oscillation: NC address F incorrect
This error message is generated if either no frequency or an excessively high
frequency is programmed.

274 Oscillation: NC address X incorrect


For this error, the X-axis is an oscillation axis. The CNC generates this error
message if, during the basic preparation, the X-axis is still oscillating or the
programmed deviation length is too small.

272 Oscillation: program error!

Part Programming Manual


page 308/352
MACHINEMATE

This error image is shown when there is no oscillation axis programmed in the
G35 block.

9.15 Switchover Spindle-Rotary Axis


The Switchover Spindle-Rotary Axis feature requires two M-codes to establish the
servo context (either spindle or rotary axis) within the NC program.

9.15.1 General
The function Switchover spindle/rotary axis enables a programmable switchover
between the spindle and rotary axis functions of a rotational axis within an NC
program. Any rotational axis present in a CNC station can be defined via machine
parameters as a switchover axis.

In this application, one axis and one spindle (or spindle group) share an output
channel (i.e., the analog D/A voltage with encoder feedback).

9.15.2 Programming
The switchover between spindle and rotary axis is programmed using
specific M-codes. The M-codes M280 and M290 are used as default (but
they can be changed via machine parameters).

M280 Rotary axis operation on


M290 Spindle on

Example 1:
In this example, C is the switchover axis.

N10 M280 Rotary axis operation on


N20 G1 X0 Z0 F1000
N30 M290 spindle on
N40 M03 S800 spindle programmed
N50 X10 F1000
N60 Z20
N70 G04 F2000 S400 M04
N80 X5
N90 M280 spindle off
N100 X0 C20
N110 M30

Example 2:
In this example, C and A are the switchover axes, where spindle 1 uses the channel
of the C-axis, while spindles 2 and 3 use the channel of the A-axis.

N10 M280 Rotary axis operation C-axis


N20 G1 X0 Z0 F1000
N30 M290 Spindle operation C-axis on
Part Programming Manual
page 309/352
MACHINEMATE

N40 M03 S800 Spindle programmed


N50 X10 A0 F1000
N60 A30 Z20
N70 M291 Spindle operation A-axis on
N80 M214 S1000 spindle 2 clockwise
N90 G04 F2000 S400 M04 spindle 1 counter-clockwise
N100 X5
N110 M280 spindle 1 off
N120 X0 C20 M224 S500 spindle 3 counter-clockwise
N130 X100 C0 M19 S90 spindle 3 positioning
N140 M281 spindles 2 and 3 off
N150 M30

Note:
The spindle cannot be programmed during the rotational axis operation (i.e., M3, M4,
M5 and M19 are not allowed when the servo is the rotary axis). If spindle functions
are programmed the error message 377 is output.

Conversely, the rotational axis cannot be programmed with spindle functions; if that
is programmed, the error message 376 is output.

9.15.3 Spindle running

9.15.3.1 General

When operating the switchover axis as a spindle, the behavior, programming,


functional extent and display correspond to that of a spindle.

While the spindle is running, the rotational axis measuring system is suppressed.
The axis position of the rotary axis is not counted in the display while in the spindle
function. The last interpolated axis position is displayed.

9.15.3.2 Behavior at switch over

The following is executed when a switch back to axis operation is made. The actual
switchover block (M280, M281, etc.) is passed onto the active plane without any
reaction from the CNC. This can be used for a PLC reaction.

Following this, an intermediate block with spindle stop and set-up delay is generated.
This should guarantee a spindle standstill. When G95 (feed in mm/rev.) is active, a
switch back to G94 is made automatically.

Part Programming Manual


page 310/352
MACHINEMATE

The actual switchover block is then generated. This block switches over to the rotary
axis operation, i.e., the axis is controlled again and the instantaneous axis position
(actual position) is displayed. With the appropriate setting up, a further reduction of the
axis position to 0 to 360 degrees can be achieved (see machine parameter
descriptions for the switchover feature).

9.15.3.3 Reaction to a measuring system error

If no measuring system or gate-array error has occurred during spindle function,


then, depending on the setting up, the instantaneous position is retained and the
reference point and/or the starting position (position of the switchover axis before
switching on the spindle function is moved as well. The starting position is
approached in rapid traverse.

If a measuring system or gate-array error has occurred, then, with the appropriate
setting up, a reference cycle is executed or the starting position is moved as well. If
no automatic homing (move to reference point) has been set up for the axis, the
error message 444 is output. With a mandatory homing axis, homing is forced. With
a non-mandatory homing axis, the above warning is output but the NC processing is
not stopped.

9.15.3.4 Rotary axis operation

When the switchover axis is a rotary axis, the behavior, programming, functional extent
and display correspond to that expected of a standard axis.

9.15.3.5 Control reset or end of program

At power on, the switchover axis is treated as a rotary axis. This is necessary so that
homing is possible for the rotary axis. The selected operating mode (rotary axis or
spindle) is retained after control reset and end of program. The operating mode of
the switchover axis can only be changed by NC programming or by a PLC interface
signal in MANual operation.

9.15.3.6 Manual operation

In MANual operation, the switchover axis can only be moved in rotary axis operation. No
positioning of the switchover axis is made while the spindle is running. The error
message 376 is output.

Part Programming Manual


page 311/352
MACHINEMATE

9.16 Thread Cutting or Rigid Tapping


The Thread Cutting feature requires associated additions to a typical NC program to
obtain the desired behavior. With this feature the axes involved in cutting the thread
in the part are interpolating with the spindle. The feature is also called rigid tapping,
to distinguish its operation from cutting threads using a tool with floating tap (where
the axes are not interpolated with the spindle so the tapping tool itself is floating in
its holder so that upon the reversal of the spindle direction the difference between the
axes motion and the spindle rotation is handled mechanically by the tool).

9.16.1 General
During thread cutting the feed velocity is calculated depending on the spindle rotary
speed. The programmed F-word has no effect. Feed under F becomes effective again
when G01, G02, G03 or G07 are programmed.

To ensure that the tool begins cutting at the same place for several cuts, the thread
begins always at the Spindle-position 0 (the marker pulse from its encoder).

For several continuous thread blocks, the thread cutting command is placed only in the
first block since the G-code is modal.

9.16.2 Spindle Control


If during thread cutting G08 is active the spindle speed will be decreased to zero at the
end of each block and at the beginning of the next block accelerated again.

The spindle speed is synchronous to the thread axes; i.e., it stops at the end of the block
as well.

If G09 is active at thread cutting at the end of the thread block only at changing of the
direction of the linear axes or the spindle it will be decelerated.

Right-hand or left-hand threads are determined by the rotation direction of the spindle
(programming with M03 or M04 respectively).

9.16.3 Programming thread with uniform pitch, G33


With G33 the following threads with uniform pitch can be cut:

Plain thread

Cylindrical thread

Conical thread

Part Programming Manual


page 312/352
MACHINEMATE

Cylindrical thread with controlled running out

Conical thread with controlled running out

9.16.4 Programming thread with dynamic pitch, G34


With G34 the following threads with dynamic pitch cut:

Cylindrical thread

Conical thread

9.16.5 Definition of the thread block


X: Length of thread for plain threads

X-component of the running out distance.

Z: Z-component of the thread length.

I: X-component of the thread pitch.

K: Z-component of the thread pitch.

J: Z-component of the running out distance change of pitch/thread lead in the


direction of thread.

The following combinations and values are possible:

Thread G X Z I K J

Plain thread 33 <> 0 -- >0 -- --


Cylindrical thread 33 -- <> 0 -- >0 --
Cylindrical thread with controlled 33 <> 0 <> 0 -- >0 >0
running out
Conical thread 33 -- <> 0 <> 0 >0 --
Conical thread with controlled 33 <> 0 <> 0 <> 0 >8 >0
running out
Cylindrical thread with dynamic 34 -- <>0 -- >0 <> 0
pitch
Conical thread with dynamic pitch 34 -- <> 0 <> 0 >0 <> 0

-- means the address may not be programmed!

Table 9-7: Definition of a G33/G34 thread block

Part Programming Manual


page 313/352
MACHINEMATE

Other combinations of letters or other ranges of values are not allowed.

Note that the plain thread in X requires a special axis configuration. Threading is
normally done in Z (i.e., cylindrical and conical threads). If the plain thread is possible in
the machine (i.e., to thread in X) then that machine will not thread in Z.

They are mutually exclusive features (plain threading or not). The threading in X is
shown in the table above in case such a special machine requires this application.

O defines (as an option) the spindle orientation at the start of each threading pass. The
default, with no letter O in the block, is each pass starts with the marker pulse on the
spindle. The letter O allows the programmer to define an orientation for each pass,
specified in the number of degrees (from 0 to 359). (The letter O was added as an option
for G33 with CNC version 2.2 and was not available on earlier versions. The letter O is
programmable in a machine parameter if a different letter is desirable.)

9.16.6 Programming cylindrical thread, G33, G34


Note: the part program statements precede the figure with its results. This sections
sequence is NC code then its figure, NC code then its figure, etc. Figure 9-21 shows the
raw part, prior to the execution of the NC code that results in the following figures.

Figure 9-17: Work piece before G33 processing

N40 G01 X+2 Z+12


N50 G33 Z+4 K+1

Part Programming Manual


page 314/352
MACHINEMATE

Figure 9-18: Work piece after processing with G33

N40 G01 X+2 Z+12


N50 G33 X+1 Z+4 J+4 K+1

Figure 9-19: Work piece with controller running out (G33)

N40 G01 X+2 Z+12


N50 G34 Z+4.5 J0.25 K+1

Part Programming Manual


page 315/352
MACHINEMATE

Figure 9-20: Work piece with increasing pitch (G34)

N40 G01 X+2 Z+12


N50 G34 Z4.5 J-0.25 K+2

Figure 9-21: Work piece with decreasing pitch (G34)

Part Programming Manual


page 316/352
MACHINEMATE

9.16.7 Programming conical thread G33, G34


Note: the part program statements precede the figure with its results. This sections
sequence is NC code then its figure, NC code then its figure, etc. Figure 9-26 shows the
raw part, prior to the execution of the NC code that results in the following figures.

Figure 9-22: Work piece before processing with G33

N40 X+1 Z+12


N50 G33 Z+4 I+0.5 K+1

Figure 9-23: Work piece after processing with G33

Part Programming Manual


page 317/352
MACHINEMATE

N40 G01 X+1 Z+12


N50 G33 X+1 Z+4 I+0.5 J+44 K+1

Figure 9-24: Work piece with controlled running out (G33)

9.16.8 Programming lag free thread, G133, G134


The meaning of the function Lag free thread cutting is to eliminate lags and resulting
path errors in the axes involved at thread cutting caused by regulation.

If the function Lag free thread cutting is properly set up, thread cutting blocks will be
moved lag free using G33/G34.

Before the first activation the zero-lag function has to learn the characteristics of the
involved axes. The learning function has to be switched on with G133. For example with
following NC program:

N10 G1 X0 Z0 F300
N20 G133
N30 X10
N40 Z10
N50 G134
N60 M30

With G133 basic factors for the zero-lag function in the interpolator-loop will be
calculated and the learning function switched on. The basic factors of the axes for thread
cutting will be optimized automatically at the following blocks. In the display the lag for
the corresponding axes should oscillate around zero (LAG-display active). The KV-
display will be adjusted during the movement of the axes to the value 100.

Part Programming Manual


page 318/352
MACHINEMATE

If the KV-values (activate LAG-display as display function) of both axes are getting
stable near the value 100.0 the learning process can be terminated with G134.

During an active learning function, no thread cutting blocks can be programmed with
G33/G34 and no new feed can be programmed as well.

Note:
If the learning function is activated later again with G133, the previous learned
and stored zero-lag factors will be overwritten with the basic factors. This
means, that the learning function must be repeated once again completely.

The G-code necessary to switch on the learning function can be pre-set. To


switch off, the number following the pre-set value, will be used. G133 should be
used. At thread cutting G08 must be active as well

Example:
N100 G08
N110 G01 F5000 X100 Z100 M03 S500
N120 G33 Z120 K1
N130 G1 X ..
N140 ..

Part Programming Manual


page 319/352
MACHINEMATE

9.17 Turning Cycles or Stock Removal Cycles


The Turning Cycles feature requires associated additions to a typical NC program to
obtain the desired behavior.

9.17.1 General
The stock removal cycles provide an easy way of roughly turning. The CNC
programmer only has to program the desired shape. The CNC then creates a
multiple repetitive cycle for stock removal and roughly turning of the shape.

The programmed tool path can also be used for the finishing cut with the help of the
finishing cycle G270.

Note that some controls refer to type I and type II turning cycles. With this
terminology, a type I turning cycle allows neither axis in the cycle to change direction
along its defined profile. A type II turning cycle allows only one axis in the cycle to
change its direction. The programming convention for the type I cycle has a single
axis in the first block after the G27x statement with the P and Q values while the type
II cycle has two axes in the first block after the G27x statement. The MachineMate
CNC supports only the type I turning cycles regardless of the number of axes in the
first block after the G27x. Neither axis can change its direction during the profile.
From the first position to the last position in the profile, each axis can be either
increasing or decreasing in position but not both. Typically a type II profile can be
cut using a sequence of type I profiles.

Note that neither the path compensation (see 5.1.1) nor tool tip radius compensation
(see 5.3.3.4) are possible during any of the G271 to G276 turning cycles.

Part Programming Manual


page 320/352
MACHINEMATE

9.17.2 G271 Stock removal in turning

9.17.2.1 Syntax

G271 U... R...


G271 P... Q... U... W...

The stock removal cycle in turning is prepared by the optional Block

G271 U... R...

The U value gives the depth of cut for stock removal. The direction of cut is indicated by
the sign of the W value in the activating block.

The R value gives the escaping amount. Both U and R values have to be programmed
without a sign and their values are taken as a programmed radius.

Both values are modal and if one of them or the whole preparing block is omitted, the
values in the machine parameters TurningDepthOfCut and TurningEscapeAmount are
taken for the turning cycle.

The cycle is activated by the Block

G271 P... Q... U... W...

The P value gives the number of the first block for the finishing shape.

The Q value gives the number of the last block for the finishing shape. The blocks in
between are replaced by the multiple repetitive cycle.

The U value gives the finishing allowance in radial direction (X). The sign of this value
gives the direction of the allowance relative to the shape. The sign also designates the
direction in which the levels of stock removal are changed. In the case of diameter
programming the value is to be specified in diameter dimension.

The W value gives size and direction of finishing allowance in longitudinal direction (Z).

If a finishing allowance of zero is desired for U or W (or both), the sign has to be
programmed together with the zero (for example: W+0 or W-0) in order to define the
direction in which the levels of stock removal are changed. If a zero is programmed
without sign, it is assumed as positive.

The modal feedrate (F), spindle speed (S) and spindle direction (M3/M4) are provided
either before these G271 blocks or in the second of the two G271 blocks. They are not
specified in any of the blocks within the cycle.

Part Programming Manual


page 321/352
MACHINEMATE

9.17.2.2 Example

N50 G0 X45 Z0
N60 G271 U10 R5
N61 G271 P100 Q200 U.5 W1 S1200 F.8 M4
N100 G1 X10
N110 Z-30
N120 X30 Z-50
N130 X40
N140 Z-80
N200 X45 Z-80

w (G0)
d
(G1)

Program e
command

d: depth of cut Z
e: escape amount
u: radial finishing
w: longitudinal finishing

Figure 9-25: Stock removal


The turning cycle starts with the actual position before the block N100, i.e., with X45 Z0.
The programmed allowances in positive X- and Z-direction, U.5 and W1, are added to
the programmed positions.

For this roughly cutting shape three stock removal cycles on the X-levels 35.5, 25.5 and
15.5 are computed. First the tool moves to the start position X45.5 Z1.

The three cycles for stock removal are processed and then the shape for roughly cutting
is processed with the positions X10.5 Z1; X10.5 Z-29; X30.5 Z-49; X40.5 Z-49; X40.5 Z-
79; X45.5 Z-79.

The cycle ends at the starting position, i.e., the position before the block N100.

Part Programming Manual


page 322/352
MACHINEMATE

9.17.2.3 Direction of allowance

u>0 w>0 u>0 w<0

u<0 w>0 u<0 w<0


Figure 9-26: Stock removal: direction of allowance

9.17.2.4 Effective G-codes

When G271 is active, only the programmed radial (X) and longitudinal (Z) position and
the interpolation types G00, G01, G02, G03, G12 and G13 are taken into account.

All other programmed values, such as feed- or spindle speed values and all programmed
G-codes are ineffective in stock removal.

Feed and spindle speed are constant with the first cycle block active rate.

If a finishing cycle is turned with the same blocks, no other G-codes than the ones for
the interpolation type should be activated between the first cycle block and the finishing
cycle G270. Otherwise the shape could be destroyed.

In the blocks of the stock removal cycle, cycle programming (*N...) and subprograms (or
subroutines) are forbidden.

Part Programming Manual


page 323/352
MACHINEMATE

9.17.3 G272 Stock removal in facing

9.17.3.1 Syntax

G272 W... R...


G272 P... Q... U... W...

The cycle for stock removal in facing is prepared by the optional Block

G272 W... R...

The W value gives the depth of cut for stock removal. The direction of cut is designated
by the sign of the U value in the activating block.

The R value gives the escaping amount. Both values have to be programmed without
sign and values are taken as radius programmed.

Both values are modal and if one of them or the whole preparing block is omitted, the
values in the machine parameters FacingDepthOfCut and FacingEscapeAmount are
taken for the turning cycle.

The cycle is activated by the Block:

G272 P... Q... U... W...

The P value gives the number of the first block for the finishing shape.

The Q value gives the number of the last block for the finishing shape. The blocks in
between are replaced by the multiple repetitive cycles.

The U value gives the finishing allowance in radial direction (X). The sign of this value
gives the direction of the allowance relative to the shape. The sign also designates the
direction in which the levels of stock removal are changed. In the case of diameter
programming the value is specified in diameter dimension.

The W value gives size and direction of finishing allowance in longitudinal direction (Z).

If a finishing allowance of zero is desired for U or W (or both), the sign has to be
programmed together with the zero (for example: W+0 or W-0) in order to define the
direction in which the levels of stock removal are changed. If a zero is programmed
without sign, it is assumed as positive.

Part Programming Manual


page 324/352
MACHINEMATE

When G272 is active only the programmed radial (X) and longitudinal (Z) position and
the interpolation types are taken into account. All other programmed values, such as
feed- or spindle speed values are ineffective.

The modal feedrate (F), spindle speed (S) and spindle direction (M3/M4) are provided
either before this G272 or in the G272 block. They are not specified in any of the blocks
within the cycle.

9.17.3.2 Example

...
N50 G0 X0 Z45
N60 G272 P100 Q200 U-.8 W1.3 S1100 F1 M3
N100 G1 Z10
N110 X30
N120 X50 Z20
N200 X50 Z45

u
Program
command w
X

e d
d: depth of cut
e: escape amount
u: radial finishing
w: longitudinal finishing

Figure 9-27: Stock removal in facing


The stock removal cycle starts at the actual position before block N100. Then three stock
removal cycles are turned and afterwards the roughing shape is turned.

The cycle ends at the starting position.

Part Programming Manual


page 325/352
MACHINEMATE

9.17.4 Direction of allowance

u<0 w<0 u<0 w>0

u>0 w<0 u>0 w>0

Figure 9-28: Stock removal in facing: direction of removal

9.17.4.1 Effective G-codes

When G271 is active, only the programmed radial (X) and longitudinal (Z) position and
the interpolation types G00, G01, G02, G03, G12 and G13 are taken into account.

All other programmed values, such as feed- or spindle speed values and all programmed
G-codes are ineffective in stock removal. Feed and spindle speed are constant with the
first cycle block active rate.

If a finishing cycle is turned with the same blocks, no other G-codes than the ones for the
interpolation type should be activated between the first cycle block and the finishing
cycle G270. Otherwise the shape could be destroyed.

In the blocks of the stock removal cycle, cycle programming (*N...) and subprograms (or
subroutines) are forbidden. Such statements must precede the cycle.

Part Programming Manual


page 326/352
MACHINEMATE

9.17.5 G270 Finishing Cycle


After roughly turning the programmed blocks can be used for a finishing cut.

9.17.5.1 Syntax

G270 P... Q...


The P value gives the first block for the finishing cut.

The Q value gives the last block for the finishing cut.

For an exact finishing cut after a stock removal cycle, the numbers of first and last block
in G270 and G271/G272 must be identical. The start position of the finishing block must
be identical to the position before the first block in stock removal. This can be achieved
by programming G270 directly after the last block of stock removal.

All G-codes and other instructions in the finishing cycle blocks are effective.

9.17.5.2 Example

...
N50 G0 X45 Z0
N61 G271 P100 Q200 U.5 W1 S1200 F.8 M4
N100 G1 X10
N110 Z-30 F1
N120 X30 Z-50 F1.5
N130 X40
N140 Z-80
N200 X45 Z-80
N210 G270 P100 Q200
N220...
...

After the stock removal cycle G271, the exact finishing shape is turned, i.e., the CNC
moves from the start point (X45 Z0) to the positions in the blocks N100 to N200. Then it
returns to the start point of the cycle (X45 Z0) and then continues with the next block
(N220).

Part Programming Manual


page 327/352
MACHINEMATE

9.17.6 G274 Peck finishing cycle

9.17.6.1 Syntax

G274 R...
G274 X... Z... U... V... R ...

The turning cycle for peck finishing is prepared by the first block above (block G274
R...) and the actual cycle is initiated by the second block above.

The initial R-value defines the return amount for the cycle. This R-value is modal
and if this block is omitted, the preset value in the machine parameter
TurningReturnAmount is applied.

The cycle is activated by the second block above (with the X, Z, U, V, R, F).

The X value defines the end point in radial direction (X).

The Z value defines the end point in longitudinal direction (Z).

The U value defines the movement amount in radial direction (X). No sign is allowed
for this parameter.

The V value defines the movement amount in the longitudinal direction (Z).

The R value defines the escaping amount. This value is normally given by the relief
amount of the tool at the bottom of the cut. The sign is given by the direction of the
movement to X. However, if X and P are omitted, then the relief direction can be
specified by the desired sign.

Note While both the escaping amount and the return amount are programmed by code R,
the meanings of them are determined by the presence of address X

Note The cycle is initiated by the G274 statement with the X specification.

The following picture shows how the programmed values result in the machining
procedure for the cycle.

Part Programming Manual


page 328/352
MACHINEMATE

R (return amount)
Z: programmed Endpoint X
Startpoint
R

R1
X : programmed Endp

V1 V Z
0 < V1 <= V
0 < R1 <= R

Figure 9-29: G274 peck finishing cycle

9.17.6.2 Effective G-codes

When G274 is active, only the programmed radial position (X) and longitudinal (Z)
position are taken into account.

Feed and spindle speed are constant with the values that are modal before the first
cycle block.

9.17.7 G275 Outer diameter/internal diameter turning cycle

9.17.7.1 Syntax

The G275 turning cycle operates as shown in the figure below. This cycle is
equivalent to G274 except that X is replaced by Z. Chip breaking is possible in this
cycle, and grooving in X axis and peck drilling in X axis (in this case Z and Q are
omitted) are also possible.

G275 R...
G275 X... Z... U... V... R...

The X, Z, U, V, R explanations are provided for G274.

Part Programming Manual


page 329/352
MACHINEMATE

R1
V1 V

Z
0 < V1 <= V
0 < R1 <= R

Figure 9-30: G275 inner/outer diameter turning cycle

9.17.7.2 Effective G-codes

When G275 is active, only the programmed radial position (X) and longitudinal
(Z) position are taken into account.

Feed and spindle speed are constant with the values that are modal before the
first cycle block.

9.17.8 G276 Multiple pass threading cycle

9.17.8.1 Syntax

G276 Pmmaa. V... R... O..

mm: Repetitive count in finishing (1 to 99).


This value is modal and is not changed until another value is assigned.

aa: Angle of tool tip


One of six kinds of angle, 0, 60, 55, 30 and 29 can be selected
and specified by 2-digit number. This value is modal and is not changed until
another value is assigned. When no value is programmed, the Machine
parameter TurningTooltipAngle is applied.

Mm and aa are specified by address P at the same time.


When mm = 2 and aa = 60, specify as shown below:

P0260 (where mm = 02 and aa = 60)


Part Programming Manual
page 330/352
MACHINEMATE

The V value defines the minimum cutting depth. When the cutting depth of one cycle
operation becomes smaller than this limit, the cutting depth is clamped at this value.
This designation is modal and is not changed until another value is programmed.
When no value is programmed, the machine parameter
TurningMinimumCuttingDepth is applied.

R defines the finishing allowance. This value is modal and is not changed until
another value is programmed. When no value is programmed, the machine
parameter TurningFinishingAllowance is applied.

O defines (as an option) the spindle orientation at the start of each threading pass.
The default, with no letter O in the block, is each pass starts with the marker pulse
on the spindle. The letter O allows the programmer to define an orientation for each
pass, specified in the number of degrees (from 0 to 359). (The letter O was added
as an option for G276 with CNC version 2.2 and was not available on earlier
versions.)

G276 X... Z... I... U... V... K... J...

I defines the difference of thread radius in X, the direction per lead.

If I has a value of 0 (zero), an ordinary straight thread cut is made.

The absolute difference in X from the beginning to the end of the thread is given by
X = I * with = Z / K.

U defines the height of thread. This value is the radius value in X-axis direction.

V defines the depth of cut in first cut (radius value).

J defines the chamfering amount. This value is modal and is not changed until the
other value is programmed. Note that J must be non-zero if included. J0 results
in error 144.

K defines the lead of thread.

Note The meaning of the data specified by address U, V and R will be determined by the
presence of X and Z.

Note The cycle machining is performed by G276 with X and Z specification.

The G276 cycle uses the same spindle behavior as the G33 threading code so the
spindle marker is used for synchronizing the spindle orientation with the axis motion
at the start of each pass.

By using this cycle, one edge cutting is performed and the load on the tool tip is
reduced. Making the cutting depth d for the first path and d*sqrt(n) for the n-th path,
the cutting amount per one cycle is held constant.

Part Programming Manual


page 331/352
MACHINEMATE

I*k J
U (thread height

Figure 9-31: G276 multiple pass thread turning cycle


The difference of the thread radius is given by the amount of leads K multiplied by I.

How the different cuts occur depends on the parameter values as shown in the
following picture:

Tool tip

V height of f

1st

2nd V * sqrt(n) = P
3rd

nth

Figure 9-32: G276 threading cycle and tool tip parameters

9.17.9 Error messages


315 Machine parameter TurningGCodeAppl faulty
Part Programming Manual
page 332/352
MACHINEMATE

The function Turning Cycles is not enabled in the system.

708 Turning Cycles: Parameter wrong


If depth of Cut <= 0 or escape amount < 0. If U- or W-value is not programmed
in the activating block G271/G272.

709 Turning Cycles: Block number wrong


If P or Q in the activating block G271/G272 is not programmed.

710 Turning Cycles: Block not found


No block exists with the P or Q programmed number.

711 Turning Cycles: Cycle programming *N not allowed


No Cycle programming *N... is allowed in the turning cycles.

712 Turning Cycle: Circular level not allowed


The activated plane (G17, G18, G19) includes other axes than X and Z (the
applied transverse and longitudinal axes).

713 Turning Cycle: Too many blocks


Up to 1000 blocks can be defined in the turning cycle.

9.17.10 Part program display


The part program display is modified while turning cycles are active in order to clarify the
progress of the turning cycles to the user. The following is valid:

Line 1: This line shows the block that has caused the actual turning cycle.

Line 2: The second line shows the block that defines the contour element that is
actually processed.

Line 3: This line shows the element or block that is to be processed after the actual
contour element.

At entering turning cycles, the block with G271 (or G272) is displayed a second time. At
this time the CNC moves to the start point with additional finishing allowance.

At the end of turning cycles (G271 or G272) the block with G271 (or G272) is displayed
again. With this block active, the CNC moves back to the start point.

When finishing is active (G270) the block with G270 appears a second time at the end of
the finishing cycle. With this block active the CNC moves to the point from which turning
cycles were started.

Blocks that define contour-elements parallel to the tool moving axes are not displayed.

Part Programming Manual


page 333/352
MACHINEMATE

10 Programming MachineMate Special


Features
MachineMate offers a number of special features. These features have their own
programming rules.

These are all special features and are not available on all controls. They would be
part of the original purchase of the control, part of the original CNC software
configuration.

10.1 Lathe T-code Programming


This special feature allows the NC part programmer to use just a T-Code to make the
turret position selection and the offset selection. This is a change to the default
behavior described for the T-code in section 4.3.3.

The purpose of this feature is to convert a T-code into a new T-code for just the turret
position with the correct D and H-codes as well. With this feature, the NC
programmer will follow the same rule as for some other controls, where the T-code
identifies all three codes rather than using the three letters on this control.

Several examples,

1. 2-digit offset selection (typical):

N10 T0203 -> N10 T02 D03 H03

or

N10 T0357 -> N10 T03 D57 H57

2. 1-digit offset selection (alternate):

N10 T75 -> N10 T7 D5 H5

If the number of digits in the T-code is not more than the number of digits provided for
the offset (e.g., T1), then the T-code is assumed to be just the turret selection with no
offset selection.

Note:
No D or H value is expected to be present on the line with the T value since
the T value will call out the appropriate D and H values (based on the rule
above). Those values from the T value will override any other D or H that is
present on the line. This is change to the programming technique described
in 4.3.3.

This feature has the configurable option for the number of digits in the offset
selection (either 1 or 2; 2 is the default setting). All programs will be expected
to use one or the other T-code format.

Part Programming Manual


page 334/352
MACHINEMATE

10.2 Programming a Rotary-only Motion in G70


This special feature allows the NC part programmer to use the specified feedrate
in a block of rotary-only motion to be treated as degrees/minute, rather than
inches/min when G70 is modal. This is a change to the default behavior described
for the feedrate in section 2.1.3.

The default behavior for the CNC when in G71 (metric) is that the linear axes
move in millimeters and the rotary axes move in degrees. One millimeter is 1000
microns and one degree is considered equivalent to 1000 microns. Therefore an
interpolated move with a linear axis moving 1 mm and a rotary axis moving 1
degree will have both axes moving at the same rate, where the combined path of
both results in the correct feedrate, in mm/min.

The default behavior for the CNC when in G70 (inch) is that the linear axes move
in inches and the rotary axes move in degrees. One inch is 25400 microns and
one degree is considered equivalent to 1000 microns. Therefore an interpolated
move with a linear axis moving 1 inch and a rotary axis moving 25.4 degrees will
have both axes moving at the same rate, where the combined path of both results
in the correct feedrate, in in/min.

The end result of this default behavior is that the rotary axis will move 25.4 times
faster than would be expected if the feedrate value had been considered to be
degrees/minute.

This special feature allows the path feedrate to be interpreted as degrees/minute


when the active block meets the following criteria:
1) G70 is modal and
2) The block contains only rotary axis motion.

Under these circumstances, the feedrate context is changed to be degrees/minute


rather than inches/minute. For example, a block (with G90 modal for absolute
programming) like:

N100 G1 F10 A90

will result in the rotary A-axis moving to a position of 90 degrees at the rate of 10
degrees/minute. Without this feature enabled, the same block of G1F10A90 with
G70 modal (so F10 means 10 inches/minute) would result in a rotary feedrate of
254 degrees/minute. The modal feedrate value is not affected by this block or this
special feature, so if the next block was N110 X10 then X would move at 10
inches/minute.

10.3 G93 for Programming a Mix of Linear and Rotary


Motion
This special feature allows the NC part programmer to use the specified feedrate
in a block to be treated as a time rather than as a motion/time. This is a change to
the default behavior described for the feedrate in section 2.1.3. This G93 special
feature is assumed to replace the default G93 behavior for constant
circumferential speed (CCS; see 9.8.7.2); both G93 features cannot exist at the
same time. This G93 is typically used on milling machines with one or more rotary
axes while CCS would be used on grinders.

Part Programming Manual


page 335/352
MACHINEMATE

The default behavior for the CNC moving a rotary axis is described in the above
section (10.2). Basically a degree is considered 1000 microns and the number of
degrees in the rotary motion is considered relative to any linear motion (in mm or
inches) in the same block when interpolating them together or alone.

This G93 feature allows the path feedrate to be programmed in a block with G93
and the feedrate value is interpreted as a time. This feature is often called inverse
time programming, as the units for the G93 F-value are 1/minute. The
programmed F value comes from a calculation (see below) by the programmer.
The F value is the result of the desired feedrate (in inches/minute for G70 or in
mm/minute for G71) divided by the actual distance moved in the block (in inches
for G70 or in mm for G71).

The common usage for G93 is an NC block having both a linear and a rotary axis
motion. This G93 defines the feedrate to be in the units of 1/minute, so the
programmer is specifying the time for a block, not the path velocity for the block
(as in G94). The part programmer can account for the diameter of the part in the
feedrate calculation so that the actual path velocity at the part surface (i.e., the
angular velocity in conjunction with the part diameter) is taken into account by the
part program.

For example (with G70 modal for inch dimensions and G91 modal for incremental
programming):

N100 G93 X5 B90 F5

the X move of 5 inches and the B move of 90 degrees will require 0.2 minutes or
12 seconds (from the 1/5 minute, since F is programmed in units of 1/minute). If
the part had a diameter of 18 inches then the programmed path velocity at the
part surface for this motion will be about 75 inches/minute. Other G93F examples
would be F1 for 1 minute or F0.333 for 3 minutes.

The G94 programming (i.e., feedrate as in/min or mm/min) defines the path
velocity for the linear/rotary combination from just the combination of linear (in or
mm) and rotary (degrees) units.

The calculation of the G93 feedrate value comes from the formula:

G93F = 1 / ( Actual_move_distance / Desired_feed_rate )

Actual_move_distance comes from this formula:

Actual_move_distance = square_root( ((D * Pi)/(360 / A))^2 + L^2 )

where:
D = diameter_of_part
A = angular_move
L = linear_move
Pi = the constant pi (3.14159)

D and L are in the same units (inches or mm). The Desired_feed_rate is in the
similar units (inches/min or mm/min). A is in degrees.

The result of ( Actual_move_distance / Desired_feed_rate ) will be the number of


minutes required for the motion.

Part Programming Manual


page 336/352
MACHINEMATE

The NC programmer is making this calculation so that the CNC provides the
desired path feedrate with the correct angular velocity (i.e., by taking into account
the cutters distance from the center of rotation).

Since the formula for the G93 F-value has the time in the denominator, the G93
feature is often called inverse time feedrate programming.

The CNC will take the programmed F-value, determine the distance moved in the
block and then display both the actual and programmed feedrates in the correct
G94 units (either mm/minute or inches/minute).

Note that this G93 applies only to the NC block it is in. This G93 is not modal. The
NC programmer should provide a G94F block prior to the next G1 block to make
sure the correct feedrate (in the correct units of distance/time, not 1/time) is
applied after this special interpolation block.

10.4 Canned Drilling Cycle Letter Programming


This special feature allows the NC part programmer to use conventional letters to
specify the parameters for each canned cycle rather than the more versatile cycle
parameters provided by the CNC. The default syntax for the canned cycles is
defined in section 7.

With this programming feature, the NC programmer configures the G8x canned
cycle on the G8x line itself, rather than in the preceding NC statement(s) with the
cycle parameter values. This syntax is very similar to that used in many other
controls.

10.4.1 Canned Cycle Programming with Letters not Parameters


The programming details for the respective canned cycles are below. Check
Section 7 for the description of the canned cycle operations.

Note that Z, R and K are common to all of the canned cycles and W is used for all
canned cycles except G81 (which has no dwell time).

Many other CNC vendors canned cycles allow just Z and R to be defined so K
(the reference plane between the retract plane and the part) is optional in all the
canned cycles. Since a dwell is not always required for a particular cycle, W (the
dwell time) is also optional in all cycles that allow it.

Several other letters (F, I, J, U and V) are used for the different canned cycles but
the meaning of the individual letter depends on the associated canned cycle.

For G81 (see 7.4),


Z defines the final depth for the cycle, in an absolute dimension,
R defines the retract plane for the cycle, in an absolute dimension
K defines the reference plane for the cycle, in an absolute dimension
(optional; reference plane = retract plane if K is not present).

For G82 (see 7.5),


Z defines the final depth for the cycle, in an absolute dimension,
R defines the retract plane for the cycle, in an absolute dimension

Part Programming Manual


page 337/352
MACHINEMATE

K defines the reference plane for the cycle, in an absolute dimension


(optional; reference plane = retract plane if K is not present),
W defines the dwell time in the cycle, as a programmed time (as G4Fx)
(optional; 0 if W is not present).

For G83 (see 7.6),


Z defines the final depth for the cycle, in an absolute dimension,
R defines the retract plane for the cycle, in an absolute dimension
K defines the reference plane for the cycle, in an absolute dimension
(optional; reference plane = retract plane if K is not present),
W defines the dwell time in the cycle, as a programmed time (as G4Fx)
(optional; 0 if W is not present),
U defines the incremental motion within the cycle, in an incremental value,
V defines the first increment motion within the cycle, in an incremental value
(optional; U-value is used for first increment if V is not present),
I defines the safety clearance value for the cycle, in an incremental value
(optional; 0 if I is not present).

For G84 (see 7.7),


Z defines the final depth for the cycle, in an absolute dimension,
R defines the retract plane for the cycle, in an absolute dimension
K defines the reference plane for the cycle, in an absolute dimension
(optional; reference plane = retract plane if K is not present),
W defines the dwell time in the cycle, as a programmed time (as G4Fx)
(optional; 0 if W is not present).

For G85 (see 7.8),


Z defines the final depth for the cycle, in an absolute dimension,
R defines the retract plane for the cycle, in an absolute dimension
K defines the reference plane for the cycle, in an absolute dimension
(optional; reference plane = retract plane if K is not present),
W defines the dwell time in the cycle, as a programmed time (as G4Fx)
(optional; 0 if W is not present).

For G86 (see 7.9),


Z defines the final depth for the cycle, in an absolute dimension,
R defines the retract plane for the cycle, in an absolute dimension
K defines the reference plane for the cycle, in an absolute dimension
(optional; reference plane = retract plane if K is not present),
W defines the dwell time in the cycle, as a programmed time (as G4Fx)
(optional; 0 if W is not present),
I defines the X offset motion in the cycle, in an incremental value,
J defines the Y offset motion in the cycle, in an incremental value.

For G87 (see 7.10),


Z defines the final depth for the cycle, in an absolute dimension,
R defines the retract plane for the cycle, in an absolute dimension
K defines the reference plane for the cycle, in an absolute dimension
(optional; reference plane = retract plane if K is not present),
W defines the dwell time in the cycle, as a programmed time (as G4Fx)
(optional; 0 if W is not present),
F defines the retract feedrate within the cycle, as a feedrate value,
(optional; modal feed rate is used if F is not present),
U defines the first reamed depth in the cycle, in an absolute dimension.

Part Programming Manual


page 338/352
MACHINEMATE

For G88 (see 7.11),


Z defines the final depth for the cycle, in an absolute dimension,
R defines the retract plane for the cycle, in an absolute dimension
K defines the reference plane for the cycle, in an absolute dimension
(optional; reference plane = retract plane if K is not present),
W defines the dwell time in the cycle, as a programmed time (as G4Fx)
(optional; 0 if W is not present).

For G89 (see 7.12),


Z defines the final depth for the cycle, in an absolute dimension,
R defines the retract plane for the cycle, in an absolute dimension
K defines the reference plane for the cycle, in an absolute dimension
(optional; reference plane = retract plane if K is not present),
W defines the dwell time in the cycle, as a programmed time (as G4Fx)
(optional; 0 if W is not present),
U defines the first depth in the cycle, in an absolute dimension,
V defines the second depth in the cycle, in an absolute dimension.

10.4.2 Canned Cycle Programming: Cross Reference to Section 7


Section 7 of this NC Part Programming Manual describes the respective canned
cycles, as well as the cycle parameters that are required for each canned cycle.
Here is the conversion between the letters in this feature and the associated
cycle parameters for each cycle described in the section 7.

For G81, Z -> P3, R -> P10, K -> P2.


If no K then P2=R.
For G82, Z -> P3, R -> P10, K -> P2, W > P4.
If no K then P2=R. If no W then P4=0.
For G83, Z -> P3, R -> P10, K -> P2, W -> P4, U -> P5, V -> P1, I -> P6.
If no K then P2=R. If no W then P4=0. If no V then P1=U.
If no I then P6=0.
For G84, Z -> P3, R -> P10, K -> P2, W -> P4.
If no K then P2=R. If no W then P4=0.
For G85, Z -> P3, R -> P10, K -> P2, W -> P4.
If no K then P2=R. If no W then P4=0.
For G86, Z -> P3, R -> P10, K -> P2, W -> P4, I -> P8, J -> P9.
If no K then P2=R. If no W then P4=0.
For G87, Z -> P3, R -> P10, K -> P2, W -> P4, F -> P12, U -> P13, modal F ->
P11.
If no K then P2=R. If no W then P4=0. If no F then P12= modal F.
For G88, Z -> P3, R -> P10, K -> P2, W -> P4.
If no K then P2=R. If no W then P4=0.
For G89, Z -> P3, R -> P10, K -> P2, W -> P4, U -> P13, V -> P15.
If no K then P2=R. If no W then P4=0.

10.4.3 Canned Cycle Programming Examples


The NC Part Programming Manual (section 7.4) has an example for programming
a G81 cycle. The example shows the G81 with a reference plane at 2.5 inches,
the final hole depth at 1.0 inch and the retract plane at 3.0 inches.

To program the G81 cycle for the same results with this feature, this syntax would
be used:
Part Programming Manual
page 339/352
MACHINEMATE

< Omit lines N40 and N50 >


N60 G81 Z1 R3 K2.5 or N60 G81 Z1.0000 R3.0000 K2.5000

There is also an example for programming a G83 cycle (section 7.6 in the
manual). To program the G83 cycle for the same results as the example with this
feature, this syntax would be used:

< Omit lines N40 through N55 >


N60 G83 Z1 K2.5 R3 W1 U0.5 V1.25 I0.25

There is also an example for a complete program, including a series of operations


for both the G81 and G84 cycles in section 7.13. That example assumes G71 so
to program the canned cycles for the same results as the example with this
feature, this syntax would be used:

< Omit lines N40 through N55 >


N60 G81 Z3 K20 R30
...
< Omit line N140 >
N150 G84 Z5 K20 R30 W1

Note:
None of these letters for canned cycle parameters are modal. For example,
an R parameter for a G81 will not apply to a subsequent G82. Each G81-G89
statement must define that specific canned cycles required parameters with
its letters.

None of these canned cycle parameters can be changed with just that letter
during the individual steps before the G80. To change any of the cycle
parameters, another complete G8x line is required. For example, a line after
the G81 and before the G80 could not specify just an R (e.g., N75 R5.3) to
redefine the retract plane for the subsequent G81 holes. To change a cycle
parameter value (like R) for the canned cycles, either a cycle block (e.g.,
*N75 P2=25000) or another complete G8x statement (with the Z, R,
(optional) K and any other required letters) is required.

10.5 Two-axes Collinear Tracking Programming


This special feature, sometimes called the Collinear Axes Tracking Feature,
allows the NC part programmer to manage two collinear axes, Z and W, by
programming the axis to move and the target is the distance to the part, rather
than the distance to move that axis.

This feature continually tracks two collinear axes, W and Z. The absolute
programming of either axis results in the programming of the collinear axes
distance rather than either individual axis. This feature is similar to that found on
other CNC controls.

This feature assumes there is a primary tracking axis. The primary axis
determines the motion when both axes are programmed in the same NC block in
absolute dimensions. The default tracking axis is W. To change this behavior,
G700 directs tracking on W while G701 directs tracking on Z.

Part Programming Manual


page 340/352
MACHINEMATE

When either axis is programmed in absolute dimension mode (G90), the axis is
moved such that at the end of the move the collinear distance is equal to the
programmed position. For example, with an NC statement of

N100 G90 Z10.0

Z will be moved to a location such that the W/Z collinear distance is 10.0 inches.

With this feature enabled, the programmer must recognized a new way to
program these two collinear axis (new being different than all the other axes in
the machine). See the G92 comments below. There is a new simple rule for any
W or Z block in G90:

The W or Z value is the new distance from the tool to the part. The W or Z
value is NOT the new axis position.

When both axes are programmed in G90, the actual motion depends on the
tracking axis. If the control is tracking on W, then Z will move as directed while W
is moved such that its final position results in the W/Z collinear distance being
equal to the W programmed position. If the control is tracking on Z, then the
opposite occurs.

When either axis (or both) is programmed in incremental dimension mode (G91),
each axis is moved as directed and the collinear distance is adjusted accordingly.

The Collinear Axes Tracking Feature's axis position display overlay (with the
current Collinear Distance shown in Position column) will be present whenever the
CNC screen is in either the MANUAL or AUTOMATIC display modes. This
behavior is controlled from the PLC application.

The offset data shown in the axis position display overlay is the tool length
compensation value (from the active H parameter value). The tool length
compensation value affects only the collinear axes distance. It does not affect the
position of either W or Z axis.

There are several special programming considerations for this feature.

M12

M12 is a command to move Z to that absolute position, regardless of the current Z


position or the current collinear distance. The W/Z collinear distance is updated
accordingly during this move. M12 is valid only with G90 modal (absolute position
programming); otherwise it is a programming error. (Without the M12, the Z value
in the block would be treated as the new collinear distance, not just the position
for Z.)

This M12 is essentially a feature override, allowing the operator to temporarily


program and move Z to a particular position (just like any other axis (not W or Z)
in this machine).

G92

The interpretation of the G92 statement depends on the tracking axis. The default
tracking axis is W so in that case a G92 W results in the W value becoming the
new collinear distance (affected by the Z position) and the W G92 offset is given
the appropriate value (for the new W position). A G92 Z results in that change to

Part Programming Manual


page 341/352
MACHINEMATE

the Z G92 offset and the collinear distance is calculated for the current Z and W
positions. The opposite interpretations of W and Z for G92 occur when the default
tracking axis is Z. When both axes are in the same G92 statement, the non-
tracking axis has its position updated first for the specified G92 offset and then the
tracking axis has its position and G92 offset updated for the specified new
collinear distance.

As is expected, a G92 with no axes in the statement results in the cancellation of


all G92 axis offsets. After that action, the W/Z collinear distance is updated
according to the current W and Z positions.

The common use of G92 in combination with this feature is the G92 will define the
distance from the end of the tool to the part surface. By doing either a G92Z0 or
G92W0 when the tool tip is just touching the part surface, the collinear axis
position is defined to be 0 at part surface (and a G92 offset is applied to that axis
so that its new position in G92 part coordinates is 0.0). If a subsequent block is
either Z1 or W1 (in G90) then the tool tip would be moved one inch from the
surface (with the axis letter defining which axis is moving the tool tip to that target
position). If a subsequent block is either Z-1 or W-1 then the tool tip would be
moved one inch into the part.

10.6 Extended Part Offsets Programming


This special feature, often called the extended part offsets feature, allows the NC
part programmer to manage more than the usual set of six part zero offsets,
described in section 5.1.2.

The standard part offsets are available in the part program by the G54 to G59
codes; G53 cancels the active set. The CNC has a built-in table editor to enable
the configuration of these six sets of part offsets.

With this special feature, the part program can access a larger range of offsets
than six. The part program syntax for this additional set of part zero offsets is
similar to that used in other controls for their similar feature, like

N1230 G54 P1

The above P1 with the G54 specifies the index to one of the additional sets of
these part zero offsets. This feature can be configured with its range for this set.
Each additional set of G54Px offsets will support four axes. Typically this range for
Px will be from 1 up to either 48 to 300 (so the NC syntax is from G54 P1 all the
way up to either G54 P48 to G54 P300). G54P0 will be treated the same as just
G54.

Error 145 results if the G54 P-value is too large for the configuration. The system
integrator will define what is the range of acceptable Px values for G54.

10.6.1 Programming the additional Part Offsets


In addition to the Px with the G54, there is another part programming change that
is required for this feature to properly handle the interaction of these additional
offsets with those that are built-in (G54 to G59). There must be a G10 block
before and after the G54 NC code segments in the part program.

Part Programming Manual


page 342/352
MACHINEMATE

For example:

. . .
N1220 G10
N1230 G54 P1 (G54 EXTENDED SET 1)
N1240 Z15 G0
. . .
N1380 G10
N1390 G54 P7 (G54 EXTENDED SET 7)
N1400 Z14 G0
. . .
N1700 G10
N1710 G58
N1720 Z14 G0
. . .
N1940 G53
N1950 M30

Note that there is a G10 in the block immediately before the G54 (with or without
an accompanying P-value) and there is another G10 in the block immediately
before the next G-code in the range of G53 to G59. This G10 is only required for
the G54, not G53 or G55 to G59. This rule results in the requirement for the G10's
in N1220 and N1380 for the G54 in N1230 and G10's in N1380 and N1700 for the
G54 in N1390. No G10 is needed for the G58 in N1710 or the G53 in N1940.

This G10 is required in the part program because the CNC, upon the G54Px
block, will be updating the G54 set of part offsets (the real G54 set is saved to
several cycle parameters while the new set of G54 offsets is retrieved from its
storage in cycle parameters). If the G10 is not included in the part program then
those changes being done during the block look ahead could affect preceding
blocks under certain circumstances (like an MDI in the middle of the program
execution).

This use of G10 is required only when there is at least one block with G54Px in
the part program. If a part program remains within the standard six sets of part
zero offsets (i.e., G54 to G59) then there is no requirement for the G10 to be
associated with G54 (before and after).

10.6.2 Managing the additional part offsets


The quantity of this extended set of part zero offsets is determined by the system
integrator. The common ranges are either 48 or 300, similar to that on other
controls. This special feature using a set of 300 also requires more than the
standard set of cycle parameters (the default is 1000 of those).

When a particular G54Px is active or modal, using the Data Modify Zero Offsets
to change the G54 axis offsets will change the offsets for that G54Px set. Upon a
control reset or a change in the modal G53-G59, the set of offsets for the modal
G54Px will be saved to the appropriate memory (in the cycle parameters).
Therefore these additional sets of part offsets can be managed by the operator in
two ways:

1) Data Modify Zero Offsets to modify the active part offset.


2) Data Modify Cycle Parameters to modify the (inactive) part offsets in their
storage locations.

Part Programming Manual


page 343/352
MACHINEMATE

Note:
If no part offset is active and if the G54 values are edited using option 1, upon a
subsequent use of G54Px those values from the table are saved to the storage
locations. The usual procedure for editing G54 offsets (or G54P0) is assumed to
be with the Zero Offsets table editor. Option 1 takes precedence over option 2.

If a G54Px part offset is active and if the G54 values are edited using option 1,
upon a change in the active part zero offset (G53 to G59 or another G54Px) then
those values from the table are saved to the storage locations. The usual
procedure for editing G54 offsets is assumed to be with the Zero Offsets table
editor.

If the second option (editing cycle parameters) is used while that particular G54Px
part zero offset is active, then upon its deactivation those changes will be lost
because the first option will always copy the currently active offset values into the
storage locations for the active offset. Remember that option 1 takes precedence
over option 2. If the second option is used when the particular offset is not active
(Px, where X is not 0) then no conflict exists. The potential conflict between
operator options 1 and 2 exists only while a particular G54Px is active.

The same conditions apply to the PLC writing either the active part offsets values
or the cycle parameters. Just as the operator can manage these offsets in two
ways, the PLC can write them in either manner via its CNC interface signals.

While any of the G54 to G59 offsets will include all configured axes, these
additional sets include offsets for only the first four axes. That is a significant
limitation of this feature, though other controls have similarly offered up to four
axes per part zero offset. If the offsets are changed for the fifth or higher axes
when the G54Px is active, those changes will be lost (when saved to the storage
locations). They will be active only as long as the G53-G59 is not changed (either
in an NC block with G53-G59 or with a control reset). If offsets are required for the
fifth axis (or higher) then those axis offsets must be managed manually since they
will never be saved to the storage locations. This feature for more part zero
offsets is not intended to be used on machines requiring more than four axes per
each part offset.

If the operator or programmer wishes to save the extended set of part zero offsets
to a data file then the complete set of cycle parameters must be saved to a file.
The extended set of offsets are stored in a block of cycle parameters. The file for
the part zero offsets table will always consist of only the G54 to G59 offsets, the
standard set of six rows in the CNC table.

Part Programming Manual


page 344/352
MACHINEMATE

Index

ABS...................................................... 199 Read over ........................................... 25


Absolute dimension ....................... 40, 150 Slash (/) .............................................. 15
Acceleration Suppression ........................................ 25
Programmable .................................... 98 Block length ........................................... 29
A-code.................................................. 198 Block read over (/) ................................. 25
Address letter ......................................... 16 Block start
Analog Cycle programming ........................... 29
Input ......................................... 205, 216 Ignore ................................................. 29
Output ...................................... 205, 216 Normal ............................................... 29
Angle cut off ........................................ 128 Canned cycles .............. See Drilling cycles
Approach block.................................... 119 Carriage return ................ See Character, cr
ART (Advanced Regulation Technology) Cartesian coordinate............................. 157
.......................................................... 112 Center of circular arc ............................. 46
ASCII characters.................................... 30 Character
ASCII code range................................. 198 *.................................................. 29, 194
ATN ..................................................... 199 /... ................................. 15, 29, 194, 196
Automatically intermediated block...... 257 A..34, 198, 218, 265, 287, 289, 290, 309
AV ................................................ 195, 210 ASCII set............................................ 30
Axis B........................................... 34, 98, 265
Feed.................................................... 32 C................................... 34, 71, 261, 309
Gantry ................................................ 35 cr.. ...................................................... 29
Helical ................................................ 51 D...... 104, 105, 108, 118, 124, 129, 176,
Letter ....................................... 195, 210 193, 195, 197, 207, 249, 263, 334
Longitudinal..................................... 262 E.. ................................. 80, 86, 282, 305
Major.................................................. 47 F.. .. 85, 86, 88, 90, 93, 95, 97, 248, 282,
Minor.................................................. 47 295, 302, 306, 312, 337
Orientation ................................... 32, 35 G................................... 18, 21, 147, 218
Position ............................................ 209 H...... 104, 107, 108, 175, 193, 195, 197,
Resettable rotational........................... 36 256, 334
Rotary................................................. 34 I... 46, 155, 161, 290, 306, 313, 331, 337
Software travel limits......................... 37 J...46, 155, 161, 290, 306, 313, 331, 337
Work field travel limits.................... 163 K...... 46, 48, 49, 59, 63, 83, 84, 85, 250,
Barrel cam transformation 265, 290, 297, 313, 331, 337
Cartesian coordinates ....................... 259 L.. ................................................. 25, 74
Centerline deviation ......................... 264 lf.. ....................................................... 29
Cylinder coordinates ........................ 261 M.. ...................................................... 22
General............................................. 259 N................................................... 15, 29
Osculation plane............................... 263 O............................................... 314, 331
Radius compensation ....................... 262 P.. ...... 28, 193, 195, 197, 198, 202, 321,
BCD-code .............................................. 23 324, 327, 330, 342
Block Q................................. 26, 321, 324, 327
Layout ................................................ 15 R........ 86, 170, 173, 259, 292, 321, 324,
Number .............................................. 15 328, 331, 337

Part Programming Manual


page 345/352
MACHINEMATE

S.. ...... 99, 100, 101, 102, 153, 257, 258, Curvature bend angle ............................. 89
293, 295, 296, 297, 298 Curvature radius..................................... 86
T.. ..................................... 108, 297, 334 Cycle block .................................... 28, 193
U........ 34, 264, 265, 300, 304, 321, 324, Cycle parameter ................... 202, 205, 218
328, 331, 337 Cycle programming 28, 205, 218, 323, 326
V......... 34, 261, 300, 304, 328, 331, 337 D-code.................................. 193, 195, 207
W........................ 34, 321, 324, 337, 340 DGR ..................................................... 199
X..32, 162, 253, 300, 313, 321, 324, 328 Diameter Programming........................ 267
Y................................. 32, 162, 253, 300 Distance regulation .............................. 273
Z.. 32, 72, 162, 253, 313, 321, 324, 328, Activate/deactivate........................... 273
337, 340 Axis selection................................... 273
Circle center ........................................... 46 DO................................ 196, 211, 215, 216
Circular interpolation ....................... 45, 49 Drilling cycles
Clockwise......................................... 45, 49 Bore out............................................ 235
Comment........................................ 27, 196 Bore out with intermediate halt........ 241
Compensation Bore out with spindle halt ................ 239
End point radius ............................... 129 Cycle parameter values .................... 220
Path .................... 64, 105, 114, 207, 249 Deep hole drilling ............................ 229
Path during spline interpolation ....... 129 Deselecting....................................... 224
Path velocity..................................... 131 Drill to depth .................................... 225
Real-time radius ................. 88, 129, 262 Final hole depth................................ 220
Real-time radius with 5-axes ............. 92 Introduction...................................... 219
Tool data .......................................... 104 Reaming ........................................... 233
Tool length ....................... 106, 107, 206 Reaming with measuring stop.......... 237
Tool radius ....................................... 104 Reference plane................................ 220
Tool tip radius .................................. 105 Retract plane .................................... 220
Conditional instruction......................... 211 Spot facing with dwell ..................... 227
Constant circumferential speed............ 297 Termination...................................... 222
Constant cutting speed ......................... 296 Thread cutting or tapping................. 231
Constant surface speed......................... 102 DTAB................................................... 105
Contour accuracy ........................... 83, 250 Dummy block....... 143, 167, 197, 248, 249
Contour error.......................................... 76 Dummy coordinate................................. 62
Control reset 18, 21, 23, 25, 66, 72, 96, 98, Dwell.............................. 85, 86, 88, 90, 93
146, 149, 154, 164, 170, 174, 194, 208, DWRC
270, 273, 291, 295, 296, 311 Activation......................................... 183
Corner acceleration ................................ 80 Application schemes ........................ 180
Corner deviation..................................... 86 Dresser, wheel, tool tip radius
Corner smoothing ................................ 86 compensation ............................... 175
Corner smoothing with radius Entry/exit move types ...................... 179
compensation ..................................... 89 G-codes ............................................ 179
Correction table number .............. 105, 107 Orientations...................................... 176
COS...................................................... 199 Tables for compensation .................. 175
Counter-clockwise ........................... 45, 49 Dynamic block buffer ...................... 64, 75
CSS ...................................................... 102 End of program .......................... See M002
Curvature accleration ............................. 85 Error
Curvature accuracy ................................ 85 108.............................................. 63, 262
Curvature activation............................... 84 114...................................................... 50
Part Programming Manual
page 346/352
MACHINEMATE

121.................................................... 131 Fast output control ............................... 275


144.................................................... 331 Feed........................................................ 42
145.................................... 264, 266, 342 Feed influencing with probe signals .... 278
152...................................................... 26 Feed interpolation ................................ 282
18...................................................... 173 Feed override ON/OFF .......................... 96
196.................................................... 280 Feed rate............................... 42, 46, 57, 95
199.............................................. 96, 248 File format
204.................................................... 161 First line ............................................. 28
209.................................................... 131 Length compensation (H) ................ 107
211................................ 37, 71, 164, 274 NC program ....................................... 29
241............................................ 262, 269 Part position offset table .................. 147
257...................................................... 63 Path compensation (D)..................... 105
259.................................................... 194 Program number................................. 28
260.................................................... 213 Subroutine name ................................ 27
261............................................ 208, 214 Floating point precision ....................... 197
262.................................... 204, 208, 214 G000.... 38, 62, 96, 97, 222, 251, 262, 302,
263.................................................... 214 323, 326
272............................................ 305, 309 G001.... 42, 55, 62, 84, 222, 251, 294, 302,
274............................................ 305, 308 312, 323, 326, 335
30........................................................ 31 G002...... 45, 47, 55, 62, 84, 140, 160, 162,
315.................................................... 333 222, 248, 250, 251, 312, 323, 326
32........................................................ 74 G003 45, 55, 139, 142, 160, 162, 222, 248,
376............................................ 310, 311 250, 251, 312, 323, 326
377.................................................... 310 G004..... 63, 79, 85, 86, 88, 90, 93, 96, 308
431.................................................... 274 G005....................................................... 60
432.................................................... 273 G006................................. 60, 62, 222, 252
433.................................................... 273 G007............. 51, 55, 57, 84, 222, 250, 312
435.................................................... 269 G008..................... 77, 83, 84, 95, 312, 314
444.................................................... 311 G009................................. 77, 84, 247, 312
445.................................................... 297 G010....................................... 75, 197, 343
54........................................................ 67 G011........................................... 64, 75, 79
69.............................................. 212, 216 G012.. 49, 55, 84, 160, 222, 248, 250, 323,
708.................................................... 333 326
709.................................................... 333 G013.. 49, 55, 62, 160, 222, 248, 250, 323,
710.................................................... 333 326
711.................................................... 333 G014..................... 154, 157, 160, 251, 269
712.................................................... 333 G015..................................... 154, 157, 251
761...................................................... 26 G016..................................... 154, 157, 162
816...................................................... 28 G017...... 46, 115, 154, 155, 157, 160, 170,
860...................................................... 37 180, 269
871.................................................... 102 G018..................................... 155, 160, 180
98...................................................... 139 G019............................................. 155, 160
Errors G020............... 47, 155, 157, 160, 161, 162
Cycle programming ......................... 213 G021 .................................................... 299
Example program G022 .................................................... 299
Base plate ......................................... 243 G024............................................. 163, 174
External program ................................... 28
Part Programming Manual
page 347/352
MACHINEMATE

G025..................................................... 163 G090. 39, 40, 150, 164, 170, 287, 302, 341
G026..................................................... 163 G091 41, 67, 150, 164, 170, 173, 287, 290,
G027..................................................... 163 302
G033 96, 98, 101, 131, 222, 252, 258, 294, G092.... 36, 51, 55, 56, 63, 70, 74, 99, 101,
312 102, 131, 145, 152, 157, 167, 170, 248,
G034..................................... 222, 294, 313 255, 258, 262, 266, 280, 281, 294, 299,
G035..................................................... 305 341
G038............................. 165, 256, 269, 299 G093............................................. 296, 335
G039..................................................... 166 G094............................... 95, 295, 310, 336
G04094, 104, 118, 122, 124, 133, 160, 249 G095........................... 77, 85, 95, 295, 310
G041...... 51, 108, 118, 119, 121, 133, 140, G096..................................... 102, 258, 296
142, 249, 252 G097............................................. 102, 296
G042....... 51, 118, 119, 121, 133, 139, 140 G098..................................................... 302
G043............................................. 118, 121 G100 ............................................ 251, 266
G044..................................... 118, 121, 140 G102..................................................... 259
G045..................................................... 184 G103..................................................... 262
G046............................................. 184, 189 G104..................................................... 264
G050............................................. 160, 173 G105..................................................... 261
G051..................................... 160, 170, 269 G106..................................................... 261
G052............................................. 160, 170 G107..................................................... 262
G053..................... 145, 146, 270, 302, 342 G108..................................................... 264
G054......... 51, 70, 145, 147, 153, 193, 207 G133..................................................... 318
G054P ................................................. 342 G134..................................................... 319
G055............................................. 145, 147 G150 ...................................................... 92
G059..................................................... 302 G151 ...................................................... 92
G063......................... 96, 99, 100, 294, 302 G152 ...................................................... 92
G066............................... 96, 100, 294, 302 G160..................................................... 112
G070............... 96, 149, 164, 302, 335, 336 G170..................................................... 279
G071....................... 96, 149, 164, 302, 336 G171..................................................... 279
G072....................................................... 76 G172..................................................... 279
G073................................................. 76, 77 G181....................................................... 89
G074.... 51, 77, 96, 98, 101, 131, 262, 274, G182....................................................... 89
299 G186........... 48, 51, 59, 63, 80, 83, 85, 250
G075....................................................... 84 G188..................................... 301, 302, 303
G076....................................................... 85 G190 .................................................... 267
G078..................................... 64, 66, 67, 70 G191 ............................................ 267, 271
G079................................................. 64, 66 G192 .................................................... 267
G080............................................. 224, 225 G193 .................................................... 267
G081............................. 219, 225, 248, 337 G200 ...................................................... 86
G082............................................. 227, 337 G201 ................................................ 86, 90
G083............................................. 229, 338 G202 ................................................ 86, 91
G084............................................. 231, 338 G203 ................................................ 86, 91
G085............................................. 233, 338 G220 .................................................... 251
G086............................................. 235, 338 G221 .................................................... 251
G087............................................. 237, 338 G222 .................................................... 251
G088............................................. 239, 339 G223 .................................................... 251
G089............................................. 241, 339 G265..................................................... 273
Part Programming Manual
page 348/352
MACHINEMATE

G270..................................... 323, 326, 327 M000 .......................... 73, 74, 75, 111, 307
G271............................. 321, 323, 326, 327 M001 .............................................. 73, 247
G272............................................. 324, 327 M00223, 25, 26, 29, 31, 74, 153, 170, 249,
G274..................................................... 328 302, 303
G275..................................................... 329 M003 .................................... 100, 293, 312
G276..................................................... 331 M004 .................................... 100, 293, 312
G700 .................................................... 340 M005 ............................................ 100, 293
G701 .................................................... 340 M006............................................ 109, 110
G-code............................................ 21, 218 M012.................................................... 341
GO ............................... 196, 211, 212, 215 M019 .................................... 100, 103, 298
GTAB................................................... 147 M020 .................................................... 307
Handwheel in automatic mode............. 284 M021 .................................................... 307
H-code.................................. 193, 195, 206 M030 .......................................... See M002
Helical interpolation............................... 51 M040 .................................................... 256
HTAB................................................... 107 M041 .................................................... 256
IB 195, 208 M046 .................................................... 256
IF comparisons..................................... 215 M070 ................................................ 60, 61
IF.. ........................................ 196, 211, 215 M071 ................................................ 60, 61
Ignore block ........................................... 25 M072 ................................................ 60, 61
Imperial ......................................... See Inch M073 ................................................ 60, 62
IN_CYCLB_01 .................................... 208 M080 .............................................. 52, 278
IN_GEAR01 ........................................ 257 M081...................................................... 21
IN_POS_01 .......................................... 303 M101 .................................................... 275
Inch ...................................................... 149 M102 .................................................... 275
Incremental dimension................... 41, 150 M103 .................................................... 275
Input bit from PLC............................... 208 M104 .................................................... 275
Instruction ........................................ 15, 17 M105 .................................................... 275
INT....................................................... 199 M106 .................................................... 275
Integer range ........................................ 197 M107 .................................................... 275
Intermediate block ....................... 125, 184 M108 .................................................... 275
Interpolation M109 .................................................... 275
Circular .......... 45, 49, 84, 131, 248, 250 M111 .................................................... 275
Linear ............................. 38, 42, 84, 131 M112 .................................................... 275
Precision stop ..................................... 76 M113 .................................................... 275
Spline ..................... 60, 62, 84, 129, 131 M114 .................................................... 275
Tangential circular ............................. 57 M115 .................................................... 275
Interpolation parameter.......................... 49 M116 .................................................... 275
Jump instruction................................... 212 M117 .................................................... 275
KV display ........................................... 318 M118 .................................................... 275
KV factor ............................................... 76 M140 .................................................... 273
Laser shutter control ............................ 275 M141 .................................................... 273
L-code .............................................. 25, 74 M151............................................ 278, 279
Letter .................................... See Character M152............................................ 278, 279
Line feed .......................... See Character, lf M153............................................ 278, 279
Linear interpolation..................... See G001 M154............................................ 278, 279
Look ahead................. 75, 77, 98, 247, 250 M155.................................................... 278
Loop ....................................................... 25 M156.................................................... 278
Part Programming Manual
page 349/352
MACHINEMATE

M157.................................................... 278 P03 ...... 225, 227, 229, 231, 233, 235, 237,
M158.................................................... 278 239, 241
M159 .................................................... 280 P04 227, 229, 231, 233, 235, 237, 239, 241
M160 .................................................... 280 P05 ....................................................... 229
M161............................................ 278, 281 P06 ....................................................... 229
M162............................................ 278, 281 P08 ....................................................... 235
M163.................................................... 278 P09 ....................................................... 235
M164.................................................... 278 P10 ...... 225, 227, 229, 231, 233, 235, 237,
M165.................................................... 278 239, 241
M166.................................................... 278 P11 ....................................................... 237
M167.................................................... 278 P12 ....................................................... 237
M168.................................................... 278 P13 ............................................... 237, 241
M170.................................................... 281 P14 ....................................................... 229
M171 ............................................ 280, 281 P15 ....................................................... 241
M200 .................................................... 284 P34 ....................................................... 205
M201.................................................... 284 P59 ....................................................... 205
M209.................................................... 284 P900001 ............................................... 218
M210.................................................... 284 P999981 ............................................... 219
M211.................................................... 284 Parallel axes ......................................... 299
M213.................................................... 293 Part position offset .................... 195, 207
M214.................................................... 293 Part position offset table number ......... 147
M215.................................................... 293 Part reference ....................................... 152
M223.................................................... 293 Part rotation.......................................... 170
M224.................................................... 293 Polar coordinate ................................... 154
M225.................................................... 293 Pole point ..................................... 157, 162
M280 .................................................... 309 Positioning axis.................................... 301
M290 .................................................... 309 PP ......................................................... 204
Major axis ............................................ 161 Probe ...................................................... 52
M-code ................................................... 22 Contact processing ............................. 55
Metric................................................... 149 Program
Minor axis ............................................ 161 BCD functions ................................... 23
Mirror................................................... 165 Block .................................................. 15
MOD .................................................... 199 Conditional stop ................................. 73
Modal ..................................................... 17 End ..................................................... 74
MSG............................................... 27, 111 Interruption ........................................ 73
Multiple spindles.................................. 293 Repeat ................................................ 25
MV................................................ 195, 210 Unconditional stop ............................. 73
NC block ...................... See Program block Word .................................................. 16
Non-modal ............................................. 17 Program number............................... 28, 29
OB ................................................ 195, 208 Programmable Acceleration.................. See
ON_CYCB01....................................... 208 Acceleration,Programmable
Operation sequence.............................. 201 Programmable homing........................... 51
Optional halt........................................... 73 Programmable oscillation .................... 305
Output bit to PLC................................. 208 Programming
P01 ....................................................... 229 Absolute dimensions........................ 150
P02 ...... 225, 227, 229, 231, 233, 235, 237, Additional part offsets ................... 342
239, 241 Angled wheel transformation ....... 251
Part Programming Manual
page 350/352
MACHINEMATE

Axes with no spindle.......................... 34 Peck finishing cycle (turning).......... 328


Axis mirror....................................... 165 Plane for 2-axis operations............... 160
Axis rotation....................................... 36 Polar coordinates.............................. 154
Barrel cam transformation ...... 259, 261, Positioning axis................................ 302
262, 264 Probe input for feedrate ................... 278
Circular interpolation with circle center Rigid tapping.................................... 312
........................................................ 45 Rotary in G70 ................................. 335
Circular interpolation with radius ...... 49 Rotary with G93 ............................. 335
Collinear axes tracking ................. 340 Rotating axes.................................... 286
Contour accuracy ............................... 83 Round axis ....................................... 286
Corner acceleration ............................ 80 Safe zone.......................................... 163
Corner smoothing ............................ 86 Spindle ............................................... 99
Curvature............................................ 84 Spindle gear range selection ............ 256
Diameter turning cycle (inner/outer) 329 Spindle speed override..................... 100
Distance regulation .......................... 273 Spline definition................................. 60
Dresser radius compensation ........... 175 Spline interpolation............................ 62
Drilling cycles.................................. 219 Stock removal (turning) ........ 321, 324
Dwell.......................... 85, 86, 88, 90, 93 Switchover Spindle/Rotary axis....... 309
DWRC.............................................. 179 Tangential circular interpolation........ 57
Fast outputs ...................................... 275 Tangential lead-in angle..................... 71
Feed axes............................................ 33 Tangential orientation ........................ 64
Feed interpolation ............................ 282 Thread cutting .................................. 312
Feed override ..................................... 96 To avoid errors................................. 248
Feedrate.............................................. 95 Tool length compensation................ 106
Finishing cycle (turning).................. 327 Tool radius compensation ................ 104
G092................................................... 70 Tool selection ................................. 108
Handwheel in automatic mode......... 284 Tool tip radius compensation........... 175
Helical interpolation........................... 51 Turning cycles.......... 320, 322, 323, 325
Inch format....................................... 149 Wheel radius compensation ............. 175
Incremental dimensions ................... 150 Work cycles ..................................... 218
Interpolation with precistion stop ...... 76 Programming summary
Inverse time with G93 ................... 335 G-codes .............................................. 21
Lathe diameter ................................. 267 Geometric instructions ....................... 24
Lathe T-code .................................. 334 M-codes.............................................. 22
Look ahead................................. 77, 247 Positioning instructions...................... 24
Metric format ................................... 149 Program execution instructions.......... 24
Multiple pass threading cycle (turning) Technical instructions ........................ 24
...................................................... 331 PST-code................................................ 28
Multiple spindles.............................. 293 RAD ..................................................... 199
Operator stop...................................... 73 Radius .................................................... 49
Oscillation ........................................ 305 Rapid traverse ............................. See G000
Parallel axes ..................................... 299 Repeat program...................................... 25
Part coordinates................................ 152 Retreat block ................................ 122, 143
Part position offsets.......................... 145 Rigid tapping............... See Thread Cutting
Part rotation...................................... 170 Rotation number................................... 290
Part scaling....................................... 173 Range ............................................... 291
Path compensation ................... 114, 118 Round (or rotary) axis.......................... 286
Part Programming Manual
page 351/352
MACHINEMATE

Round axis Stock removal cycles ... 320, 322, 323, 325
Modulo............................................. 286 Subprogram........................ See Subroutine
Normal ............................................. 286 Subroutine 25, 26, 246, 248, 249, 323, 326
Resettable rotational........................... 36 File name............................................ 27
Shortest way..................................... 286 Levels................................................. 26
Safe zone Subroutine levels.................................. 224
Lower limits ..................................... 163 Switchover spindle and rotary axis ...... 309
Upper limits ..................................... 163 T0 ................................................. 109, 111
Scaling.................................................. 173 Tangent
SEL ...................................................... 196 Angle offset........................................ 67
SEL functions....................................... 217 Lead-in ............................................... 66
Set axis coordinate ............................... 152 Vector................................................. 66
SIN ....................................................... 199 Vector angle ....................................... 66
Slash code .............................................. 15 Tangential circular interpolation............ 57
Speed.......................................... 42, 46, 57 Tangential setting................................... 64
Spindle T-code ......................................... 108, 334
Clockwise......................................... 100 Temporary NC block ........................... 257
Counter-clockwise ........................... 100 Thread cutting
Gear range selection ............ 251, 256 Conical ............................................ 317
OFF .................................................. 100 Cylindrical ....................................... 314
ON.................................................... 100 General............................................. 312
Orientation ....................... 100, 103, 298 Lag free thread ................................. 318
Override ........................................... 100 Length of thread............................... 313
Reversal............................................ 103 Pitch ................................................. 313
RPM ................................................. 102 Run out............................................. 313
Speed limitation ............................... 101 Spindle control ......................... 312, 314
Spindle speed ............................. See Speed Tool compensation............................... 104
Spline Tool management ............................. 109
Deactivate .......................................... 62 Traverse instruction .................... See G000
Definition ........................................... 60 Turning cycles.............. 320, 322, 323, 325
Interpolation....................................... 60 Wear offset ......................................... 195
Path velocity....................................... 63 Whole number range............................ 197
Tangential transition .......................... 60 Work cycle ................................... 205, 218
Type ............................................. 60, 62 Work field limits .................. See Safe zone
SQT ...................................................... 199

Part Programming Manual


page 352/352

Potrebbero piacerti anche