cation, using the topics discussed previously

cation, using the topics discussed previously This is known as zero shift or da Drilling Machine for Plate tum shift

Copyright 2005, Industrial Press Inc, New York, NY –

FANUC CNC Custom Macros


drilling Machine

Chapter 10

A typ i cal ap pli ca tion of this macro could be a sit u a tion, where the work off set is set to the cor –

ner of a part for the con ve nience dur ing setup, then changed by the macro to the cen ter of a cir cle

(bolt cir cle, for in stance) for the con ve nience of pro gram ming There are sev eral other ways to do

it, angle machine for ex am ple use G52 Our job is to cre ate a macro for the same pur pose In O8007, the added

com ments de scribe what each block does Check the sys tem vari ables for Fanuc 15M ear lier in

the chap ter, so you know what they mean



N101 #1 = #4214

Store the current coordinate system number (54 to 59)

N102 #1 = #1-53

Store the current coordinate system group (1 to 6)

N103 #1 = 20*#1

Calculate the shift value for the current group (based on 20)

N104 #1 Dished Head Punching Machine = #1+5201

Identify the applicable variable number

N105 #[#1] = #5021

Store the current X-axis machine coordinate in new variable

N106 #[#1+1] = #5022

Store the current Y-axis machine coordinate in new variable

N107 M99

Exit macro


The block num ber ing in macro is used for ref er ence only, and is not nec es sary Lo cal vari able

#1 was used, but any other lo cal vari able could have been used in stead, for ex am ple, #33 This is

just one ver sion of the macro, and sev eral oth ers may be used Im prove ments could in clude nested

def i ni tions and per haps a to tally dif fer ent ap proach This ex am ple will be re vis ited later, as one of

the prac ti cal pro jects

Spe cial ‘se cret’ of macro O8007 is the block N102 No tice that an ar bi trary value of 53 is sub –

tracted from the cur rent value of vari able #1 Since #1 stores the cur rent work off set num ber (de –

fined in block N101), sub tract ing 53 from it will re turn a value of

You can leave a response, or trackback from your own site.

Leave a Reply