13.3 Subprogram Control; M98, M99, M198 ........................................................................................... 241
13.3.1 Subprogram Call ; M98,M99................................................................................................... 241
13.3.2 Subprogram Call ; M198......................................................................................................... 247
13.4 Variable Commands ....................................................................................................................... 248
13.5 User Macro ...................................................................................................................................... 250
13.5.1 User Macro ............................................................................................................................. 250
13.5.2 Macro Call Instruction ............................................................................................................. 251
13.5.2.1 Simple Macro Calls ; G65............................................................................................... 251
13.5.2.2 Modal Call A (Movement Command Call) ; G66............................................................. 255
13.5.2.3 Modal Call B (for each block) ; G66.1............................................................................. 257
13.5.2.4 G Code Macro Call ......................................................................................................... 259
13.5.2.5 Miscellaneous Command Macro Call (for M, S, T, B Code Macro Call) ......................... 260
13.5.2.6 Detailed Description for Macro Call Instruction .............................................................. 261
13.5.3 ASCII Code Macro .................................................................................................................. 263
13.5.4 Variable.................................................................................................................................... 267
13.5.5 Types of Variables .................................................................................................................. 269
13.5.5.1 Common Variables ......................................................................................................... 269
13.5.5.2 Local Variables (#1 to #33) ............................................................................................. 270
13.5.5.3 Macro Interface Inputs/Outputs (#1000 to #1035, #1100 to #1135, #1200 to #1295,
#1300 to #1395) .............................................................................................................. 275
13.5.5.4 Tool Compensation ......................................................................................................... 282
13.5.5.5 Workpiece Coordinate System Compensation (#5201 - #532n) ..................................... 283
13.5.5.6 NC Alarm (#3000) ........................................................................................................... 284
13.5.5.7 Integrating Time (#3001, #3002) .................................................................................... 285
13.5.5.8 Suppression of Single Block Stop and Miscellaneous Function Finish Signal Waiting
(#3003) ........................................................................................................................... 285
13.5.5.9 Feed Hold, Feedrate Override, G09 Valid/Invalid (#3004) ............................................. 286
13.5.5.10 Message Display and Stop (#3006) .............................................................................. 286
13.5.5.11 Mirror Image (#3007) .................................................................................................... 287
13.5.5.12 G Command Modals (#4001-#4021, #4201-#4221) ..................................................... 288
13.5.5.13 Other Modals (#4101 - #4120, #4301 - #4320) ............................................................ 289
13.5.5.14 Position Information (#5001 - #5160 + n) ..................................................................... 290
13.5.5.15 Number of Workpiece Machining Times (#3901, #3902) ............................................. 293
13.5.5.16 Coordinate Rotation Parameter..................................................................................... 293
13.5.5.17 Tool Life Management (#60000 - #64700) ................................................................... 294
13.5.5.18 Reading The Parameters (#100000-#100002, #100010) ............................................. 299
13.5.5.19 Reading PLC data (#100100-#100103,#100110) ......................................................... 302
13.5.5.20 Time Reading Variables (#3001, #3002, #3011, #3012) .............................................. 306
13.5.5.21 R Device Access Variables (#50000 - #50749, #51000 - #51749, #52000 - #52749) .. 308
13.5.6 Operation Commands ............................................................................................................. 314
13.5.7 Control Commands ................................................................................................................. 319
13.5.8 External Output Commands ; POPEN, PCLOS, DPRNT ....................................................... 322
13.5.9 Precautions ............................................................................................................................. 326
13.5.10 Actual Examples of Using User Macros................................................................................. 328
13.6 G Command Mirror Image ; G50.1,G51.1........................................................................................ 332
13.7 Corner Chamfering I / Corner Rounding I ....................................................................................... 336
13.7.1 Corner Chamfering I ; G01 X_ Y_ ,C_.................................................................................... 336
13.7.2 Corner Rounding I ; G01 X_ Y_ ,R_ .......................................................................................338
13.7.3 Corner Chamfering Expansion/Corner Rounding Expansion .................................................. 340
13.7.4 Interrupt during C
orner Chamfering/Interrupt during Corner Rounding................................... 342
13.8 Corner Chamfering II / Corner Rounding II ..................................................................................... 343
13.8.1 Corner Chamfering II ; G01/G02/G03 X_ Y_ ,C_..................................................................... 343
13.8.2 Corner Rounding II ; G01/G02/G03 X_ Y_ ,R_........................................................................ 345
13.8.3 Corner Chamfering Expansion/Corner Rounding Expansion ................................................. 346
13.8.4 Interrupt during Corner Chamfering/Interrupt during Corner Rounding .................................. 346
13.9 Linear Angle Command ; G01 X_/Y_ A_/,A_................................................................................... 347
13.10 Geometric ..................................................................................................................................... 348
13.10.1 Geometric I ; G01 A_............................................................................................................. 348
13.10.2 Geometric IB ......................................................................................................................... 350
13.10.2.1 Geometric IB (Automatic calculation of two-arc contact) ; G02/G03 P_Q_ /R_............ 351