these examples could benefit from the ABS function and guarantee a negative

N1 G21

N2 G90 G00 G54 X1000 Y500 S800 M03

N3 G43 Z50 H01 M08

N4 G99 G81 R25 Z#3 F1500


N5 G80 Z50 M09

N6 G28 X1000 Y500 Z50 M05

N7 M30


Even better, these examples could benefit from the ABS function and guarantee a negative

Z-depth in block N4, re gard less of pre vi ous pos i tive or neg a tive in put:

N4 G99 G81 R25 Z-[ABS[#3]] F1500


Drilling Machine Steel Beam

2 Example 4

In the fourth ver sion, a bit more flex i bil ity will be added to the macro pro gram So far, the tool

point length was based only on a 118掳 an gle, and the pen e tra tion clear ance was ar bi trarily as –

signed the value of 15 mm What if the tool an gle is 135掳 or some other an gle? What if the clear –

ance of 15 mm is too small or too large? These val ues can be de fined as vari ables – they will add

flex i machining equipment bil ity to the pro gram, with only a few more vari ables to fill


#1 = 150

Drill diameter

#2 = 130

Plate thickness

#3 = 1180

Drill point angle

#4 = 15

Penetration clearance added

Once the vari ables have been de fined, they have to be CNC Angle Line used In the ex am ple, the main goal is to

calculate the Z-depth, based on the in put val ues (as sign ments) Since there is a con stant math e mat –

i cal re la tion ship be tween the drill di am e ter and the drill point an gle, it can be press bending machine ex pressed in a well

known and stan dard ma chine shop for mula:


A 枚

P =

麓 tan 莽 90 –


2 酶


where 锟?


= Drill point length


= Drill diameter


= Drill point angle

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

FANUC CNC Custom Macros


Chapter 9

The for mula may be nested in the macro, but nest ing may not be easy to view, in ter pret, or

change, if nec es sary Be cause it may be some what dif fi cult to in clude the whole for mula into the

posted in Uncategorised by admin

Follow comments via the RSS Feed | Leave a comment | Trackback URL

Leave Your Comment

Powered by cnc machine tools | drilling machine. Design by CNC punching machine . Edit by drill machine | punching machine